max_trace_level 10 //ten /* Persistence of Vision Scene description file This is my entry for the monthly raytracing competiton on povray.org Width :640 Height :480 Time to render at 640x480 with anti-ailiasing on:00:00:00 (Hrs:Mins:Secs) */ #include "colors.inc" #include "textures.inc" #declare CGlass = color rgbf < 1.000, 1.000, 1.000, 1.000 > light_source { <-15 , 45 , -35> color rgb<1.0, 1.0, 1.0> area_light <10,0 ,0 >, <0,0 ,20 >, 20, 20 adaptive 0 jitter } light_source {< 0, 10, 5> color White spotlight point_at <0, 0, 5> radius 10 falloff 30 tightness 1 } light_source {< 10, 10, 5> color White spotlight point_at <10, 0, 5> radius 10 falloff 30 tightness 1 } light_source {< 20, 10, 5> color White spotlight point_at <20, 0, 5> radius 10 falloff 30 tightness 1 } light_source {< 5, 60, -7> color rgb <0.5, 0.5, 0.5> area_light <10,0 ,0 >, <0,0 ,10 >, 20, 20 adaptive 0 jitter spotlight point_at <5, 0, -7> radius 10 falloff 20 tightness 1 } //light_source { <3, 7, -26> color rgb<1.0, 1.0, 1.0>} camera { location <3*3, 7*3, -26*3> direction <0, 0, 3.0> look_at <5, 2.25, -7 > } // Studio ObjDev ... /* cylinder {<-100, 0, 0>, <100, 0, 0>, .01 texture {pigment {color rgb<1.0, 0.0, 0.0>}}no_shadow} cylinder {<0, -100, 0>, <0, 100, 0>, .01 texture {pigment {color rgb<0.0, 1.0, 0.0>}}no_shadow} cylinder {<0, 0, -100>, <0, 0, 100>, .01 texture {pigment {color rgb<0.0, 0.0, 1.0>}}no_shadow} *//* plane {z, 5 texture {pigment {color rgb<1.0, 1.0, 1.0>}}} plane {x, 5 texture {pigment {color rgb<0.0, 0.0, 1.0>}}} plane {x, -5 texture {pigment {color rgb<0.0, 1.0, 1.0>}}} plane {z, -7 texture {pigment {color rgb<1.0, 0.0, 0.0>}}} plane {y, -2.26 texture {pigment {color rgb<0.0, 1.0, 0.0>}}} plane {y, 5. texture {pigment {color rgb<1.0, 0.0, 1.0>}}} */ //-------------------------------< The Glasses >------------------------------ //Form a glass cylinder, with part of it solid for the "beverages" #declare Empty_Glass = difference { cylinder{ <0, 1.5 , 0>, <0, -1.5, 0>, 1 } cylinder{ <0, 1.6, 0>, <0, -1.2, 0>, 0.95} sphere { <0, -1.2, 0>, 0.95 scale <1, 0.02, 1> } texture { pigment { color CGlass quick_color Cyan } finish { specular 1.0 roughness 0.0005 refraction 1.0 ior 1.5 reflection 0.05 } } scale <1, 1.5, 1> //Bottom = 2.25 } #declare AGlass = difference { cylinder{ <0, 1.5 , 0>, <0, -1.5, 0>, 1 } cylinder{ <0, 1.55, 0>, <0, -0.0001, 0>, 0.95} texture { pigment { color CGlass quick_color Cyan } finish { specular 1.0 roughness 0.0005 refraction 1.0 ior 1.5 reflection 0.05 } } } // *** The beverage inserts ... // Orange Juice, Half filled ... #declare Juice = merge { cylinder{ <0, 0.0, 0>, <0, -1.2, 0>, 0.95} sphere { <0, -1.2, 0>, 0.95 scale <1, 0.02, 1> } texture { pigment { color rgbf <1.0, 0.725, 0.0, 0.2> } finish { reflection 0.05 brilliance 0.5 diffuse .9 refraction 1.0 ior 1.34 } } } // Some nice clean (non-clorinated) filtered water #declare Water1 = merge { cylinder{ <0, 0.0, 0>, <0, -1.2, 0>, 0.95} sphere { <0, -1.2, 0>, 0.95 scale <1, 0.02, 1> } texture { pigment { color rgbf <1.0, 1.0, 1.0, .85> } finish { reflection 0.05 refraction 1.0 ior 1.33 } } } // The Orange Juice Glass ... #declare OJ_Glass = union { object {AGlass} object {Juice} scale <1, 1.5, 1> //Bottom = 2.25 } // The Glass of Water ... #declare Water_Glass = union { object {AGlass} object {Water1} scale <1, 1.5, 1> //Bottom = 2.25 } //--------------------------------< The Orange >------------------------------ #declare Skin_Texture = texture { pigment { color Orange } finish { specular 0.2 roughness 0.05 diffuse 0.8 brilliance 0.5 } normal { bumps 0.3 scale <0.07, 0.07, 0.07> } } #declare Orange_Skin = intersection { sphere{ <0, 0, 0>, 1} box{ <-1, -1, 0>, <1, 1, 1> } texture {Skin_Texture} } #declare Orange_Inside = cone {<0, 0, -.000001>, 1, <0, 0, .1>, 0 texture { pigment{ image_map {gif "orange.gif" once interpolate 2} scale <2.0, 2.0, 2.0> translate <-1, -1, 0> } finish { specular 1.0 roughness 0.005 diffuse 0.8 brilliance 0.5 } normal{ bump_map {gif "Borange.gif" once} scale <2.0, 2.0, 2.0> translate <-1, -1, 0> } } } #declare Orange_Half = union { object{Orange_Skin} object{Orange_Inside} } #declare Orange1 = sphere{ <0.75, 0, .9>, 1 texture {Skin_Texture} } #declare Oranges = union { object{Orange_Half rotate <37, 46, 0> translate <-.75, 0, 0> } object{Orange1} } //--------------------------< The Kitchen Cabinet >--------------------------- //DMFWood1 rotate <75, 0, 0> scale<50, 50, 50> #declare CounterBody = union { box {<-20,8,-7.5>, <20, 10, 7.5> texture { DMFWood1 rotate <0, 90, 0> scale<10, 10, 10> } } box {<-20,-10,-7.5>, <20, -8, 7.5> texture { DMFWood1 rotate <0, 90, 0> scale<10, 10, 10> } } box {<-20,-8,-7.5>, <-18, 8, 7.5> texture { DMFWood1 rotate <90, 0, 0> scale<10, 10, 10> } } box {<18,-8,-7.5>, <20, 8, 7.5> texture { DMFWood1 rotate <90, 0, 0> scale<10, 10, 10> } } box {<-1,-8,-7.5>, <1, 8, 7.5> texture { DMFWood1 rotate <90, 0, 0> scale<10, 10, 10> } } } #declare PanelBlank = box {<-9,-8.5,-8 >, < 9, 8.5, -7.5 > } #declare Panel = difference { object{PanelBlank} box {<-8,-7.5,-8.1 >, < -0.5, -0.5, -7.75 >} box {<0.5,-7.5,-8.1 >, < 8, -0.5, -7.75 >} box {<-8,0.5,-8.1 >, < -0.5, 7.5, -7.75 >} box {<0.5,0.5,-8.1 >, < 8, 7.5, -7.75 >} cylinder {<-9, -8.6. -8>, <-9, 8.6, -8>, .25} cylinder {< 9, -8.6. -8>, < 9, 8.6, -8>, .25} cylinder {<-9.1, 8.5. -8>, < 9.1, 8.5, -8>, .25} cylinder {<-9.1, -8.5. -8>, < 9.1, -8.5, -8>, .25} texture { DMFWood1 rotate <90, 0, 0> scale<1, 1, 1> finish { diffuse .9 brilliance .7 } } } #declare Cabinet = union{ object{CounterBody} object{Panel translate <-9.5, 0, 0>} object{Panel translate < 9.5, 0, 0>} } //--------------------------< The Kitchen Counter!! >--------------------------- #declare Counter = union { box {<-40, -2, -10>, <40, 0, 10> texture { pigment{color rgb <1.0, .8, 0.5>} normal {bumps 0.2 scale <0.1 0.1 0.1>} } } cylinder {<-40, -1, -10>, <40, -1, -10>, 1 texture { pigment{color rgb <1.0, .8, 0.5>} normal {bumps 0.2 scale <0.1 0.1 0.1>} } } box {<-40, -30, -8>, <40, -2, 10> texture { DMFWood1 rotate <90, 0, 0> scale<1, 1, 1> } } } //----------------------------------------------------------------- plane { x,-40 texture { pigment { image_map {gif "zigzag.gif" interpolate 2} } } } //plane { x, 40 texture {pigment {color White}}} //plane { z,-70 texture {pigment {color White}}} plane { z, 10 texture { pigment { image_map {gif "zigzag.gif" interpolate 2} } } } plane { y,-30 texture { pigment { image_map {gif "zigzag.gif" interpolate 2} } } } //plane { y, 40 texture {pigment {color White}}} object {Counter} object {Cabinet translate <15, 20, 10>} object {Water_Glass translate <0, 2.25, 5>} object {OJ_Glass translate <5, 2.25, -7>} object {Oranges translate <8, 1, -9>} object {Orange1 translate <8, 1, 3>} object {Orange1 translate <9, 1, -2>} object {Orange1 translate <10, 1, 1>} object {Orange1 translate <10, 1, -9.5>} object {Empty_Glass translate <-3.2, 2.25, 3.1>} object {Empty_Glass translate <-9.3, 2.25, 0.1>} object {Empty_Glass translate <-3.1, 2.25, -3.4>}