// Festlegung der Kamera, Lichtquellen, Texturen, Koordinatensystem // Datei: vorlage.inc // A. Filler, 2003-2007 // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // Beschreibung der Kamera // --------------------------------------------------------------------------- camera { orthographic location <60*intervall*cos(winkel*pi/180), 5*hoehe*intervall, 60*intervall*sin(winkel*pi/180)> right x*4/3*2.7*intervall up y*2.7*intervall look_at <0.0, -intervall/10, 0.0> } // --------------------------------------------------------------------------- // Lichtquellen // --------------------------------------------------------------------------- light_source { <2.5*intervall, 2*intervall, -5*intervall> color rgb <1, 1, 1> } light_source { <0,10*intervall,2*intervall> color rgb <1, 1, 1> } // --------------------------------------------------------------------------- // Definition von Materialien und Oberflächen (Texturen) // --------------------------------------------------------------------------- #include "colors.inc" #include "textures.inc" #include "stones1.inc" #include "metals.inc" #include "golds.inc" #include "skies.inc" #include "stars.inc" #include "stones2.inc" #include "woods.inc" #declare holz = DMFWood6; #declare stein = T_Stone9; #declare silber = T_Silver_1C; #declare gold = T_Gold_2C; #declare blau_matt = texture { pigment { color rgb < 0.3, 0.3, 1.0> } finish { ambient 0.2 diffuse 0.7 phong 0.2 phong_size 20 reflection 0 } }; #declare gelb_matt = texture { pigment { color rgb < 0.9, 0.9, 0.2> } finish { ambient 0.2 diffuse 0.7 phong 0.2 phong_size 20 reflection 0 } }; #declare blau_glanz = texture { pigment { color rgb < 0.1, 0.1, 1.0> } finish { ambient 0.05 diffuse 0.3 phong 0.4 phong_size 50 reflection 0.4 } }; #declare gelb_glanz = texture { pigment { color rgb < 0.9, 0.9, 0.2> } finish { ambient 0.15 diffuse 0.4 phong 0.4 phong_size 50 reflection 0.3 } }; #declare rot_matt = texture { pigment { color rgb < 1, 0.2, 0.2> } finish { ambient 0.2 diffuse 0.7 phong 0.2 phong_size 20 reflection 0 } }; #declare rot_glanz = texture { pigment { color rgb < 1, 0, 0> } finish { ambient 0.05 diffuse 0.3 phong 0.4 phong_size 50 reflection 0.4 } }; #declare gruen_matt = texture { pigment { color rgb < 0.15, 1, 0.15> } finish { ambient 0.2 diffuse 0.7 phong 0.2 phong_size 20 reflection 0 } }; #declare gruen_glanz = texture { pigment { color rgb < 0, 1, 0> } finish { ambient 0.05 diffuse 0.3 phong 0.4 phong_size 50 reflection 0.4 } }; #declare mattweiss = texture { pigment { color rgb < 1, 1, 1> } finish { ambient 0.6 diffuse 0.4 phong 0 reflection 0 roughness 0.8 crand 0.03} }; #declare schwarz = texture { pigment { color rgb < 0.1, 0.1, 0.1> } finish { ambient 0.7 diffuse 0.5 phong 0.05 phong_size 15 reflection 0 roughness 0.8 crand 0.1} }; #declare silbergrau = texture { pigment { rgbt<0.3,0.3,0.3,0> } finish { ambient 0.0 diffuse 0.2 reflection 0.4 brilliance 1 specular 0.4 roughness 0.1 }}; #declare blau_transp = texture{ pigment{rgbf<0.4,0.4,1,0.4>} finish{ ambient 1.0 diffuse 0.8 phong 0 reflection 0.0} } ; #declare gruen_transp = texture{ pigment{rgbf<0.4,1,0.4,0.4>} finish{ ambient 1.0 diffuse 0.8 phong 0 reflection 0.0} } ; #declare rot_transp = texture{ pigment{rgbf<1,0.4,0.4,0.4>} finish{ ambient 1.0 diffuse 0.8 phong 0 reflection 0.0} } ; #declare gelb_transp = texture{ pigment{rgbf < 0.9, 0.9, 0.2, 0.4>} finish{ ambient 0.5 diffuse 0.6 phong 0.1 reflection 0.0} } ; #declare schachbrett = texture { pigment { checker color rgb < 0.7, 0.7, 1 >, color rgb < 0.2, 0.2, 0.2 > } finish { ambient 1.0 brilliance 2 diffuse 0.7 metallic specular 0.90 roughness 1/20 phong 0.45 reflection 0 } scale intervall*0.5 }; // --------------------------------------------------------------------------- // Makro für die Darstellung eines Koordinatensystems mit Achsenbezeichnungen und Skaleneinteilung // --------------------------------------------------------------------------- #macro koordinatensystem ( achsenlaenge ) #declare kstextur = texture { pigment { rgb<0.1,0.1,0.3> } finish { ambient 0.0 diffuse 0.1 reflection 0.1 brilliance 1 specular 0.3 roughness 0.2 } } ; #declare KSFont="cyrvetic.ttf" ; #declare KSSchriftgroesse=achsenlaenge/5 ; #declare skalenkugelradius=achsenlaenge/70; union{ // x-Achse: cylinder{-x*1.1*achsenlaenge , x*1.05*achsenlaenge, achsenlaenge/120} cone{ x*1.2*achsenlaenge, 0 , x*1.05*achsenlaenge, achsenlaenge/48} #declare Count=-achsenlaenge; #while (Count < achsenlaenge+1) sphere {, skalenkugelradius} #declare Count=Count+1; #end // y-Achse: cylinder{-y*1.1*achsenlaenge , y*1.05*achsenlaenge, achsenlaenge/120} cone{ y*1.2*achsenlaenge, 0 , y*1.05*achsenlaenge, achsenlaenge/48} #declare Count=-achsenlaenge; #while (Count < achsenlaenge+1) sphere {<0,Count,0>, skalenkugelradius} #declare Count=Count+1; #end // z-Achse: cylinder{-z*1.1*achsenlaenge , z*1.05*achsenlaenge, achsenlaenge/120} cone{ z*1.2*achsenlaenge, 0 , z*1.05*achsenlaenge, achsenlaenge/48} #declare Count=-achsenlaenge; #while (Count < achsenlaenge+1) sphere {<0,0,Count>, skalenkugelradius} #declare Count=Count+1; #end // Achsenbezeichnungen: text{ttf KSFont "x",0.1,0 scale KSSchriftgroesse translate <1.08*achsenlaenge,-achsenlaenge/7,0>} text{ttf KSFont "y",0.1,0 scale KSSchriftgroesse translate <-achsenlaenge/8,1.09*achsenlaenge,0>} text{ttf KSFont "z",0.1,0 scale KSSchriftgroesse translate } texture {kstextur} no_shadow } #end // --------------------------------------------------------------------------- // Vereinfachtes Koordinatensystem (ks) // --------------------------------------------------------------------------- #declare ks = koordinatensystem (int(intervall)) // --------------------------------------------------------------------------- // Die folgenden beiden Zeilen dienen lediglich der Kompatibilitaet mit früheren // Versionen der Datei anageo.inc, die Koordinatenkreuze mit Achseneinteilung // lediglich für die Achsenlaengen 5 und 10 darstellen konnten. // --------------------------------------------------------------------------- #declare ks10 = koordinatensystem ( 10 ); #declare ks5 = koordinatensystem ( 5 );