// 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 <4,1,5> // 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=5000; // Anzahl Schritte #declare i=0; // Variable, die im while-loop hochgezaehlt wird #while (i, 0.1, 0.15*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)+1)/2, (cos(i*2*pi/n+2*pi/3)+1)/2, (cos(i*2*pi/n+2*pi/3)+1)/2> } // Ein bisschen Transformationsmagie... rotate i/n*1080*x translate y*(i*1/n)-(3*z*(i/n)) rotate i/n*1080*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, 0.01 pigment {color rgb <1,1,1>} // weiss rotate 90*x }