Kapitel 3.3, POV-Ray Primitives, von Florian Fischer
Geometrische Primitives | Spline-Körper | Andere Primitives |
---|
NAME DES OBJEKTS | SYNTAX | |
---|---|---|
Quader (box) |
box{ <x1,y1,z1>, // Eckpunkt E1 <x2,y2,z2> // Eckpunkt E2 } | |
Kugel (sphere) | sphere{ <mx,my,mz>, // Koordinaten d.Mittelpunkts r // Radius } | |
Zylinder (cylinder) |
cylinder{ <x1,y1,z1>, // Mittelpunkt M1 <x2,y2,z2>, // Mittelpunkt M2 r // Radius [open] // Enden geöffnet? } | |
Kegel (cone) | cone{ <x1,y1,z1>, // Mittelpunkt M1 r1 // Radius r1 <x2,y2,z2>, // Mittelpunkt M2 r2 // Radius r2 // für echten Kegel 0 [open] // Enden geöffnet? } | |
Torus (torus) | torus{ r1, // Gesamtradius r2 // Radius des Rings } | |
Text (text) | text{ ttf "Schriftart.ttf" // Schriftart "Text" // Text zum Schreiben d, // Dicke der Buchstaben offset // wie weit auseinander } // (Normal: 0) | |
Scheibe (disc) ! 2D ! | disc{ <mx,my,mz>, // Zentrumskoordinaten <x,y,z>, // Normalvektor r1, // Gesamtradius r2 // Loch (wenn gewünscht) } | |
Ebene (plane) ! 2D ! ! unendl. Objekt ! |
plane{ <x,y,z>, // Normalvektor e // Verschiebung entlang } // des Normalvektors | |
Generell gilt: (falls die objektspezifischen Transformationsmethoden nicht ausreichen, sowie die Farbgebung: ) |
// Beispiel einer Kugel: sphere{ // Optionen der Kugel. <2,4,6>,2 // Jetzt die allgemeinen: translate <x,y,z> // Verschieben scale <x,y,z> // Größe ändern rotate <x,y,z> // Drehen pigment{Farbe} // Farbe definieren -oder - texture{Textur} // Vordefinierte } // Textur benutzen. |
Beispiel: | ||
# include "colors.inc" # include "textures.inc" // Demo für Primitive :-) camera { location <-5,7,4.5> look_at 0 angle 60 } light_source { <0,5,1> color White fade_distance 5 fade_power 2 } // Unterbau... plane{ y,-1.1 pigment{Blue} } | // und Aufbau! sphere{ // Die Zentralkugel <0,0,0>,1.5 pigment{color rgb 0.25} finish{ phong 0.8 phong_size 70 reflection 0.7 metallic } } box{ <-4,-1,-4>, <-2,1,-2> pigment{Red} } cylinder{ <0,-1,-3>, <0,1,-3>,1 pigment{Green} } cone{ <3,-1,-3>,1.2 <3,1,-3>,0.4 pigment{Yellow} } | torus{ 0.85,0.28 translate 3*x pigment{Magenta} } text{ ttf "timrom.ttf" "ff" 1,0 rotate <90,90,0> scale 1.8 translate <2,0,3.5> pigment{color rgb <0.6,0.6,1>} } disc{ <0,0,3>, y, 1, 0.4 pigment{Brown} } |
Klicken Sie auf das Sie interessierende Objekt, um nähere Informationen über es zu erhalten. |
Geometrische Primitives | Spline-Körper | Andere Primitives |
---|
NAME DES OBJEKTS | SYNTAX | |
---|---|---|
Rotationskörper (lathe) |
lathe{ [linear_spline | quadratic_spline | cubic_spline]// Welche Verbindung n, // Anzahl Punkte <x1,y1>, // Kontrollpunkt E1 <x2,y2>, // Kontrollpunkt E2 (...) <xn,yn> // Kontrollpunkt En } | |
Ausdehnungskörper (prism) |
prism{ [linear_spline | quadratic_spline | cubic_spline]// Welche Verbindung h1, // Von wo aus... h2, // nach wohin ausdehnen n, // Anzahl Punkte <x1,y1>, // Kontrollpunkt E1 <x2,y2>, // Kontrollpunkt E2 (...) <xn,yn> // Kontrollpunkt En } | |
Pyramidenförmiger Ausdehnungskörper (prism) |
prism{ [linear_spline | quadratic_spline | cubic_spline]// Welche Verbindung conic_sweep // Macht Pyramidenform h1, // Von wo aus... h2, // nach wohin ausdehnen n, // Anzahl Punkte <x1,y1>, // Kontrollpunkt E1 <x2,y2>, // Kontrollpunkt E2 (...) <xn,yn> // Kontrollpunkt En } |
Beispiel: | |
// ==== Spline-POV-Ray-Demo ==== // Kamera erstellen camera { location <-8.0 , 5.0 ,-12.0> look_at <5.0 , 4.0 , 0.0> } // Normales Licht light_source { <-30,0,-5> // Lichtposition color White // Lichtfarbe } // Rotationskoerper lathe { linear_spline 6, // Punktanzahl <0,0>, <2,0>, <4,2>, <4,3>, <3,4>, <0,2> // Punkte E1 - E6 pigment{color rgb<1,0,0>} } | // Ausdehnungskoerper prism { linear_sweep // gerade Form linear_spline -0.5, // h1 0.7, // h2 5, // Punktanzahl <0,2>, <1,1>, <2,-1>, <0,-1>, <-1,1> //Punkte E1 - E5 pigment{color rgb<0,1,0>} scale 5 rotate 50*z translate<20,-2,-2> } // pyramidenfoermiger Ausdehnungskoerper prism { conic_sweep // kegelige Form linear_spline 0.3, // h1 1.0, // h2 4, // Punktanzahl <0,0>, <2,0>, <2,-1>, <-1,-2> //Punkte E1 - E4 pigment{color rgb<0.6,0.6,1>} scale 5 rotate 90*y translate<7,3,1> } |
Klicken Sie auf das Sie interessierende Objekt, um nähere Informationen über es zu erhalten. |
Geometrische Primitives | Spline-Körper | Andere Primitives |
---|
Blob (blob) |
SYNTAX:blob{ threshold t // Oberfläche sphere{ <cx,cy,cz>, // Mittelpunkt r, // Radius s // Stärke (am besten 1 oder -1) } cylinder{ <cx,cy,cz>, // Mittelpunkt M1 <mx,my,mz>, // Mittelpunkt M2 r, // Radius s // Stärke (am besten 1 oder -1) } } | |
Beispiel:camera { location <0.0 , 5.0 , -4> look_at <0.0 , 0.0 , 1.5> } light_source { 0*x // Lichtposition color red 1.0 green 1.0 blue 1.0 // Farbe translate <-20, 40, -20> } blob { threshold 0.6 sphere { <-2, 0, 0>, 3.4, 1} sphere { < 2, 0, 0>, 3.4, 1} sphere { < 0, 0,3.5>, 3.4, 1} pigment{color rgb < 1,0.5,0.2>} finish{diffuse 0.8} } | ||
Fraktale sind in POV-Ray vierdimensionale Körper, die nach komplexen mathematischen Formeln berechnet werden. Dabei werden auf alle einer dreidimensionalen Ebene durch das Fraktal liegenden Punkte, die sich nach Ablauf der Iterationen noch innerhalb einer 4D-Kugel mit Radius 4 befinden, dargestellt. - Fraktale haben zwar weder eine besonders eingängige Form noch sind sie als realitätsnahe Objekte in einer Szene verwendbar... aber sie sind trotzdem schön, oder?
Fraktal (julia_fractal) |
SYNTAX:julia_fractal{ <jx,jy,jz,jt> // 4D-Julia-Parameter [quaternion | hypercomplex] // Welche komplexe // Mathematik verwenden? [sqr | cube | ...] // Welche Funktion verwenden? max_iteration m // Wieviele Iterationen? precision p // Schätzgenauigkeit slice <sx,sy,sz,st>,e// Lage der 3D-Ebene } | |
Leider ist keine grafische Darstellung der Parameter möglich, da sie mathematischer Art sind. | ||
Beispieljulia_fractal{ <-0.083,0.0,-0.83,-0.025> quaternion sqr max_iteration 8 precision 15 pigment{color rgb <1,0.3,0.3>} finish{diffuse 0.8} } |
Zurück zur VR-AG-Hauptseite | Zum vorherigen Vortrag | Zum nächsten Vortrag |