Build3D

This page allows you to define 3D objects from cubes / cylinders / pyramids (half cubes)

You can have up to 4 shapes, each starts as a unit cube at the origin. You define a series of transformations for that cube.

U,255;S,2,1,2;T,0,1,0 means cube intensity 255, scaled by 2,1,2 then translated by 0,1,0

L,0,128,128;S,1,3,4;R,0,90,0 means cylinder with the RGB values, scaled by 1,3,4 then rotated about Y axis by 90

P,255;S,2,1,2;T,0,1,0 means pyramid intensity 255, scaled by 2,1,2 then translated by 0,1,0

Also X,0,y,z means shear in X; Y,x,0,z means shear in Y; and Z,x,y,0 means shear in Z

Scene shown as wire frame shapes, back faces culling or solid shapes

The eye can be rotated around the scene. You can speed up or slow down.

'Painters' algorithm is used to determine the order in which the cubes are drawn. Furthest ones are drawn first. This is crudely done by finding distance of centre of each from eye. It works most of the time ... The distance of each cube is shown in the debug information. How can we make painters algorithm work all the time?

The colour is affected by the amount of light which shines on each surface. You can change the position of the light.

Shape 1

Shape 2

Shape 3

Shape 4

Use Light at

Remove Back Face Solid

Rotate eye