Creating wireframe hiddenline images with Radiance

One problem we have encountered is that if we create a model "by hand"
with Radiance (as opposed to using a 3D modelling package and then a
translator) then we are often disappointed that there is no way of
creating a wireframe hiddenline version, plans, elevations, perspectives etc.

After a little playing I have found a way of doing this, the procedure is
explained below.

1) xform -e the model so that you have a file consisting only of 
   Radiance primitives.

2) Run the short (and messy) program supplied with this archive. It 
   creates a new Radiance file where each primitive has a separate
   colour (color for the US) and there are no light sources, textures, etc.

3) Render the model to a large size bitmap. This
   will result in an image with flat shading on each primitive, and each
   one will be a different colour. In other words there is a transition
   or edge between each primitive.

4) Run some edge detection over the resulting image. We use PhotoShops
   "find edges"

5) Convert to grey scale, possibly invert and adjust the levels of the 
   image (depends on the edge detection used) and then when a suitably
   high contrast image is obtained convert to a black and white bitmap.

I have enclosed 
wirerad.c    source to colour primitives
bill.rad     example scene
wire.rad     output of bill.rad after colourization
wire.tif     run this for image generation
wire.tif     example wireframe image from above example
wire.sh      script for generating wireframe image

Oh well, it was fun and someone else may find it useful.
