Demo 3D scene

This page illustrates Drawing 3D Objects on the screen

Different cuboids are shown: solid, wire frame or wire frame with back faces not shown.

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

You can opt for four cubes, a pseudo robot made from cuboids, whose head and arm rotate, or a pseudo crane which rotates. If you select use cylinders, some cuboids are drawn as pseudo cylinders.

Each cuboid starts as a unit cube, and is then transformed using scaling, translation. rotation and shearing operations. Can you work out which?

'Painters' algorithm is used to determine the order in which the cubes are drawn, furthest ones first. This is crudely done by finding distance of centre of each from eye - it works most of the time ... 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.

Light x,y,z

Transform x,y,z

Remove Back Face Solid

Show 'Robot' Show 'Crane'

Use Cylinders Use Light

Rotate eye