The magazine of the Melbourne PC User Group

Still loco about POV-ray
Ken Holmes

The August article featuring the POV-Ray animation of Stephenson's "Locomotion" received your generous acceptance, so I'm pushing my luck with another. Version 3 of POV-Ray is now available; I obtained the DOS version (POVMSDOS.EXE), its source code (POVMSD_S.ZIP), and the Windows version (WINPOV3.EXE) from the Internet; the OS/2 version is also available. The basic source is ftp.povray.org/pub/Official/ but there are Aussie mirrors; the main one is ftp.plaza.aarnet.edu.au/pub/ - however, I had more success at ftp.uwa.edu.au/pub/. I could not connect to une.edu.au/pub/FreeBSD/ or to tas.gov.au/FreeBSD/, and did not try unsw.edu.au/pub/mac/graphics/ because of that scottish reference. You can download "Hall of Fame" pictures, the best efforts of the past, or the entries in the monthly competitions, still or animation. You can of course submit entries. Also it offers other raytracing programs and utilities.

I used the DOS version for this as DOS batch files can process the stereo animations. I haven't yet tried the Windows version to handle these - a major benefit would be having use of the computer while rendering; also you can produce (non-stereo) animations without batch files. Christopher Cason, a Melbournian, produced the Windows version; he says that a few minor items need completion in due course. I noted that some of the hypertext links in the help files did not respond but it is complete enough to attract Windows devotees to ray tracing.

The original "Puffing Billy" met my criteria as a subject - plenty of visible moving bits and ingenious linkage and control mechanisms. If you haven't read much about early locos, you would find it most enjoyable to do so; some were successful and some were not, but it is fascinating to see how the limitations of materials and metalworking processes were overcome. "Puffing Billy" was developed by Blacket and Hedley at the Wylam Colliery in 1814; a second similar machine was named "Wylam Dilly" (no kidding) and, a third, more prosaically, "Lady Mary." It is worth noting that these machines served for about 50 years, with some modifications, and the first two are preserved in London and Edinburgh museums.

It is interesting to compare "Puffing Billy" with "Locomotion," 11 years later. The top rocking beams are fore and aft with connecting rods attached near their centres, driving a crankshaft between front and rear wheels, with right and left cranks 90 degrees out of phase. A gear wheel on the crankshaft drives through idlers to both axles which rotate at twice crankshaft speed. The linkages for the beams are quite neat; to keep the rear of the beam directly above the cylinders, pivotting rods connect the centre of the beam to a fixed framework at a point directly above the cylinder so that they "scissor" with the rear half of the beam. Naturally, the horizontal location of the front end of the beam varies fore and aft by an inch or two as the beam oscillates, so it is supported on a vertical pivotting frame which allows this but constrains its location vertically; this front frame oscillates at twice the frequency of the beam (similar to the central framework on "Locomotion").


A vertical drive rod towards the front of the left beam operates a water pump down at mid-boiler level. Towards the rear of both beams are vertical rods which each have two "knockers" attached which, near top dead centre and bottom dead centre, flip control levers up or down. Steam slide-valve rods are attached to the levers behind their fulcra with, no doubt, the left beam controlling the right steam valve, and vice versa. Handles at the rear of each lever allow the driver to slide the levers fore and aft through their fulcra to change the ratio between lever and steam valve movements, to give speed control. He could also disengage the levers from the "knocker" rods and manually control both steam valves for starting and stopping. Must have been a neat trick grabbing those moving handles, but apparently some drivers could even drive in the dark. The animation makes this action easier to see.

As it had a double pass firetube in the boiler, the fire door is at the same end as the stack, i.e. the front, so the water tank and coal tender is also there. At least it didn't have a tender behind - Sorry! 1930s comic record joke, 78 rpm, possibly Arthur Askey (someone will ring me!) There probably was not much talking on the job by the driver and fireman, separated by some noisy, crude gearing and the exuberant puffing off the steam-assisted draught which earned its name. The vertically bouncing steam pistons, well off centre, and in quadrature, produced a characteristic rock and roll which was probably more obvious than the beloved burbles of Ford V8s and Veedubs. The pioneers were diligent patenters of all features of their creations; Stephenson certainly managed to avoid most of Puffing Billy's mechanical configurations, and later tied up many of his own.

D.I.Y.

By the time you read this, the BBS will have a file, PUFFINGB.LZH [586 KB], containing a stereo animation, the .POV file, the batch files and the method of producing the animation; ie. similar to LOCOMOTN.LZH. You need at least a 1 MB video card to play it on the 1024 x 768 SVGA screen. I've chosen to show a stripped down model (to show the gearing) with a complete one. In all, there are 2200 objects such as cylinders, cones, boxes, nuts and rivets in the file, but POV-Ray just munches away, producing the ten frames for the 1024 x 384 animation in two hours. You could modify the .POV files and batch files to rust the metal, change the clouds or produce higher resolution stills or non-stereo animations, as you fancy; I've produced an animation of both "Locomotion" and (one) "Puffing Billy" which well illustrates their similarities and differences. If enough of you are interested, it could go onto the BBS. I like the natural-looking clouds which, in stereo, disappear over the far horizon. They are calculated mathematically and faithfully reproduce in every frame - a rather basic requirement for animations. These barely scratch the surface of the tools provided by POV-Ray to try to match the delights of our glorious atmosphere, sunlight and water vapour - hazes, fogs, sunsets, storms and even rainbows. Much could be done to "rough up" the textures to get more weathered wood and metal; these locos are much too pristine and modellish. For some subjects, it would be preferable to disguise the precision of the results with haze, blur and distortion to get a warmer feel, even to the extent of impressionism. The tools are there and all it needs is time and application.

Reprinted from the November 1996 issue of PC Update, the magazine of Melbourne PC User Group, Australia

[About Melbourne PC User Group]