MathDL - The MAA Mathematical Sciences Digital Library
Search

Search Loci: Developers:

Keyword

  Advanced Search
The Mathematical Association of America
The National Science Digital Library Project
The National Science Foundation
Register Sign In

Loci: Developers

Creating Photo-realistic Images and Animations

by Michael Grady (Southern Utah Univ.)

3. The POV-Ray Scene Description Language

As we are about to see, the POV-Ray scene description language is well suited for creating mathematical images of all variety. For example, a dodecahedron is described as the union of 30 cylinders at certain locations with given surface properties. A mirror is described as a thin parallelepiped with 100% reflectivity. The viewpoint is given a precise location in 3-space, as are the light sources. And so on. Most of the thought process involved in creating a mathematical image can be characterized as visually-oriented mathematical thinking.

The scene in Figure 1 consists of a green semi-transparent sphere centered at the origin, with three perpendicular axes and a square plate lying in the xy plane. We will “begin at the beginning” in the next section, but for now let's see how this verbal description maps to the corresponding POV-Ray code:

A green semi-transparent sphere centered at the origin of radius 0.75:

sphere{ <0,0,0>, 0.75
   texture { 
      pigment{ color rgbt<0,1,0,0.5>}
      finish {diffuse .5 ambient .2 reflection .3 phong 0.5}
   } 
}

three gray perpendicular cylinders which represent our axes:

#declare axis = 
cylinder {<0,-3,0>,<0,3,0>,0.05
   texture{ 
      pigment{rgb<0.75,0.75,0.75>} 
      finish{ phong 1}
   }
}
object {
   axis
}
object {
   axis
   rotate< 0, 0, -90>
}
object {
   axis
   rotate<90, 0, 0>
}

a square, white, semi-transparent plate:

box {<-2, -2, -0.05>, <2, 2, 0> 
   texture {
      pigment{ color rgbt<0.9,1.0,0.9,0.5> }
      finish {diffuse .5 ambient .2 reflection .3 phong 1}
   }  
}

The more you work with POV-Ray, the more you are likely to find this mapping clear, efficient and effective.

Grady, Michael, "Creating Photo-realistic Images and Animations," Loci (October 2009), DOI: 10.4169/loci003351



Discuss this article

Be the first to start a discussion about this article.

start a new discussion thread

MathDL Homepage MathDL Homepage National Science Digital Library The Mathematical Association of America