// Kitchen counter by Greg Pape // mstgreg@cencom.net (unreliable) or catch me on IRC (nick mstgreg) // For the POV-Ray September 1995 competition // Go easy on me - it's my first real shot at anything this complex! ;) #include "colors.inc" #include "shapes.inc" #include "textures.inc" camera{ location <0, 3, -3> look_at <.25, .25, 0> translate <-1, -1, 1> } light_source{ <-1000, 10, -1000> color White } light_source{ <-1000, 1000, -1000> color Gray50 } /////////////////////////////////////////////////////////////////////////// // #declares /////////////////////////////////////////////////////////////////////////// #declare Countertop= object{ union{ box{ <-100, 1/16, 2> <3, -1/16, 0> } box{ <0, -1/16, 0> <3, 1/16, -100> } box{ <-100, 1/16, 2> <3, (1/16+1/3), (2+1/12)> } } texture{ pigment{ color HuntersGreen } } finish{ ambient .5 reflection .001 } } #declare CuttingBoardRim= object{ union{ cylinder{ <0, 0, .75> <0, 0, -.75> 3/96 translate < ( -(1+3/4)/2 ), 0, 0> } cylinder{ <0, 0, .75> <0, 0, -.75> 3/96 translate <( (1+3/4)/2 ), 0, 0> } cylinder{ <(1+3/4)/2, 0, 0> <-(1+3/4)/2, 0, 0> 3/96 translate <0, 0, .72> } cylinder{ <(1+3/4)/2, 0, 0> <-(1+3/4)/2, 0, 0> 3/96 translate <0, 0, -.72> } } scale <1, .1, 1> translate <-1, 1/16, 1> texture{ pigment{ color Silver } } finish{ ambient .5 reflection .75 } } #declare CuttingBoard= object{ box{ <-(1+3/4)/2, 0, .71> <(1+3/4)/2, 0, -.71> translate <-1, 1/16+.001, 1> texture{ White_Wood rotate y*90 scale <10, 1, 1> } finish{ ambient .75 } } } #declare Wall= plane{ z, 2+1/12 texture{ pigment{ gradient x color_map{ [0.0 0.2 color White color White] [0.2 0.3 color DarkGreen color DarkGreen] [0.3 0.4 color White color White] [0.4 0.6 color DarkGreen color DarkGreen] [0.6 0.7 color White color White] [0.7 0.8 color DarkGreen color DarkGreen] [0.8 1.0 color White color White] } } scale <.5, .5, .5> } } #declare Cabinet= union{ box{ <2, 0, 0> <-100, -2.5, 0> texture{ DMFLightOak } finish{ ambient .5 } } } #declare Drawer= union{ box{ <-.2, -.2, .4> <.2, .2, -.4> texture{ DMFLightOak } finish{ ambient .4 } } cylinder{ <-.3, 0, 0> <0, 0, 0> .025 texture{ Gold_Metal } finish{ ambient .5 } } sphere{ <-.325, 0, 0> .075 texture{ Gold_Metal } finish{ ambient .5 } } } #declare Floor= plane{ y, -3 texture{ pigment{ checker color Black color White } } scale <.5, .5, .5> finish{ ambient .5 reflection .5 } } #declare Dishwasher=object{ union{ union{ box{ <-1.95, 1.9, 0> <1.95, 1.8, 0> texture{ pigment{ color Silver } } } cylinder{ <-1.95, 1.85, 0> <1.95, 1.85, 0> .05 texture{ pigment{ color Silver } } } translate <0, .05, 0> } box{ <-2, 2, .5> <-1.95, 1.25, 0> texture{ pigment{ color Black } } } box{ <1.95, 1.25, 0> <2, 2, .5> texture{ pigment{ color Black } } } union{ box{ <0, 0, 0> <1, 1, 1> pigment{ image_map{ gif "kitch01.gif" map_type 0 once }} translate <-.5, -.5, 0> scale <3.9, .6, 1> translate <0, 1.6, 0> } } box{ <-2, 1.25, -.01> <2, -.6, .4> pigment{ color Black } } union{ cylinder{ <-1.85, 1.2, 0> <1.85, 1.2, 0> .05 texture{ pigment{ color Silver } } finish{ ambient .5 reflection .5 } } cylinder{ <-1.85, 1.2, 0> <-1.85, -.5, 0> .05 texture{ pigment{ color Silver } } finish{ ambient .5 reflection .5 } } cylinder{ <-1.85, -.5, 0> <1.85, -.5, 0> .05 texture{ pigment{ color Silver } } finish{ ambient .5 reflection .5 } } cylinder{ <1.85, -.5, 0> <1.85, 1.2, 0> .05 texture{ pigment{ color Silver } } finish{ ambient .5 reflection .5 } } } box{ <-2, -.55, 0> <2, -1, .5> texture{ pigment{ color Black } } } } translate <0, -.5, -.25> scale <.5, .5, .5> translate <-1, -.9, .25> } #declare TV=object{ union{ difference{ box{ <-1, -1, -1> <1, 1, 1> } box{ <-.9, .9, .5> <.9, -.6, -1.25> } texture{ pigment{ color LightBlue } } finish{ ambient .5 } } box{ <0, 0, 0> <1, 1, 1> pigment{ image_map{ gif "kitch02.gif" map_type 0 once } } translate <-.5, -.5, -.5> scale <1.8, 1.5, 1.75> translate <0, .2, 0> finish{ ambient 1 } } difference{ difference{ sphere{ <0, 0, 0> .25 } plane{ y, -.00001 } } box{ <-2, 10, .1> <2, 0, -.1> } texture{ Chrome_Metal } translate <0, 1, 0> } union{ cylinder{ <0, 0, 0> <0, 1, 0> .05 } cylinder{ <0, 1, 0> <0, 1.2, 0> .08 } texture{ Chrome_Metal } rotate z*45 translate <0, 1, 0> } union{ cylinder{ <0, 0, 0> <0, 1, 0> .05 } cylinder{ <0, 1, 0> <0, 1.2, 0> .08 } texture{ Chrome_Metal } rotate z*-45 translate <0, 1, 0> } } scale <.25, .25, .25> rotate y*45 translate <1.1, .4+1/16, 1> } #declare Notepad=object{ union{ box{ <-.25, -.25, -.25> <.25, .25, .25> texture{ pigment{ color rgb <.1, .1, .5> } } } box{ <0, 0, 0> <1, 1, 1> texture{ pigment{ image_map{ gif "kitch03.gif" map_type 0 once } }} translate <-.5, -.5, -.5> scale <.5, .5, .5> rotate x*90 translate <0, .01, 0> finish{ ambient .75 } } } scale <.8, .8, .8> rotate y*-10 translate <.25, -.25, 1> } #declare Pencil=object{ union{ cylinder{ <-2, 0, 0> <2, 0, 0> .2 texture{ pigment{ Yellow } } } cone{ <-2, 0, 0> .2 <-2.5, 0, 0> .05 texture{ Cork } } cone{ <-2.5, 0, 0> .05 <-2.7, 0, 0> .001 texture{ pigment{ color Black } } } cylinder{ <2, 0, 0> <2.5, 0, 0> .2 texture{ pigment{ color Silver } } } difference{ sphere{ <0, 0, 0> .2 } plane{ x, -.001 } translate <2.5, 0, 0> texture{ pigment{ color rgb <.7, .2, .2> } } } } scale <.1, .1, .1> rotate y*45 translate <-.1, 1/16+.05, .75> } #declare Toaster=object{ union{ difference{ box{ <.2501, .2501, .2501> <-.2501, -.2501, -.2501> } union{ box{ <-.1501, .501, .1501> <-.07501, -.1501, -.1501> } box{ <.07501, .501, .1501> <.1501, -.1501, -.1501> } } texture{ Chrome_Metal } } difference{ box{ <.25, .25, .25> <-.25, -.25, -.25> } union{ box{ <-.15, .5, .15> <-.075, -.15, -.15> } box{ <.075, .5, .15> <.15, -.15, -.15> } } texture{ pigment{ color Black } } } cylinder{ <0, 0, .01> <0, 0, -.01> .05 rotate x*-90 translate <0, .2, -.26> texture{ pigment{ color Black } } } box{ <-.01, .1, .001> <.01, -.075, -.001> translate <0, .1, -.26> texture{ pigment{ color Black } } } box{ <-.1, .01, .01> <.1, -.01, -.01> translate <0, -.05, -.25001> texture{ pigment{ gradient x color_map{ [0.0 0.2 color Yellow color Red] } } translate <-.1, 0, 0>} } } rotate y*-10 translate <-2.6, .15, 1.25> } #declare Drink=object{ union{ difference{ cone{ <0, -1, 0> .5 <0, 1, 0> .55 } cone{ <0, -.99, 0> .49 <0, 1.01, 0> .54 } texture{ Glass2 } } cone{ <0, -1.002, 0> .485 <0, .75, 0> .537 texture{ pigment{ color Red filter .9 } } } } scale <.2, .2, .2> translate <-2.25, .1, .2> } #declare Bowl=object{ union{ difference{ sphere{ <0, 0, 0> .5 } union{ plane{ y, .0001 rotate x*-180} plane{ y, -.3 } sphere{ <0, 0, 0> .48 } } texture{ pigment{ color LightSteelBlue } } } cylinder{ <0, -.3, 0> <0, -.325, 0> .4 texture{ pigment{ color LightSteelBlue } } } } scale <.75, .75, .75> translate <.15, .75, -1> } #declare Fruit= sphere{ <0, 0, 0> .1 texture{ Peel } } #declare ToasterCord= cylinder{ <.1, 0, 0> <-1., 0, 0> .01 texture{ pigment{ color Black } } rotate y*15 translate <-2.8, 1/16, 1.7> } /////////////////////////////////////////////////////////////////////////// // putting it all in the scene /////////////////////////////////////////////////////////////////////////// #declare Room= union{ object{ Countertop } object{ CuttingBoardRim } object{ CuttingBoard } object{ Wall } object{ Cabinet translate <0, 0, .2> } object{ Cabinet rotate y*-90 translate <.2, 0, 0> } object{ Floor } object{ Drawer translate <.3, -.5, -.5> } object{ Drawer translate <.3, -1, -.5> } object{ Dishwasher } object{ TV } object{ Drawer rotate y*-90 translate <-2.75, -.5, .3> } object{ Drawer rotate y*-90 translate <-2.75, -1, .3> } object{ Notepad translate <0, .3, 0> } object{ Pencil } object{ Toaster } object{ Drink } object{ Bowl } // <.15, .75, -1> object{ Fruit translate <.05, .8, -1> } object{ Fruit translate <-.05, .8, -1.2> } object{ Fruit translate <-.15, .9, -1> } object{ Fruit translate <-.15, .9, -1.15> } object{ Fruit translate <.1, .85, -1.1> } object{ ToasterCord } } object{ Room }