POV-Ray is an open-source 3D ray-tracing tool (check out the Hall of Fame for examples of its use). After listening to Peter Messmer’s excellent introduction to POV-Ray scene creation and seeing VisIt’s export to POV-Ray capability, I thought it wouldn’t be that hard to make an object graphics destination. To use it, create the scene as usual and then have the POV-Ray destination send its output to files for input into POV-Ray (the same as using IDLgrWindow).
The image shown is a direct export of a simple object graphics scene with an IDLgrPolygon (cow10.sav) with VERT_COLORS and SHADING=1, a directional light source, and a green IDLgrPolygon. Right now the POV-Ray destination supports ambient and directional lights, polygons, and surfaces. Only a few properties for polygons are supported: vertex colors, shading, and color. I’ll add more property and atom support as needed. The only problem right now is that POV-Ray uses a left-handed coordinate system, so I’m trying to think of the most elegant way to turn things around so that its scene matches the IDL scene.
I’m not sure what I’m going to do with the source code right now. I’ve added it to a “visualization library” that I’ve been using. Let me know if you are interested in trying it out.
UPDATE: it’s not hard to turn the POV-Ray output into a movie.

The main problem that programmers new to object graphics have is getting anything to appear on the screen (at least anything they recognize). Once you have your graphics appearing in a window, it’s pretty simple to change their properties, rotate them, make them dance the rhumba, etc.
This program is an example of using timer events to do a task in the background while allowing the the user interface to still respond to events. This technique requires the background task to be split into parts which are short enough for each part to complete quickly enough for a user to not notice a delay if he begins to interact with the interface. In other words, if each part of the task takes 0.1 seconds, then there is a potential delay of 0.1 seconds before the user interface will respond.
When rendering object graphics atoms with transparency, the order the atoms are rendered (i.e. the order the atoms are created and added to the hierarchy) determines what can be seen. You want to draw the atoms from back to front when the front items are transparent. The same principle holds true for iTools since they use object graphics.
A couple weeks ago, I wrote a
