This routine helps you make 3D pictures from your data, using the public domain 3D rendering routine POV-Ray. See also:
POV-Ray is a standalone program that runs on a variety of operating systems. The mkpov routine generates a text file that is interpreted by POV-Ray to produce a picture. mkpov has a variety of options to help you make a nice picture. POV-Ray is a powerful program and can make beautiful and realistic pictures. Having it simply draw spheres is vast overkill, but it works. Furthermore, it makes it easy to change the color & size of each sphere individually.
center of data at: 11.0000 11.0000 30.0000 camera at: 11.0000 11.0000 64.0000IDL> $x-povray +Iimg01.pov +D 2>err
The mkpov command creates the file "img01.pov". The last command calls the linux routine x-povray which generates the picture. This is a three-dimensional Lissajous figure. Larger values of x are at the left of the picture. Larger values of y are at the top of the picture. Larger values of z are closer to you.
mkpov keywords: (Brief listing here, see examples below)
Starting with the array pts defined in the first
Here I've made an array col which is in one-to-one correspondence with the data array (pts). I've filled it with greyscale values between 0 and 1, or in this case, actually between 0.2 and 0.8. Also, I've used the /nobox keyword to turn off the bounding box.
To be more colorful:
IDL> $x-povray +Iimg03.pov +D 2>err
Now I'm using the program bw2rgb which converts an array of greyscale values into red/green/blue values. (Here, my greyscale array is the original t array defined in the first example at the top of this page.)
IDL> $x-povray +Iimg04.pov +D 2>err
bw2rgb2 has slightly more intense colors.
IDL> $x-povray +Iimg05.pov +D 2>err
bw2hotcold maps 0 to blue, 1 to red.
Changing particle size:|
Here I've defined the array rad which specifies the radius of each particle. The units for radius are the same as the input data.
Changing camera angle:|
I've moved the camera to a larger x value and slightly smaller z value. This is sort of like rotating the image to the right. See also the next example.
Changing the box margin:|
I've moved the camera again, further away and closer to the original angle; and also added a margin of 2 units to the box size.
Slightly different camera angle:|
I've moved the camera again.
POV-Ray input files from examples above: