// Kamera camera { sky <0,0,1> // Vektor, der festlegt, wo oben ist. right <-4/3,0,0> // Bildverhaeltnis 4:3, plus Spiegelung für rechtsdrehendes System location <10,0,0> // Position der Kamera look_at <0, 0, 0> // Blickrichtung (erscheint im Bildmittelpunkt) angle 35 // Oeffnungswinkel der Kamera } // Lichtquellen light_source { <60,-20,80> // Position des Lichts color rgb <1,1,1> // Farbe des Lichts, als rot-gruen-blau Vektor (Komponenten 0 bis 1) } light_source { <30,100,30> // Position des Lichts color rgb <1,1,1> // Farbe des Lichts, als rot-gruen-blau Vektor (Komponenten 0 bis 1) } // yz-Ebene plane {x,0 pigment { checker color rgb 0.2 color rgb 0.9 } } // y,z-Achse union { cylinder { -2*y, 2*y, 0.05 } cylinder { -2*z, 2*z, 0.05 } cone {2*y, 0.1, 2.3*y, 0 } cone {2*z, 0.1, 2.3*z, 0 } text { ttf "timrom.ttf" "y" 0.1, <0,0,0> rotate 90*x rotate 90*z translate 2.3*y } text { ttf "timrom.ttf" "z" 0.1, <0,0,0> rotate 90*x rotate 90*z translate 1.8*z+0.2*y } pigment { color rgb z } finish { phong 0.95 } } // Berechnet den Funktionswert an der Stelle xx (x ist schon definiert) #macro meinf(xx) xx*xx-2 // Wert der Funktion #end #declare starty=-2; #declare endy=2; #declare n=100; #declare dy=(endy-starty)/n; #while (starty, 0.02 pigment { color rgb x } } #declare starty=starty+dy; #end