Ray Tracing for Meccano

Meccano Illustration using computer simulation

by Alan Jardine and Michael Adler

Ray Tracing is the creation of photo-realistic scenes through the use
of mathematical equations.

Consider a simple, real-life scene. It is a white billiard ball, illuminated
by a white light. There is an observer (you) - or a camera - in the room.
What does this scene actually mean? Simply, that the light is shooting out
countless light "rays", some of which strike the billiard ball. Of those,
some are reflected in the direction of the observer/camera. (Most go
elsewhere and are of no interest to us.)

This is a situation that easily lends itself to computer simulation
techniques. You set up a few objects on a computer - the light source, the
billiard ball and the observer. Then you cause the the light source to shoot
rays around the scene (simple 3-D maths). Rays that strike the ball and are
reflected back to the observer are traced and recorded on the resulting
image.

In fact, it's very wasteful to trace rays FROM the light source TO the
observer, since so few of them reach the observer. Thus, modern ray tracers
operate in reverse, tracing rays backwards from the observer, through the
scene and back to the light source.

If you change the white ball to a red one, then the ray tracer has to work
out the maths for subtracting all colours BUT red from the light rays at the
point of reflection on the ball's surface. And so on. By correctly modelling
aspects such as the shininess, reflectivity and roughness of the ball, you
can build up a photo-realistic scene.

By changing the red ball to a nickle-coloured strip, rounding the ends and
drilling holes in it at 1/2" intervals, you can ray-trace your first Meccano
part:





The idea then is to find suitable software to create Meccano parts as
ray-traceable objects. There are at least two programs which will do this.
The least expensive (because it is freeware!) is called POV-Ray (for
Persistence of Vision Ray-tracer. Version 3.1 of POV-Ray (the most suitable
for learning purposes) can be downloaded from http://www.povray.org/
(Version 3.1 for Windows is around 5 Mbytes.)

Another program is called ProDeskTop from ptc corporation, which is a
sophisticated CAD program. While a free version can be obtained from
http://www.ptc.com/ be warned that it is a very large program that requires
quite powerful computer resources to run. (It takes AGES to download the 34
Mbyte program file!). Unfortunately, the free version does not implement
full photo-realistic ray-tracing - only a limited technique called Gouraud
shading. This is more than adequate, however, for creating 3-D engineering
drawings for modelling purposes - as Anthony Els' work shows.

Over the past few years, Alan Jardine in Scotland <alan@ajardine.cix.co.uk> and Anthony Els in South
Africa have been (independently) building their own "virtual" Meccano
Ten-Sets in, respectively, POV-Ray and ProDeskTop,

Here is an example of Ray Tracing which has been produced by Alan Jardine 


An Intermittent Drive Mechanism using Povray  

Competition class examples of ray tracing can be found at http://www.irtc.org/


April 2002


return to mainpage