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

"box" - rectangular parallelpiped overview "sor" - surface of revolution

Basic Geometic Objects

Sample box

prism

prism
general syntax:
prism{ y1, y 2, n
      < x1, z1 >,
      < x2, z2 >,
      < x3, z3 >,
          ...
      < xn-1, zn-1 >,
      < x1, z1 >
      texture{ ... }
      }

By "y1" und "y2" are definded the start and end values of the ortogonal prism in y direction and "n" is the number of the following coordinates of the outline in the xz-plane. This outline is defined by a serie of coordinates of points
< x1, z1 >, < x2, z2 >, < x3, z3 >, ... , < xn-1, zn-1 >, < x1, z1 > in the xz-plan.
Please keep in mind: the last point of this outline has to be the same as the first point, this means that the line around the profile has to be closed! I.e. with 5 points you need to notate n = 6 coordinates, because the first point must be repeeted at the end!

To change the position and orientation of the prism, you have to "rotate<  ,   ,   >" and "translate< , , >" it.
Sample 1 prism 640x480
Sample 1:
// white prism
// at zero:
prism{ 0.00, 1.00, 4
   <-1.00, 0.00>,
   < 1.00, 0.00>,
   < 0.00, 2.00>,
   <-1.00, 0.00>
  texture{
    pigment{color White}
    finish {ambient 0.15
            diffuse 0.85}}
  }// end of prism
// violet prism
// right:
prism{ 0.00, 1.00, 4
   <-1.00, 0.00>,
   < 1.00, 0.00>,
   < 0.00, 2.00>,
   <-1.00, 0.00>
  texture{
    pigment{color Plum}
    finish {ambient 0.15
            diffuse 0.85}}
  rotate<-90,0,0>
translate<3,0,0>
   }//end of prism
//-----------------------
prism 1
Sample 1 prism 640x480
Sample 2:
// white prism
// at zero:
prism{ -2.00, 2.00, 6
   <-1.00, 0.00>,
   < 1.00, 0.00>,
   < 1.00, 1.00>,
   < 0.00, 2.00>,
   <-1.00, 1.00>,
   <-1.00, 0.00>
  texture{
    pigment{color White}
    finish {ambient 0.15
            diffuse 0.85}}
  }// end of prism
// violet prism
// right ---------
prism{ -2.00, 2.00, 6
   <-1.00, 0.00>,
   < 1.00, 0.00>,
   < 1.00, 1.00>,
   < 0.00, 2.00>,
   <-1.00, 1.00>,
   <-1.00, 0.00>
  texture{
    pigment{color Plum}
    finish {ambient 0.15
            diffuse 0.85}}
  rotate<-90,0,0>
  translate<3,0,0>
   }//end of prism
//-----------------------
prism 2




"box" - rectangular parallelpiped overview "sor" - surface of revolution

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