#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 = 15; #declare str_plus=stringlength+2.2; #declare tablesize = 12; #declare dangle = 35; #declare tlength = 5.85-2.15; //overall length of tension vector #declare conelenth = .85; //length of vector cones global_settings { assumed_gamma 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.1 } no_shadow no_reflection } union{ union{ union{ sphere { <0, 0, 0>, 1 } torus { 0.1, 0.05 rotate x*90 translate y*1} texture{T_Silver_5E} // 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>, .25} 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 rgbf <1,0,0,.2> } finish { phong .8 phong_size 200 ambient 1.1 } no_shadow no_reflection } translate -stringlength*y rotate dangle*z translate (stringlength+2.2)*y } union{ cylinder{, , .25} cone{,.55,, .0001} text { ttf "Times" "w" .005, 0 scale 2.5 translate <-.7,-.4,0> rotate -clock*360*y translate } pigment{ color rgbf <0,1,0,.2> } finish { phong .8 phong_size 200 ambient 1.1 } no_shadow no_reflection } union{ cylinder{, , .25} cone{,.55,, .0001} text { ttf "Times" "a" .005, 0 scale 2.5 translate <-.4,0,0> rotate -clock*360*y translate } pigment{ color rgbf <1,1,0,.2> } finish { phong .8 phong_size 200 ambient 1.1 } no_shadow no_reflection } 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 rgbf .8*<1,.4,.0,.2> } finish { phong .8 phong_size 200 ambient 1.1 } no_shadow no_reflection } rotate clock*360*y } /* camera is far away with narrow FOV to reduce distortion */ camera { location .6*<0, 1.5*stringlength ,-6*stringlength> look_at <0, .55*stringlength, 0> angle 45 } //ambient illumination is too dark light_source {100*<.2,+1,-1> color <1,1,.4>} /* 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_Brass5, P_Gold5 scale 1.25 } finish{ F_MetalC} } //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 } pigment { bozo turbulence 0.65 octaves 6 omega 0.7 lambda 2 color_map { [0.0 0.1 color rgb <0.85, 0.85, 0.85> color rgb <0.75, 0.75, 0.75>] [0.1 0.5 color rgb <0.75, 0.75, 0.75> color rgbt <1, 1, 1, 1>] [0.5 1.0 color rgbt <1, 1, 1, 1> color rgbt <1, 1, 1, 1>] } scale <0.2, 0.5, 0.2> } 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 } } }