Scene description language
From Infogalactic: the planetary knowledge core
Lua error in package.lua at line 80: module 'strict' not found.
A scene description language is any description language used to describe a scene to be rendered by a 3D renderer such as a ray tracer. The scene is written in a text editor (which may include syntax highlighting) as opposed to be modeled in a graphical way.
Some scene description language may include variables, constants, conditional statements, while loops and for loops.
3DMLW and X3D are XML-based scene description languages. The Tao Presentations application uses XL as a dynamic document description language.
Examples
#declare the_angle = 0;
#while (the_angle < 360)
box { <-0.5, -0.5, -0.5>
<0.5, 0.5, 0.5>
texture { pigment { color Red }
finish { specular 0.6 }
normal { agate 0.25 scale 1/2 } }
rotate the_angle }
#declare the_angle = the_angle + 45;
#end
<?xml version="1.0" standalone="no"?>
<document>
<content2d>
<area width="200" height="100" color="#C0C0C0FF" texture="flower.png" />
</content2d>
<content3d id="content" camera="{#cam}">
<camera id="cam" class="cam_rotation" y="10" z="40" viewy="10"/>
<box name="ground" width="100" height="2" depth="100" color="green" class="ground" />
<box name="dynamic" y="20" width="10" height="10" depth="10" color="blue" />
</content3d>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "http://www.web3d.org/specifications/x3d-3.2.dtd">
<X3D profile="Interchange" version="3.2" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation=" http://www.web3d.org/specifications/x3d-3.2.xsd ">
<Scene>
<Shape>
<IndexedFaceSet coordIndex="0 1 2">
<Coordinate point="0 0 0 1 0 0 0.5 1 0"/>
</IndexedFaceSet>
</Shape>
</Scene>
</X3D>
clear_color 0, 0, 0, 1
light 0
light_position 1000, 1000, 1000
draw_sphere with 1..50
rotatey 0.05 * mouse_x
text_box 0, 0, 800, 600,
extrude_depth 25
extrude_radius 5
align_center
vertical_align_center
font "Arial", 300
color "white"
text "3D"
line_break
font_size 80
text zero hours & ":" & zero minutes & ":" & zero seconds
draw_sphere N ->
locally
color_hsv 20 * N, 0.3, 1
translate 300*cos(N*0.1+time), 300*sin(N*0.17+time), 500*sin(N*0.23+time)
sphere 50
zero N -> if N < 10 then "0" & text N else text N
See also
<templatestyles src="Asbox/styles.css"></templatestyles>