/* Round bottom macro 3/2000 Paul Jones requires rb-liquid-height and rb_liquid_color for povray v3.1g*/ #macro round_bottom (rb_liquid_height, rb_liquid_color, dotest) // declare the round bottom using blobs. #declare flask = merge{ difference{ intersection{ blob { threshold .05 sphere { <0,10,0>, 10,1 } cylinder {<0,19,0> <0,25,0> 3,1 }} plane {y,25}} blob { threshold .05 sphere { <0,10,0>, 9.7,1 } cylinder {<0,19,0> <0,25,0> 2.7,1 }} } torus {2.5,.4 translate <0,24.75,0> }} //declare roundbottom liquid #declare round_bottom_liquid= intersection{ blob { threshold .05 sphere { <0,10,0>, 9.699,1 } cylinder {<0,19,0> <0,25,0> 2.7,1 }} plane {y,rb_liquid_height}} //declare filled roundbottom union{ object {flask #if (dotest=on) texture{pigment{rgbt <.5,.5,.5,0.9>} finish{phong 1}} #else texture { pigment { color rgbt <1,1,1,.99> } finish { ambient 0 diffuse 0.4 reflection 0.05 phong 0.9 phong_size 100}} interior{ior 1.6 fade_distance 1 fade_power 4 caustics 4} translate <0,.01,0> #end } object {round_bottom_liquid #if (dotest=on) texture{pigment{rgb<1,0,0>}} #else texture{ pigment{color rb_liquid_color } finish{reflection .05 ambient .1 diffuse 0.6 phong 1 phong_size 200}} interior{ior 1.33 caustics 4} translate <0,0.01,0> #end } difference { cylinder {<0,0,0> <0,4,0> 8 } cylinder {<0,-1,0> <0,5,0> 5} sphere {<0,12,0> 10} texture{T_Wood7 rotate 25*y scale 6} normal {dents 5 scale 0.2}}} #end