The graphics state contains a transformation (scale, rotation, translation) and surface attributes (shaders, rendering quality, color, etc).
When any gprim is drawn, it will be drawn using the current graphics state.
For example, if the current graphics state transformation contains a rotation by ninety degrees around the X-axis, and a blue marble shader, and we create a cone, it will be rotated and made of blue marble. In fact, any gprim we create will be rotated and made of blue marble until we change the graphics state.
Blocking Constructs are used like functions, although they can have any number of arguments. The arguments to Blocking Constructs are usually gprims and gops.
There is also a shortcut for scale called "uscale", which just takes one number and uniform scales by that number. So "(uscale .5)" is the same as "(scale '(.5 .5 .5))". When transformation gops are called, they are concatenated to the current transformation, rather than replacing it. (For those concerned with such things, the matrices they produce are premultiplied with the current transformation matrix).
The practical effect of this is that the tranformations are applied to the gprims in the reverse order that the gops were called. So if you wanted to scale, then rotate, then translate a sphere, you would call the gop "translate", then "rotate", then "scale".
(world (color '(1 0 0)) (torus) (translate '(5 0 0)) (rotate 60 '(1 0 0)) (uscale 1.25) (torus) (translate '(5 0 0)) (rotate 60 '(1 0 0)) (uscale 1.25) (torus) (translate '(5 0 0)) (rotate 60 '(1 0 0)) (uscale 1.25) (torus) )
(world (separator (color '(1 0 0)) (sphere) ) (translate '(2 0 0)) (separator (color '(0 1 0)) (sphere) ) (translate '(2 0 0)) (separator (color '(0 0 1)) (sphere) ) )
"Tessellate" controls the degree to which gprims are broken into facets when rendered in the icam. Using "tessellate" will let you trade off interactive performance for rendering quality in the icam.
Here is a sphere that has been tessellated to varying degrees.
ox --> (tessellate n n)![]()