// --------- Hauptseminar Mathematik: COMPUTERGRAFIK --------- // --------- Herr Filler ------------------------------------- // --------- WS 04/05 ---------------------------------------- // --------- Christine Schäfer und Tina Guldner -------------- #version 3.5; #include "colors.inc" #include "textures.inc" #include "metals.inc" #include "golds.inc" #include "skies.inc" #include "stars.inc" #include "stones1.inc" #include "stones2.inc" #include "woods.inc" #include "glass.inc" #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 sofafarbe = texture{ pigment{ color rgb<0.85,0.35,0.05> } normal { pigment_pattern{ wood frequency 5 sine_wave turbulence 0.05 color_map {[0.0, rgb 0] [0.2, rgb 0.5] [0.8, rgb 0.5] [1.0, rgb 0]} rotate< 90,0,0> scale 0.5} 0.15} finish {ambient 0.0 diffuse 0.8 phong 1 reflection 0.2}} #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 rot_matt = texture { pigment { color rgb < 1, 0.2, 0.2> } finish { ambient 1.1 diffuse 1.9 phong 1.2 phong_size 20 reflection 0 } } #declare gelb = texture { pigment { color rgb < 255, 166, 0> } finish { ambient 1.05 diffuse 1.3 phong 1.4 phong_size 50 reflection 0.4 } } //#declare intervall = 13; // Nur wenn das //#include "ks.inc" // Koordinatensystem //ks // benötigt wird. background {White} // Farbe des Hintergrundes // --------------------------------------------------------------------------- // Beschreibung der Kamera // --------------------------------------------------------------------------- //camera { location<100,80,125> //look_at<20,40,8.5> //angle 60} // Kamerabeschreibung #declare dw = 2*pi*clock; #declare ka = 120; camera {location angle 80-43*clock look_at <0,80,0>} // --------------------------------------------------------------------------- // Lichtquellen // --------------------------------------------------------------------------- #declare intervall = 15; // Von der Kamera erfasster Bildausschnitt light_source { <5*intervall, 4*intervall, 0*intervall> color rgb <1, 1, 1> } light_source { <0,9*intervall,2*intervall> color rgb <1, 1, 1> } // --------------------------------------------------------------- // Beginn der Szenen-Beschreibung // ******************************************************************************* // ------------------ // Wände // ------------------ // hintere Wand (mit Fenstern) plane { z,-125 texture {T_Grnt2}} // vordere Wand (mit Tür) plane { z,250 texture {T_Grnt2}} // Grund- und Deckfläche plane { y, 0 texture {T_Wood24} } plane { y, 160 texture {T_Grnt11} } // rechte Wand (mit Regal) plane {<420,0,0> ,-137 texture{mattweiss}} // linke Wand (mit Spiegel) plane {<-420,0,0>, -137 texture{mattweiss}} // ------------------ // Tisch // ------------------ sor{8, <0.0, -0.5> <20.0, 0.0> <10.0, 2.0> <5.0, 4.0> <5.0, 40.0> <10.0, 50.0> <40.0, 55.0> <55.0, 60.0> scale<1,0.5,1> texture{T_Wood3} translate<0,0,0> no_shadow} // ------------------ // Fenster // ------------------ // Fenster mitte #declare Windtex = texture{pigment{color Black} finish {ambient 0.1 diffuse 0.9 phong 1}} #declare Window = union{ difference{ box{<-30.0,48.0,-1.2>,< 30.0,108.0,1.2>} box{<-27.0,51.0,-1.8>,<-1.8,76.2,1.8>} box{< 1.8,51.0,-1.8>,< 27.0,76.2,1.8>} box{<-27.0,79.8,-1.8>,<-1.8,105.0,1.8>} box{< 1.8,79.8,-1.8>,< 27.0,105.0,1.8>} texture{Windtex} } box{<-29.4,48.6,0.0>,< 29.4,107.4,0.06> texture{Shadow_Clouds}} } object{Window rotate<0,0,0> translate<0,0,-125>} // Fenster rechts #declare Windtex = texture{pigment{color Black} finish {ambient 0.1 diffuse 0.9 phong 1}} #declare Window = union{ difference{ box{<-30.0,48.0,-1.2>,< 30.0,108.0,1.2>} box{<-27.0,51.0,-1.8>,<-1.8,76.2,1.8>} box{< 1.8,51.0,-1.8>,< 27.0,76.2,1.8>} box{<-27.0,79.8,-1.8>,<-1.8,105.0,1.8>} box{< 1.8,79.8,-1.8>,< 27.0,105.0,1.8>} texture{Windtex} } box{<-29.4,48.6,0.0>,< 29.4,107.4,0.06> texture{Shadow_Clouds}} } object{Window rotate<0,0,0> translate<-80,0,-125>} // Fenster links #declare Windtex = texture{pigment{color Black} finish {ambient 0.1 diffuse 0.9 phong 1}} #declare Window = union{ difference{ box{<-30.0,48.0,-1.2>,< 30.0,108.0,1.2>} box{<-27.0,51.0,-1.8>,<-1.8,76.2,1.8>} box{< 1.8,51.0,-1.8>,< 27.0,76.2,1.8>} box{<-27.0,79.8,-1.8>,<-1.8,105.0,1.8>} box{< 1.8,79.8,-1.8>,< 27.0,105.0,1.8>} texture{Windtex} } box{<-29.4,48.6,0.0>,< 29.4,107.4,0.06> texture{Shadow_Clouds}} } object{Window rotate<0,0,0> translate<80,0,-125>} // ------------------ // Kerze // ------------------ union{ // Kerze neu sor{14, <0.0, -0.5> <1.2, 0.0> <1.0, 0.5> <1.0, 6.5> <1.0, 7.0> <1.0, 7.3> <1.0, 7.4> <1.0, 7.5> <1.0, 8.0> <1.0, 8.5> <1.0, 9.0> <1.0, 9.5> <0.0, 10.0> <0.0, 10.1> scale <0,0.9,0> texture {mattweiss} translate<0,33.8,0>} // Kerzenständer sor{6, <0.0, -0.5> <3.0, 0.0> <1.5, 1.0> <1.5, 4.5> <2.5, 6.0> <2.6, 6.1> scale <0,1.4,0> texture {T_Gold_1A} translate<0,27.7,0>} // Kerzendocht sor{4, <0.0, -0.5> <0.2, 0.3> <0.2, 0.9> <0.3, 1.0> scale <0,1.4,0> texture {schwarz} translate<0,42.3,0>} intersection{ sphere{<-1,0,0>,1.7} sphere{<1,0,0>,1.7} rotate<0,10,0> texture{rot_matt} translate<0,43.4,0>} intersection{ sphere{<-1,0,0>,1.7} sphere{<1,0,0>,1.7} rotate<0,10,0> texture{gelb} translate<0,43.4,0>} } //Ende Vereinigung Kerze // ------------------ // Vase (auf Tisch) // ------------------ // Vase #declare Glas1 = sor {7, <0.000000, 0.000000> <0.118143, 0.000000> <0.620253, 0.540084> <0.210970, 0.827004> <0.194093, 0.962025> <0.286920, 1.000000> <0.468354, 1.033755> open} object {Glas1 texture { Silver1 } scale <10, 10, 10> translate <-15, 27.7, 15> } // ------------------ // Teppich // ------------------ // Teppich sor{4, <0.0, -0.5> <60.0, 0.01> <60.01, 0.0101> <61.0, 0.011> scale<1,1.3,1> pigment{Jade}} // ------------------ // Regal // ------------------ // Regal difference{ box{<30,0,50>,<60,100,100> texture{Tan_Wood}} box{<30,8,52>,<62,32,98> } box{<30,38,52>,<62,62,98>} box{<30,68,52>,<62,92,98>} translate<-170,0,-80>} // ------------------ // Säule, Topf, Pflanze // ------------------ // Säule union{ // Beginn Vereinigung Säule, Topf, Pflanze und Blüte sor{10, <0.0, -0.5> <8.0, 0.0> <4.5, 3.0> <6.0, 6.0> <4.0, 7.0> <4.0, 18.0> <6.0, 19.0> <4.5, 22.0> <8.0, 25.0> <10.55, 25.05> scale<1,1.3,1> texture{T_Stone34} translate<-100,0,50>} // Topf sor{5, <0.0, -0.5> <5.0, 0.0> <7.0, 5.0> <7.5, 8.0> <8.6, 8.1> scale<1,1.3,1> texture{Gold_Metal} translate<-100,33,50>} // Pflanze sor{19 <0.0, -0.5> <3.0, 0.0> <2.7, 4.0> <3.0, 6.0> <3.3, 8.0> <6.0, 10.5> <7.0, 11.0> <5.0, 12.0> <4.0, 13.0> <4.5, 14.0> <5.0, 15.0> <4.7, 16.0> <4.0, 17.0> <3.0, 18.0> <3.5, 19.0> <3.7, 20.5> <3.9, 21.0> <2.0, 22.0> <0.0 , 23.0> scale<1,1.3,1> pigment{Jade} translate<-100,33,50>} // Blüte union{ // Beginn Vereinigung Blüte difference {sor{6 <0.0, 0.0> <0.25, 0.0> <1.0, 0.5> <1.5, 1.0> <2.0, 3.0> <5.0, 6.0> pigment {Yellow }} cone {<5,25.5,0> 1.0 <5.0, 28.5,0> 2.0 pigment {Yellow}}} difference {sor{6 <0.0, 0.0> <0.25, 0.0> <1.0, 0.5> <1.25, 1.0> <1.5, 3.25> <10.0 ,100.0> pigment {Yellow }} cone {<5,25.5,0> 0.5 <5,28.5,0> 1.25 pigment {Yellow}}} sor {6 <0.0, 0.0> <0.125, 0.0> <0.5, 0.5> <0.675, 1.0> <1.0, 3.5> <10.0, 10.0> pigment {Yellow }} // Ende Vereinigung Blüte translate<-100,60.75,50>} translate<-20,0,0>} // Ende Vereinigung Säule, Topf, Pflanze und Blüte // ------------------ // Sofa // ------------------ // Sofa union{ // Beginn Vereinigung Sofa // Sitzfläche union{ box{<50,0,30>,<130,15,60> texture{sofafarbe} rotate<0,0,0> translate<-22.5,0,-72>} // Rückenlehne cylinder{<10,0,12>, <10,10,12>,40 texture{sofafarbe} rotate<90,0,0> translate<58.75,25,-52>} translate<10,0,30>} union{ // Armlehne rechts cylinder{<5,0,6>, <5,30,6>,4 texture{sofafarbe} rotate<90,0,0> translate<115,23,-12>} rotate<0,0,0>} //Armlehne links cylinder{<5,0,6>, <5,30,6>,4 texture{sofafarbe} rotate<90,0,0> translate<35,23,-12>} rotate<0,0,0> translate<-10,0,-102>} //Ende Vereinigung Sofa // ------------------ // Gläser im Regal // ------------------ // Glas1 #declare Glas1 = lathe { cubic_spline 12, <0.000000, 0.000000>, <0.000000, 0.000000>, <0.277027, 0.000000>, <0.277027, 0.000000>, <0.064189, 0.081081>, <0.057432, 0.256757>, <0.260135, 0.422297>, <0.152027, 1.000000>, <0.128378, 0.996622>, <0.222973, 0.452703>, <0.000000, 0.307432>, <0.023649, 0.523649> scale <1.5, 1.5, 1.5>} object {Glas1 texture {Vicks_Bottle_Glass} scale <10, 10, 10> translate <-114, 8, -10>} // Glas2 #declare Glas2 = lathe { cubic_spline 13, <0.000000, 0.000000>, <0.000000, 0.000000>, <0.172414, 0.013793>, <0.203448, 0.096552>, <0.210345, 0.203448>, <0.210345, 0.634483>, <0.210345, 1.000000>, <0.196552, 1.000000>, <0.193103, 0.651724>, <0.182759, 0.206897>, <0.151724, 0.096552>, <0.000000, 0.065517>, <0.000000, 0.065517> scale <2, 1.5, 2>} object {Glas2 texture {NBglass} scale <8, 8, 8> translate <-114, 37, 10>} // Glas3 #declare Glas3 = lathe { cubic_spline 13, <0.000000, 0.000000>, <0.000000, 0.000000>, <0.193050, 0.003861>, <0.193050, 0.019305>, <0.073359, 0.038610>, <0.027027, 0.135135>, <0.023166, 0.559846>, <0.100386, 0.679537>, <0.359073, 0.996139>, <0.335907, 1.000000>, <0.096525, 0.725869>, <0.000000, 0.691120>, <0.000000, 0.691120> scale <1.5, 1.5, 1.5>} object {Glas3 texture {Yellow_Glass} scale <10, 10, 10> translate <-114, 68, -10>} // Glas4 #declare Glas4 = lathe { cubic_spline 12, <0.000000, 0.000000>, <0.000000, 0.000000>, <0.460606, 0.036364>, <0.515152, 0.303030>, <0.157576, 0.660606>, <0.248485, 1.000000>, <0.230303, 1.000000>, <0.139394, 0.660606>, <0.496970, 0.296970>, <0.448485, 0.054545>, <0.000000, 0.018182>, <0.000000, 0.018182> scale <1.5, 1.5, 1.5>} object {Glas4 texture {Ruby_Glass} scale <10, 10, 10> translate <-117, 37, -10>} // ------------------ // Tür // ------------------ union{ // Tür box{<0,0,0>,<65,100,5> texture{Tan_Wood} translate<0,0,246>} box{<3,0,3>,<62,97,2> texture{T_Wood7} translate<0,0,241>} // Türknauf sor{ 8, < 0.0, 0.0> < 3.0, 0.0> < 3.6, 2.2>, < 1.55, 4.65> < 2.45, 6.3> < 2.4, 6.75> < 2.15, 7.8> < 0.8, 8.0> texture{Soft_Silver} rotate<-90,180,90> translate<15,43,237>}} // ------------------ // Spiegel // ------------------ // Spiegel union{ box{<0,0,0>,<3,65,100> texture{schwarz} translate<128,50,0>} box{<5,5,5>,<-2,60,95> texture{T_Brass_3C} translate<130,50,0>} translate<8,0,-30>} // ------------------ // Kleiderständer // ------------------ union{ // Kleiderständer sor{7, <0.0, -0.5> <14.0, 0.0> <5.0, 5.0> <5.0, 40.0> <5.0, 80.0> <5.0, 90.0> <5.1, 90.5> texture{T_Wood23} translate<100,0,200>} // Kleiderhaken1 sor{8, < 0.0, 0.0> < 3.0, 0.0> < 3.6, 2.2> < 1.55, 4.65> < 2.45, 6.3> < 2.4, 6.75> < 2.15, 14.9> < 0.8, 15.0> texture{T_Wood23} rotate<-90,180,90> translate<97,80,175>} // Kleiderhaken2 sor{8, < 0.0, 0.0> < 3.0, 0.0> < 3.6, 2.2> < 1.55, 4.65> < 2.45, 6.3> < 2.4, 6.75> < 2.15, 14.9> < 0.8, 15.0> texture{T_Wood23} rotate<90,180,90> translate<97,70,220>} // Kleiderhaken3 sor{8, < 0.0, 0.0> < 3.0, 0.0> < 3.6, 2.2>, < 1.55, 4.65> < 2.45, 6.3> < 2.4, 6.75> < 2.15, 14.9> < 0.8, 15.0> texture{T_Wood23} rotate<-135,180,90> translate<82.5,60,175>}} // ------------------ // Uhr // ------------------ union{ #declare Uhr = union { // äußerer Ring torus {9.7,0.7 texture{Shadow_Clouds} clipped_by { plane {<0,10,0>, -0.2}} rotate <90,0,90> translate <0,0,0.0299> normal { bumps 4.0 scale 1.0 }} // mittlerer Ring difference { cylinder {<0,0,0> <0,0.1,0> 9.2 texture {mattweiss}} cylinder {<0,-1.0,0><0,1.0,0> 7.83} rotate <90,0,0> translate <0,0,-0.01>} // Ziffernblatt union { cylinder {<0,0,0><0,0.1,0> 8.0 pigment{NeonBlue} rotate <90,0,90> translate <0,0,-0.009>} // Ziffern text{ttf "timrom.ttf" "1",1.0,0 //liegt genau auf translate <1.15,1.95,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "2",1.0,0 translate <2.1,1,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "3",1.0,0 translate <2.45,-0.25,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "4",1.0,0 translate <2.15,-1.6,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "5",1.0,0 translate <1.25,-2.5,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "6",1.0,0 translate <-0.24,-2.9,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "7",1.0,0 translate <-1.55,-2.55,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "8",1.0,0 translate <-2.5,-1.6,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "9",1.0,0 translate <-2.9,-0.25,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "10",1.0,0 translate <-2.6,1,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "11",1.0,0 translate <-1.6,1.95,-0.13> texture { T_Chrome_5A } scale 2.5} text{ttf "timrom.ttf" "12",1.0,0 translate <-0.4,2.2,-0.13> texture { T_Chrome_5A } scale 2.5} scale 0.98} // Teil, an dem die Zeiger befestigt sind difference { cylinder{<0,0,0><0,1.1,0> 0.5 texture { T_Chrome_5A }} torus {0.6, 0.33 texture { T_Chrome_5A } translate<0,0.07,0>} rotate <270,0,0> translate <0,0,0>} // Minutenzeiger union { difference { cylinder {<0,0,0> <0,0.15,0> 0.48 pigment { Jade }} cylinder {<0,-1.0,0> <0,1.0,0> 0.35 pigment { Jade }} translate <0,0.08,0>} prism { linear_sweep linear_spline 0, 0.15, 7, <0,3.6> <-0.39,2.0> <-0.39,-3.1> <-0.2,-3.5> <0.2,-3.5> <0.39,-3.0> <0.39, 2.0> texture { T_Chrome_5A } translate <0,0.065,3.8> scale 1.2} rotate <270,0,0>} // Stundenzeiger union { difference { cylinder {<0,0,0> <0,0.15,0> 0.48 texture { T_Chrome_5A }} cylinder {<0,-1.0,0> <0,1.0,0> 0.35 texture { T_Chrome_5A }} translate <0,0.055,0>} difference { prism { linear_sweep linear_spline 0, 0.15, 7, <0,2.3> <-0.3,1.2> <-0.3,-3.1> <-0.2,-3.5> <0.2,-3.5> <0.3,-3.0> <0.3, 1.2> texture { T_Chrome_5A } translate <0,0.045,3.8> scale 1.2} cylinder {<-1.0,0,0> <1.0,0,0> 0.4 texture { T_Chrome_5A } rotate <0,0,90> translate <0,0.056,5.45>}} difference { cylinder {<0,0,0> <0.15,0,0> 0.8 texture { T_Chrome_5A } rotate <0,0,90> translate <0,0.056,5.45>} cylinder {<-1.0,0,0> <1.0,0,0> 0.4 texture { T_Chrome_5A } rotate <0,0,90> translate <0,0.056,5.45>}} //Zeigerbewegung rotate <270,0,-117> }} object {Uhr} translate<-80,100,249.5>} // ------------------ // Sitzbänke // ------------------ // Sitzfläche union{ #declare Cone = cone {<100,0,0>20 <0,0,0>10} #declare Sitzflaeche = difference { cylinder {<0,0,0> <0,2.5,0> 45.0} cylinder {<0,-10,0> <0,10,0> 32.5} #declare N = 3; #declare C = 0; #while ( C < N ) object { Cone rotate (360/N*C)*y } #declare C = C + 1; #end } object {Sitzflaeche translate <0,15.0,0> no_shadow texture{T_Wood3}} // Beine #declare Leg = lathe { cubic_spline 6 <0,0> <5.0,0> <5.0,10> <3.0,20> <5.0,40> <2.0,50>} #declare N = 3; #declare C = 0; #while ( C < N ) object { Leg scale .4 translate <-35.0,0,15.0> rotate (360/N*C)*y } object { Leg scale .4 translate <-35.0,0,-15.0> rotate (360/N*C)*y } #declare C = C + 1; #end translate<0,0,0> no_shadow texture{T_Wood3}} #declare Schrank = union { union{ difference {box {<0,0,0>,<7,4,2>} box{<0.08,0.08,-0.08>,<6.92,3.92, 1.92>}} //schrank ohne innenleben box{<0.08, 1, 0>,<6.92, 1.08,1.92>} //unteres brett box{<0.08, 2.8, 0>,<6.92, 2.88,1.92>} //oberes brett box{<1.92, 0.08, 0>,<2, 3.92,1.92>} //linkes brett box{<4.92, 0.08, 0>,<5, 3.92,1.92>} //rechtes brett box{<0.08,1.5,0>,<1.92,1.58, 1.92>} //links mitte, brett 1 box{<0.08,2.1,0>,<1.92,2.18, 1.92>} //links mitte, brett 2 box{<4.92,1.8,0>,<6.92,1.88, 1.92>} //rechts mitte, brett 1 box{ <0.04,0.04,-0.04>,<1.95,1.04, 0>} //tür links unten box{<0.04,2.84,-0.04>,<1.95,3.96, 0> } //tür links oben box{<4.97,0.04,-0.04>,<6.96,1.04, 0> } //tür rechts unten box{<1.96, 0.04, -0.04 >,<4.95, 1.04, 0>} //zum aufklappen nach unten box{<1.96,2.84,-0.04><4.95,3.94,0>} //zum aufklappen nach oben texture {Tan_Wood} } box{<4.97,1.08,-0.04>,<6.96,3.96,0> //glastuer texture {pigment {color Col_Glass_General}}} } #declare Tuerknopf = sphere {<5.07,0.5,-0.05>, 0.05 texture {pigment {color Black}}} #declare Wohnzimmerschrank = union { object {Schrank} object {Tuerknopf translate <0.1,0.4,0>} //rechts object {Tuerknopf translate <-3.3, 0.4,0>} //links object {Tuerknopf translate <-1.6,0.4,0>} //aufklappbar unten object {Tuerknopf translate <-1.6,2.5 ,0>} //aufklappbar oben object {Tuerknopf translate <0.1,1.8,0>} //glastür object {Tuerknopf translate <-3.3,2.5,0>} //oben links } object {Wohnzimmerschrank scale<10,20,15>translate<-110,0,220>}