POV-Ray

and icosahedral kaleidoscopes



POV-Ray (or, Persistence of Vision raytracer) is a remarkable free ray-tracing application in which photo-realistic three-dimensional scenes may be created and rendered. It is available on all major computer platforms; visit the Macintosh POV-Ray homepage, and download the latest Mac version, or go the the Official POV-Ray site. There is also an unofficial compile of POV with extended capabilities, and somewhat faster trace times, available. This is the version I use.

POV has been a collaborative labor of love, with many contributors, working to refine the program over a period of nearly ten years. Visit the sites above for more information about POV.

For POV code to create arbitrary regular and irregular star polygons, with spheres on the vertices and cylinders on the edges, go here. Or, download a "macro" does the same thing. Yes, POV has its own programming language!

By way of a brief description, imagine first that you have a coordinatized 3-space, every point defined by an {x,y,z} triplet of real numbers. Within this 3-space you define geometric primitives such as spheres, triangles, cones, cylinders, planes, and so on. The 3-space may be illuminated by any number of lights, and any object may have any kind of surface attributes. For instance, a sphere might be made of shiny gold, or of some kind of marble. Within the 3-space, at some {x,y,z} point, you may place a camera. It points at some other {x,y,z} point and has whatever lens attributes, wide angle, or telephoto, you desire. The camera, then, may point at a scene containing spheres or polyhedra or planes or whatever, and the scene is lit by lights.

The crucial idea of ray-tracing is that between the camera and the scene you set up a kind of window screen, divided into thousands of little square holes. This window screen will become your rendered, ray-traced image. From the camera, through each and every one of the little holes in the screen, you shoot a ray into the scene. What does it hit, if anything? Perhaps a sphere. Then, depending upon how the sphere is lit, what its surface attributes are, and many other factors, the color of that spot is calculated. One pixel of your rendered image has been found. In the process, a regular blizzard of sines and cosines has been conjured up. It is all rather stupendous and almost unbelievable.

I use POV to render landscapes, virtual terrains composed of millions upon millions of triangles, derived from USGS DEM data. I also use it to render images of polyhedra, and solid sections of four-dimensional polytopes. One of the more unusual uses of POV relies upon its ability to calculate reflections. The regular (Platonic and Kepler-Poinsot) polyhedra in 3-space exemplify three symmetry groups, the tetrahedral, octahedral, and icosahedral groups. It happens that such a symmetry group is characterized by a fundamental region, and that reflections in the walls of this fundamental region generate the symmetries of the group.

So, I made what is called a trihedral kaleidoscope, a kind of baseless pyramid made of mirrors, with the three triangular faces inclined at just the proper angles to one another. An object placed within this kaleidoscope is replicated under reflections of the symmetry group. Here is an example from the icosahedral group. A torus was passed partly within the trihedron, the camera was also placed within, and behind the camera a textured plane was placed. The torus fragment is lit by one light source farther out in the trihedron, and one farther in. It is important to note that, in this image, only a small part is real; most of what is seen is generated by reflections, in the walls of the icosahedral kaleidoscope.



Here is the POV scene file which created the above image (copy and paste it into a plain text file, such as POV or SimpleText, to use it in POV):


/*Icosahedral kaleidoscope scene file by Russell Towle*/

#version 3.0 // use POV-Ray 3.0 syntax
#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "metals.inc"

#default { texture { pigment {color rgb <1,1,1>} finish {ambient 0.2 ambient 0.6} }}

global_settings { max_trace_level 20}

/*the origin and three unit vectors*/
#declare T0 = <0,0,0>
#declare T1 = <0, 0, 1>
#declare T2 = <0.49112, 0.35682, 0.79465>
#declare T3 = <0.16246, 0.5, 0.85065>

camera {
location (T1+T2+T3)*4.5 //location
direction <0, 1, 0> //.75 wide angle
up <0, 0, 1>
right <3/3, 0, 0> //aspect ratio, width/height
sky <0., 0., 1.>
look_at <0., 0., 0>
rotate<1,1,1> //avoids rendering artifacts from the commutative reflections
}

light_source {<0.458, 0.587, 2.0> *5 color rgb <1, 1, 1> }
light_source {<0.458, 0.587, 2.0> /2 color rgb <1, 1, 0> }

 

#declare TRI = union{
triangle {T0 T1 T2}
triangle {T0 T1 T3}
triangle {T0 T2 T3}
}

#declare F1 = finish{ ambient .2 diffuse .4 reflection .1 }
#declare F2 = finish{ ambient .2 diffuse .4 reflection 1 }
#declare F3 = finish{ ambient 0 diffuse 0 reflection 1 }

 

object{TRI
texture{
pigment{color rgb <.5, .5, 1>}
finish{ F3 }
}
scale 30} //scale up the kaleidoscope


torus {
2, 1 //major, minor radii
sturm
texture{
pigment {
agate
color_map {
[0.000 color rgbft <0.0, 0.0, 0.0, 0.0, 0.0 > ] //black
[0.100 color rgbft <0.0, 0.0, 0.5, 0.0, 0.0 > ]
[1.000 color rgbft <1.0, 1.0, 1.0, 0.0, 0.0 > ] //white
}
}
finish{Shiny}
scale <.5, .5, 1>
//translate<0, 0, clock/40>//for an animation
}

rotate<90, 0, 0>
translate<0, 0, 4>
}

 

sphere{<0,0,0>, 25
texture{
pigment {
bozo
color_map {
[0.000 color rgbft <0.00, 0.0, 0.0, 0.0, 0.0 > ] //black

[1.000 color rgbft <1, 1, 1, 0.0, 0.0 >/2 ] //white
}
}

scale <1, 2, 1>}
rotate <clock, 0, 0>//for an animation
}



Gallery of POV images

Back to Russell Towle's homepage

Contact me