Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller Geometric Shapes in POV-Ray Italiano Français Deutsch

Home
- POV-Ray Tutorial

Geometric Shapes
Index
Basic Shapes
- sphere
- cylinder
- cone
- torus
- box
> prism
- plane
- sor
- lathe
- superellipsoid
- ovus

Shapes by macro + CSG
Shapes in "shapes3.inc"
Other Shapes by macros
3D text shapes
other Shapes
Non CSG Shapes
height_field + HF macros
Isosurfaces

# 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:
 ```// 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} } // texture }// 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} } // texture rotate<-90,0,0> translate<3,0,0> }//end of prism //-----------------------```
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 //-----------------------```

 © Friedrich A. Lohmüller, 2010 www.f-lohmueller.de top