// Kamera camera { sky <0,0,1> // Vektor, der festlegt, wo oben ist. right <-4/3,0,0> // Bildverhältnis 4:3, plus Spiegelung für rechtsdrehendes System location <5,1,3> // Position der Kamera look_at <0, 0, 0> // Blickrichtung (erscheint im Bildmittelpunkt) angle 30 // Öffnungswinkel der Kamera } // Lichtquellen light_source { <6,-2,8> // Position des Lichts color rgb <1,1,1> // Farbe des Lichts, als rot-grün-blau Vektor (Komponenten 0 bis 1) } light_source { <3,10,3> // Position des Lichts color rgb <1,1,1> // Farbe des Lichts, als rot-grün-blau Vektor (Komponenten 0 bis 1) } // Boden plane { z,-1 // Ebene, senkrecht zu z=<0,0,1>, mit Abstand -1 zum Ursprung pigment { // Schachbrett, durchsichtig (t steht für transmit, hier 80% lichtdurchlässig checker color rgbt <1,1,1,0.8>, color rgbt <0.2,0.2,0.2,0.8> } } #declare n=700; // Anzahl Schritte #declare i=0; // Variable, die im while-loop hochgezaehlt wird #while (i, 0.1, 0.3*z, 0 // Kegel vom Nullpunkt mit Spitze auf z-Achse // Farbe. Sinus, Cosinus erwarten Argumente in Radiant (2*pi entspricht 360 Grad) pigment { color rgb <(cos(i*2*pi/n)+0.3)/2, (cos(i*2*pi/n+2*pi/3)+0.8)/2, (cos(i*2*pi/n+4*pi/3)+1)/2> } // Ein bisschen Transformationsmagie... rotate i/n*9980*x translate y * (i*2/n) rotate i/n*8900*z // Weil's halt schoen ist. finish { phong 0.95 reflection 0.99 conserve_energy } } // Ende des Kegels #declare i=i+1; // Erhoehe die Variable i um 1 #end //while torus {1.00, 0.01 pigment {color rgb x+y} // gelb rotate 90*x translate <0.07,0,-0.02> rotate 3*x rotate -0.5*y }