#include "colors.inc" #include "metals.inc" #include "finish.inc" #include "golds.inc" #include "math.inc" #include "woods.inc" #include "shapes.inc" #include "textures.inc" #declare stringlength = 20; #declare str_plus=stringlength+2.2; #declare tablesize = 16; #declare dangle = 30; #declare tlength = 5.85-2.15; #declare conelenth = .85; global_settings { assumed_gamma 1.2 max_trace_level 15 ambient_light rgb<1, 1, 1> } #declare xbi=(stringlength)*sin(dangle*pi/180); #declare ybi=(stringlength)*(1-cos(dangle*pi/180))+2.2; union{ torus{xbi,.1 translate ybi*y} cylinder{<0,-1,0>,<0,str_plus,0>,.1} pigment{ color rgbf <.8,.8,.8,.9> } finish { phong .8 phong_size 200 ambient 1.0 } } union{ union{ union{ sphere { <0, 0, 0>, 1 } torus { 0.1, 0.05 rotate x*90 translate y*1} texture{T_Brass_3A } // texture{ pigment { color rgbf <.4,.0,.0,.8> }} } union{ torus { 0.1, 0.1 rotate z*90 translate y*2.1} cylinder { <0, 1.15, 0>, <0, stringlength, 0>, .1 } texture {T_Gold_5E } } union{ cylinder{<0, 1.15, 0>, <0, 1.15+tlength-conelenth, 0>, .2} cone{<0, 1.15+tlength-conelenth, 0>, .55,<0, 1.15+tlength, 0>, .0001} text { ttf "Times" "T" .005, 0 scale 2.5 translate <-.5,0,0> rotate -clock*360*y rotate -dangle*z translate <0, 1.45+tlength, 0> } pigment{ color rgb <1,0,0> } finish { phong .8 phong_size 200 ambient 1.1 } } translate -stringlength*y rotate dangle*z translate (stringlength+2.2)*y } union{ cylinder{, , .15} cone{,.55,, .0001} text { ttf "Times" "w" .005, 0 scale 2.5 translate <-.7,-.4,0> rotate -clock*360*y translate } pigment{ color rgb <.0,.9,.10> } finish { phong .8 phong_size 200 ambient 1.1 } } union{ cylinder{, , .15} cone{,.55,, .0001} text { ttf "Times" "a" .005, 0 scale 2.5 translate <-.4,0,0> rotate -clock*360*y translate } pigment{ color rgb .8*<1,.8,0> } finish { phong .8 phong_size 200 ambient 1.1 } } union{ intersection{ torus{stringlength/4,.1} Wedge(dangle) rotate x*90 translate (stringlength+2.2)*y } text { ttf "Symbol" "q" .005, 0 scale 2.5 translate <-.2,0,0> rotate -clock*360*y translate <1.4, stringlength*.75, 0> } pigment{ color rgb <.1,.1,.7> } finish { phong .8 phong_size 200 ambient 1.1 } } rotate clock*360*y } /* camera is far away with narrow FOV to reduce distortion */ camera { location 3*<0, stringlength ,-6*stringlength> look_at <0, stringlength/2, 0> angle 7 } //ambient illumination is too dark light_source { <0,+80,-40> color White} /* build the tamble lumber */ #declare leg = cylinder{<0,-stringlength/2,0>,<0,+str_plus+.5,0>,.5} merge{ object{ leg translate (x+z)*tablesize} object{ leg translate (x-z)*tablesize} object{ leg translate -(x+z)*tablesize} object{ leg translate -(x-z)*tablesize} cylinder{-(x-z)*tablesize+str_plus*y,(x-z)*tablesize+str_plus*y,.5} cylinder{-(x+z)*tablesize+str_plus*y,(x+z)*tablesize+str_plus*y,.5} texture{T_Wood32 } } //Table surface box { <-tablesize, -.1-1, -tablesize>, pigment { hexagon P_Silver5, P_Brass1, P_Gold1 scale .75 } finish{ F_MetalA} } //the sky from doc's standard example sky_sphere { pigment { gradient y color_map { [0.000 0.002 color rgb <1.0, 1, 0.8> color rgb <1.0, 1, 0.8>] [0.002 0.200 color rgb <0.8, 0.8, 0.6> color rgb <0.2, 0.2, 0.8>] } scale 2 translate -1 } rotate -105*x rotate y*90 } plane { //grassy plane y, -.75*tablesize texture { // pigment { color rgbt <.2,.9,.2,.1> } pigment { color rgbt <.6,1,.7,0> } // normal { bumps 0.3 scale .05 } finish { phong 20 ambient .5 diffuse .3} // pigment { color rgbt <.2,.9,.2,.1> } // normal { bumps 0.3 scale 0.05 } // finish { phong 10 } } }