Polygons


Polygons can be created using the "polygon" gprim.

"Polygon" requires the number of vertices, followed by the symbol 'P, followed by the list of vertices.

For example, the following creates a triangle.

  ox --> (polygon 3 'P '((1 0 0) (1 1 0) (0 1 1)))


ACCAD polygonal objects can also be read in using the function "accad-object" The function requires the filename of a ".obj" file.

For example:

  ox --> (accad-object "skull.obj")

Faceted vs. Smooth shading, and texture coordinates can also be specified using parameter lists. See the AL Reference Manual for details.


Return to Geometric Primitives
mrl