intro   modes   commands   objects   attributes   parameters   timing   variables, constants   forces   todo


Objects

contents

basic objects
null
point
line
mesh
complex objects
plane
ball
box
cylinder
terrain
background
torus
cone
hud
lsystem
blob

There is a lot of work to be done here as I have been concentrating on the other parts of the language. The geometry is an area where there is already the most readily accessible info out there in other languages. It can be filled in later. In the early stages I expect these objects (other than null, point, line, and mesh) will exist mainly as include files. Only much later will they be remade as modules.

I am beginning to wonder if clock, counter, and timer should really be called objects and moved to this page, even though it probably makes no sense to apply any geometric transforms to them. In an abstract sense they are like objects as they can send and receive data in a similar way to geometric objects.


Basic objects
These are the basic, primitive objects that are later used to create libraries of many, more complex objects.

null

null any attributes or objects can go here
. any attributes or objects can go here
Null is a special object. It has no geometry of its own, though it can contain geometry. It is a placeholder with no visible geometry and can be used to position invisible sources of sound or light or a camera, and to group other objects together into hierarchies. The keyword 'null' may be explicitly used or just a pair of curly braces containing other things. The simplest way to think of it, if you have experience with VRML, is as being like the Group{ } node.

point

point x y z

line

line
	points [...]
	connect [...]
	colors [...]
	pointcolors [...]
	closed

mesh

mesh
	points [...]
	connect [...]
	colors [...]
	meshcolors [...]
	pointcolors [...]
	pointnormals [...]
	meshnormals [...]
	ccw
	convex
	solid
	hollow
Was polygon, but mesh seems a more logical name when considering its usual use of creating complex shapes with a mesh of many, many polygons.


Complex objects
These objects are built from the primitives and initially supplied in include files. Later they would hopefully be specially coded as more efficient modules.

plane

plane x|y|z		//infinite plane
plane axis angle pos2d	//finite plane
plane corners position position	//finite plane
I am not sure if plane is a primitive or a derived object. I can see how it could be a primitive, as just y=0 translated and rotated for instance. However it can also be thought of as a single mesh piece (a triangle or rectangle) with its corners set at infinity. I have to think on this more.

ball

ball
	at position
	radius value
	smooth value
	tessellate value
	latitude value
	longitude value
Can be built of facets, smoothed facets, or a smooth single surface. If faceted, the level of subdivision or tessellation can be set by the user. Can be hollow or solid.

box

box at position size value
box corners position position
box corners position position position position position position position position

cylinder

cylinder
	ends position position
	radius value value
	top
	base
	side

terrain

terrain x z xdiv zdiv height heightlist
Called an ElevationGrid in VRML and a HeightField in POVRay. This is mostly used to create hills and valleys.

background

background object map map map...  map
A hollow object surrounding the world, and positioned at infinity. It can have its surface mapped with a single image panorama, cubic panorama, spherical image, other image mapping, or precomputed images. Precomputed images could be procedural textures like clouds that are periodically recomputed and updated. Can be rotated for easy sunrise/sunset lighting (this is a particular advantage of single image background mappings). The background node, like all objects, can take more than one texture.

Note: The equivalent of VRML's directional light is an ordinary light attribute of an object positioned at infinity. The most convenient place for such lighting is in the background object.


torus

torus

cone

cone

hud

hud
Defaults to the optimal pixel-perfect setting for images and text, although it can be forced to other settings.

There are actually a few ways to do HUDs:

  • The image HUD can be simply a graphical layer on the screen.
  • Object HUDs don't need to have their motion corrected for movement because they are actually referenced to the screen.
  • held HUDs are more like the HUDs you can make in VRML, except that they are handled lower level, like objects that are carried and can be released. The carried object can be specified as part of a hierarchical system, but can be released to become an independant object.
  • (Those last 2 could actually prove to be the same thing.)

    The kind of HUD object is defined by the attributes of the command:

        // a simple graphical layer on the screen
        hud map image "ruler.png"

        // an object attached to the screen
        hud box size 0.1


    lsystem

    lsystem {<rule> <iterations>}
    
    l-system growth and fractal design must be basic elements of the language to allow efficient description of complex forms. The logic behind this is similar to allowing 'ball' or 'box' or 'cone'

    fractal

    fractal <rule> <iterations>
    

    blob

    blob
    



    intro   modes   commands   objects   attributes   parameters   timing   variables, constants   forces   todo

    Maintained by Miriam English