// 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 <10,10,10> // Position der Kamera look_at <0, 0, 0> // Blickrichtung (erscheint im Bildmittelpunkt) angle 20 // Ö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=100; // 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*4*pi/n)+1)/2, (cos(i*2*pi/n+2*pi/3)+1)/2, (cos(i*2*pi/n+4*pi/3)+1)/2> } // Ein bisschen Transformationsmagie... rotate i/n*360*x translate y*i/n*1 rotate i/n*1180*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 #declare Ball = torus {1, 0.01 pigment {color rgb <7,7,7>} rotate 90*x } #include "stars.inc" //------------------------ sphere{ <0,0,0>, 1 texture{ Starfield1 } // 1, 2, ... , 6 scale 10000 } //end of sphere ----------------------- //---------------------------------------------