// Persistence of Vision Ray Tracer Scene Description File // File: rf_patioset.inc // Vers: 3.6 // Desc: Patio Set // Date: June, 2008 // Auth: Rob Fitzel // Units: feet /* Notes: add to your scene file: #include "rf_patioset.inc" object {patio_table} object {table_umbrella} object {patio_chair translate -x*3} object {patio_chair translate -x*3 rotate y*90} object {patio_chair translate -x*3 rotate y*180} object {patio_chair translate -x*3 rotate y*270} */ #include "metals.inc" // speckled surface #macro randbozo2 (col, sc) pigment { bozo color_map { [0 rgb col*0.45 ] [0.5 rgb col*1.0 ] [1 rgb col*0.6] } scale sc } #end // table ///////////////////////////////////////////////////////////////////////////// #declare patio_table = union { cone {<0,0,0>,1,<0,0.3,0>,0.4} torus {0.85,0.02 translate y*2.4} // inner support torus {0.9,0.04 translate y*1} // inner support #local i=0; #while (i<4) union { sphere_sweep { b_spline 6, <0.8, 2.9, 0>, 0.05 // number of specified sphere positions <0.8, 2.7, 0>, 0.05 // position, radius <0.8, 0.7, 0>, 0.05 // ... <1.8,0.3, 0>, 0.05 <1.8, 0, 0>, 0.05 <1.8, -0.2, 0>, 0.05 } cylinder {<1.8,0,0>,<1.8,0.12,0>,0.08} rotate y*90*i } #local i=i+1; #end cylinder {<0,2.4,0>,<0,2.5,0>,2.45 texture {pigment {rgbt <0.9,1,0.95,0.7>}} finish {reflection {0.1}} } // tabletop difference { cylinder {<0,2.4,0>,<0,2.5,0>,2.5} cylinder {<0,2.3,0>,<0,2.6,0>,2.45} } texture {randbozo2(<0.1,0.15,0.1>,0.01) finish {phong 0.2 phong_size 20}} }; // umbrella ///////////////////////////////////////////////////////////////////////////// #declare table_umbrella = union { union { #local i=0; #while (i<8) // main umbrella difference { cone {<0,0,0>, 0 <0,0,4> 1.56 open clipped_by {plane {y,0}} scale <1,0.1,1> } texture {randbozo2(<0.792,0.71,0.604>,0.05) normal {waves 0.1 scale 0.07 rotate x*90 scale <1,2,1>} } rotate x*20 rotate y*i*45 } cylinder {<0,0,0>,<1.56,0,4> 0.03 rotate x*20 rotate y*i*45 translate -y*0.07 pigment {rgb <0.427,0.369,0.349>}} cylinder {<0,-1.7,0>,< 0.8-0.8,-0.75,2> 0.02 pigment {rgb <0.427,0.369,0.349>} rotate y*45/2 rotate y*45*i} // folding lifting arm sphere {< 0.8-0.8,-0.75,2> 0.03 rotate y*45/2 rotate y*45*i texture {T_Silver_1A} } // little upper umbrella cone {<0,0,0>, 0 <0,0,1> 0.39 open clipped_by {plane {y,0}} scale <1,0.2,1> rotate x*20 rotate y*i*45 rotate y*5 translate y*0.1 texture {randbozo2(<0.792,0.71,0.604>,0.05) normal {waves 0.1 scale 0.07 rotate x*90 scale <1,2,1>}} } #local i=i+1; #end translate y*7.5 } union { // stem and umbrella holder cylinder {0,7.6*y,0.11 } // stem cylinder {<0,5.8,0>,<0,5.7,0> 0.15 } cone {<0,5.7,0>,0.15 <0,5.8,0> 0.2 } cylinder {<0,5.8,0>,<0,5.95,0> 0.21 texture {T_Silver_1A}} cone {<0,5.95,0>,0.2 <0,6.05,0> 0.15 } randbozo2(<0.427,0.369,0.349>,0.01) finish {phong 0.1 phong_size 20} normal {bumps 1 scale 0.01} } randbozo2(<0.373,0.518,0.553>,0.01) normal {waves 0.1 scale 0.07 rotate x*90 scale <1,2,1>} finish {phong 0.3 phong_size 20} }; // patio chair ///////////////////////////////////////////////////////////////////////////// #declare patio_chair_leg = union { sphere_sweep { linear_spline // linear curve 3+2, // number of specified sphere positions <7.5, 23, 18.5>, 0.5 // ... <7, 23, 5>, 0.5 <9, 1, 0>, 0.5 <9, 1, 0>, 0.6 <9.05, 0, -0.2>, 0.6 } }; #declare patio_chair_back_legs = sphere_sweep { linear_spline // linear curve 4+4, // number of specified sphere positions <9.05, 0, 22.2>, 0.6 <9, 1, 22>, 0.6 <9, 1, 22>, 0.5 // position, radius <7, 18, 18>, 0.5 // ... <-7, 18, 18>, 0.5 <-9, 1, 22>, 0.5 <-9, 1, 22>, 0.6 <-9.05, 0, 22.2>, 0.6 }; #declare patio_chair_seat_sppt = union { cylinder {<7.5, 17, 4>,<0,17,4> 0.5} sphere_sweep { linear_spline // linear curve 3, // number of specified sphere positions <7.5, 30, 20>, 0.5 // position, radius <7.5, 18, 18>, 0.5 // ... <7.5, 18, 4>, 0.5 } }; #declare patio_chair_back_seat_sppt = torus {7.5,0.5 rotate x*90 clipped_by {plane {y,0 inverse}} rotate x*10 translate <0,30,20>}; #declare patio_chair = union { object {patio_chair_seat_sppt} object {patio_chair_seat_sppt scale <-1,1,1>} object {patio_chair_back_legs} object {patio_chair_leg} object {patio_chair_leg scale <-1,1,1>} object {patio_chair_back_seat_sppt} // seat #local i=5-1; #while (i<17) box {<-7.5,18,0>,<7.5,18.1,1.5> translate <0,0,i>} #local i=i+2; #end difference { union { #local i=20; #while (i<40) box {<-8,0,0>,<8,1.5,1> translate <0,i,0> rotate x*10 translate z*14} #local i=i+2; #end } union { box {<-7.5,0,0.5>,<7.5,12,0.6>} cylinder {<0,12,0.5>,<0,12,0.6> 7.5} rotate x*10 translate <0,18,17.5> inverse } } texture {pigment {rgb 0.9} finish {phong 1 phong_size 50} } translate <0,0,-11> rotate -y*90 scale 1/12 };