The basic syntax of an object is:
[name objname] object-type primitives and/or objects end [transformations] [textures]Note that the "name objname" part is optional, if this is omitted the object is placed in the scene, if the object is named then it must be instantiated using the object keyword.
In the example below two objects are created, firstly an unnamed object is created using difference and secondly a named object "board". The unnamed object is included in the scene, but 'board' is only included with the 'object board' entries.
difference box 0 0 0 20 20 8 list disc 10 15 0 -1 0 0 -1 cylinder 10 15 0 -1 15 0 9 disc 10 15 0 9 0 0 1 end end name board box 0 0 0 50 10 2 object board object board translate 0 10 0 object board translate 0 20 0Rayshade has a number of different object types: list and grid objects are lists of primitives (or other objects) while difference, intersect & union objects are used to do Constructive Solid Geometry (CSG) operations on pairs of objects (or primitives).
Return to Contents.
THE END - Notes on Rayshade - 5 - Objects