// Koordinatensystem // A. Filler, 2003 // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // Definition von Materialien und Oberflächen (Texturen) // --------------------------------------------------------------------------- #include "colors.inc" #include "textures.inc" #include "stones1.inc" #include "metals.inc" #declare holz = DMFWood6 #declare stein = T_Stone9 #declare silber = T_Silver_4D #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 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 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 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 // --------------------------------------------------------------------------- #macro koordinatensystem ( achsenlaenge ) #declare kstextur = texture { pigment { rgbf<0.1,0.1,0.2,0.5> } finish { ambient 0.0 diffuse 0.1 reflection 0.05 brilliance 1 specular 0.3 roughness 0.2 } } ; #declare KSFont="cyrvetic.ttf" ; #declare KSSchriftgroesse=achsenlaenge/5 ; union{ // x-Achse: cylinder{-x*1.15*achsenlaenge , x*achsenlaenge, achsenlaenge/120} cone{ x*1.15*achsenlaenge, 0 , x*achsenlaenge, achsenlaenge/48} // y-Achse: cylinder{-y*1.15*achsenlaenge , y*achsenlaenge, achsenlaenge/120} cone{ y*1.15*achsenlaenge, 0 , y*achsenlaenge, achsenlaenge/48} // z-Achse: cylinder{-z*1.15*achsenlaenge , z*achsenlaenge, achsenlaenge/120} cone{ z*1.15*achsenlaenge, 0 , z*achsenlaenge, achsenlaenge/48} // 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.04*achsenlaenge,0>} text{ttf KSFont "z",0.1,0 scale KSSchriftgroesse translate } texture {kstextur} no_shadow } #end // --------------------------------------------------------------------------- // Vereinfachtes Koordinatensystem (ks) // --------------------------------------------------------------------------- #declare ks = koordinatensystem (intervall) // --------------------------------------------------------------------------- // Darstellung eines Koordinatenkreuzes mit Skaleneinteilung (Achsenintervalle: -10 - 10) // --------------------------------------------------------------------------- #declare Font1="cyrvetic.ttf"; #declare ks10 = union{ // X-Achse cylinder{-x*10.5,x*10.5,.05} cone{ x*11.5,0, x*10.5,.15} #declare Count=-10; #while (Count < 11) sphere {, .11} #declare Count=Count+1; #end // y-Achse cylinder{-y*10.5,y*10.5,.07} cone{ y*11.5,0, y*10.5,.15} #declare Count=-10; #while (Count < 11) sphere {<0,Count,0>, .11} #declare Count=Count+1; #end // z-Achse cylinder{-z*10.5,z*10.5,.07} cone{ z*11.5,0, z*10.5,.15} #declare Count=-10; #while (Count < 11) sphere {<0,0,Count>, .11} #declare Count=Count+1; #end // Achsenbeschriftungen text{ttf Font1 "x",0.1,0 scale <1.5,1.5,1.5> translate <10.9,-1.2,0>} text{ttf Font1 "y",0.1,0 scale <1.5,1.5,1.5> translate <-1,10.5,0>} text{ttf Font1 "z",0.1,0 scale <1.5,1.5,1.5> translate <-1,-0.2,11.5>} texture { pigment { rgb<0.1,0.1,0.5> } finish { ambient 0.1 diffuse 0.4 reflection 0.2 brilliance 1 specular 0.3 roughness 0.2 } } no_shadow } // --------------------------------------------------------------------------- // Darstellung eines Koordinatenkreuzes mit Skaleneinteilung (Achsenintervalle: -5 - 5) // --------------------------------------------------------------------------- #declare Font1="cyrvetic.ttf"; #declare ks5 = union{ // X-Achse cylinder{-x*5.5,x*5.5,.05} cone{ x*6.5,0, x*5.5,.15} #declare Count=-5; #while (Count < 6) sphere {, .11} #declare Count=Count+1; #end // y-Achse cylinder{-y*5.5,y*5.5,.07} cone{ y*6.5,0, y*5.5,.15} #declare Count=-5; #while (Count < 6) sphere {<0,Count,0>, .11} #declare Count=Count+1; #end // z-Achse cylinder{-z*5.5,z*5.5,.07} cone{ z*6.5,0, z*5.5,.15} #declare Count=-5; #while (Count < 6) sphere {<0,0,Count>, .11} #declare Count=Count+1; #end // Achsenbeschriftungen text{ttf Font1 "x",0.1,0 scale <1.5,1.5,1.5> translate <5.9,-1.2,0>} text{ttf Font1 "y",0.1,0 scale <1.5,1.5,1.5> translate <-1,5.7,0>} text{ttf Font1 "z",0.1,0 scale <1.5,1.5,1.5> translate <-1,-0.2,5.8>} texture { pigment { rgb<0.1,0.1,0.5> } finish { ambient 0.1 diffuse 0.4 reflection 0.2 brilliance 1 specular 0.3 roughness 0.2 } } no_shadow }