Drawing Primitives

I have split the primitives in three categories: planes, curved surfaces and solid bodies. In addition to the drawing primitives, there will be a discussion of the use of textures.

Planes

Triangle
Three corners (points).
Corner (point), two sides (vectors).
Parallelogram
Corner (point), two sides (vectors).
Ellipse or elliptical ring
Centre (point), major and minor axes (vectors), open fraction (scalar).

Curved surfaces

Ellipsoid wall
Centre (point), three axes (vectors), latitude and longitude range (scalars).
Cylinder wall (possibly twisted)
Ends (point + 2 vectors), angle range (scalars).

Solid bodies

Tetrahedron
Four corners (points).
Corner (point), three sides (vectors).
Box
Corner (point), three sides (vectors).
Ellipsoid
Centre (point), three axes (vectors).
Cylinder
Ends (point + 2 vectors).

Textures

The option to use a pixmap instead of a single colour when drawing a surface can make it easier to create patterned parts and stickers. I would allow textures to be applied to all surfaces, but we have to chose how to map the coordinates of the texture to the surfaces.

Triangle and parallelogram:
Both of these are spanned by two vectors that could act as the axes of the texture coordinate system. The half of the texture that is outside the triangle will be ignored.
Ellipse:
I am tempted to use radius and angle as coordinates, but it would be too difficult to map. Using the major and minor axes as axes for the texture coordinate system is probably the most sensible. The texture will be clipped outside the ellipse.
Ellipsoid wall
Cylinder wall

We could as a starting point use PGM files for the textures, and map the intensity values to LDraw colour numbers.

For ordinary (LEGO) purposes it should be sufficient to be able to apply textures to surfaces, but I have been considering to implement a "box map" (3D pixmap).

-- 

Jacob Sparre Andersen.