Beschreibungen und Beispiele zum Raytracer POV-Ray von Friedrich A. Lohmüller Geometrische Körper in POV-Ray English Italiano Français

Home
- POV-Ray Tutorial

Geometrische Körper
Inhaltsübersicht

Objekte in "shapes3.inc"
- Segment_of_CylinderRing
- Segment_of_Torus
- Segment_of_Object
- Egg
- Egg_Shape
- Facetted_Egg
- Facetted_Egg_Shape
- Facetted_Sphere
- Ring_Sphere
>Column_N
>Column_N_AB
>Pyramid_N
>Pyramid_N_AB
- Round_Pyramid_N_out
- Round_Pyramid_N_in
- Round_Cylinder_Tube
- Rounded_Tube_AB
- Rounded_Tube
- Round_N_Tube_Polygon
- Round_Conic_Torus
- Round_Conic_Prism
- Half_Hollowed_Rounded_Cyl1
- Half_Hollowed_Rounded_Cyl2

Geometrische Körper aus meiner Include-Datei "shapes3.inc" ( ehemals "shapes_lo.inc"):

Column_N
Reguläre Säule mit N Ecken,
Reguläres, senkrechtes
n-eckiges Prisma
Syntax:
 ```object{ Column_N( N, Radius, Height ) //------ texture{ ... } } // end of object - ```
N >2 = Anzahl vertikaler Kanten,
Height = die Höhe der Säule in y.

Column_N_AB
 ```object{ Column_N_AB( N, Point_A, Point_B, Radius, ) //-------------- texture{ ... } } // end of object - ```

Pyramid_N
Reguläre n-eckige Pyramide,
auch Pyramidenstumpf.

Syntax:
 ```object{ Pyramid_N( N, Radius1, Radius2, Height ) //------ texture{ ... } } // end of object --```
N >2 = Anzahl vertikaler Kanten,
Height = die Höhe der Säule in y.
Pyramid_N_AB
 ```object{ Pyramid_N_AB( N, Point_A, Radius_A, Point_B, Radius_B, ) //--------------- texture{ ... } } // end of object --```
Beispiel:
 ```#include "shapes3.inc" object{ Column_N( 14, 1.8, 1.30 ) texture{ pigment{color rgb<1,1,1>} finish {phong 1} } // end of texture } // end of object ----------------```
 ```#include "shapes3.inc" //------------------ N,Point_A,Point_B,R object{ Column_N_AB( 8,<0,0.5,-1>,<1.5,1.5,-0.5>,0.45) texture{ pigment{ color rgbt<1,1,1,0.6>} normal { bumps 0.5 scale 0.005} finish { phong 1} } // end texture scale<1,1,1> rotate<0,0,0> translate<0,0,0> } // end of object ----------------```
Beispiel:
 ```#include "shapes3.inc" object{ Pyramid_N( 14, 1.8, 1.30, 1.00 ) texture{ pigment{color rgb<1,1,1> } finish {phong 1} } // end of texture } // end of object ----------------```
 ```#include "shapes3.inc" //------------------ N,Point_A,Point_B,R object{ Pyramid_N_AB( 8,<0,1,-1>,0.5,<1.5,1.5,-0.5>,0.25) texture{ pigment{ color rgbt<1,1,1,0.6>} normal { bumps 0.5 scale 0.005} finish { phong 1} } // end texture scale<1,1,1> rotate<0,0,0> translate<0,0,0> } // end of object ----------------```

Die Makros im Detail
 ```//------------------------------------- Pyramid_N() #macro Pyramid_N (N, Radius1, Radius2, Height) //------------------------------------------------ #local D= 0.00001; intersection{ #local Nr = 0; // start #local EndNr = N; // end #while (Nr < EndNr) // linear prism in z-direction: prism{ -2.00 ,2.00 , 5 //------------------------ <-2.00, 0.00>, < 1.00, 0.00>, < 0.00+Radius2/Radius1,1.00>, <-2.00,1.00>, <-2.00, 0.00> //turns prism in z direction: rotate<-90,0,0> scale<1,1,-1> scale rotate<0,Nr * 360/EndNr,0> } // end of prism ----------------------------- #local Nr = Nr + 1; // next Nr #end // ---------------- end of loop } // end of intersection #end // ------------------------------ end of macro```
Startet man das Makro mit = 1 wird eine degenerierte Schnittmenge
(intersection) von nur einem Prisma entstehen. N dieser Elemente müssen lediglich in 360/N Gradschritte um die y-Achse gedreht
werden und alle miteinander zum Schnitt gebracht werden:

 ```//----------------------------------- Column_N() #macro Column_N (N, Radius, Height ) //--------------------------------------------- object{ Pyramid_N (N, Radius, Radius, Height )} #end //--------------------------- end of macro```