Descriptions and Samples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Italiano Italiano
Français français
Deutsch Deutsch

"prism" overview "plane"

Basic Geometic Objects

Sample sor

"sor" = surface of revolution

"sor"
= surface of revolution

general syntax:
sor{ n,
      < x1, y1 >,
      < x2, y2 >,
      < x3, y3 >,
               ...
      < xn, yn >
      texture{ ... }
      }

Here "n" points < xi, yi >( i = 1 to n ) are used to define a outline of a body in the xy-plane. These points are conected by a spline curve. The body appears by a rotation of this line arround the y-axis.
By default this curve will be closed ortogonally to the y-axis, if we want to get an open body we have to add the statement "open".
Sometimes errors occure by the limited caculating accuracy, shown by holes in the surface of revolution. By adding the statement "sturm" it is sometimes possibe to reduce them (this forces povray to use the slower but more accurate algorithm of Sturm when calculating square roots).

To get another position and/or orientation of the surface of revolution you have to use "rotate<  ,   ,   >" and "translate< , , >" .
Sample 1 sor 600x450
Sample left:
// sor
// at zero (open, cut off a box):
sor{ 8, //n=8 Punkte!
   < 0.00, 0.00>,
   < 0.60, 0.00>,
   < 0.72, 0.44>,
   < 0.31, 0.93>,
   < 0.49, 1.26>,
   < 0.48, 1.35>,
   < 0.43, 1.56>,
   < 0.16, 1.60>
  open // <--------------!!!
  texture{
    pigment{color White}
    finish {ambient 0.15
            diffuse 0.85}}
  }// end of sor


//-----------------------
Sample right:
// sor
// right (closed):
sor{ 8, //n=8 Punkte!
   < 0.00, 0.00>,
   < 0.60, 0.00>,
   < 0.72, 0.44>,
   < 0.31, 0.93>,
   < 0.49, 1.26>,
   < 0.48, 1.35>,
   < 0.43, 1.56>,
   < 0.16, 1.60>
  translate<2,0,0>
  texture{
    pigment{color White}
    finish {ambient 0.15
            diffuse 0.85}}
  }// end of sor
//-----------------------

Hint: Why "sor" instead of "lathe" ?(the last one seems most times to be more flexible!)
By calculating intersections with "sor"-objects quadratic equations are necessary, by intersection tests with "lathe"-objects you need to calculate with equations of the 6th order. Quadratic equations are much faster and accurate to solve! Because of such objects have many parts of surfaces this is very important!





"prism" overview "plane"

© Friedrich A. Lohmüller, 2004
email email: (legacy email redacted)
homepage:www.f-lohmueller.de