global_settings { assumed_gamma 1 max_trace_level 10 } #include "colors.inc" #include "glass.inc" #include "shapes.inc" light_source { <0, 120, 0> color rgb 1 } camera { location <0, 75, 0> direction z right x look_at 0 angle 22 } plane { y, 0 texture { pigment { color rgb <1,1,1>} finish { ambient 1/*0.8*/ diffuse 0.0 } } } sky_sphere { pigment { gradient y color_map { [0 color rgb 1 ] [1 color rgb 1 ] } } } #declare Obj=3; #declare Object1=object{box { <-2, -1, -2>, <2, 0.5, 2> } material { texture { finish { specular 0.4} pigment {rgb 0.6} }} } #switch(Obj) #case(0) union{ object{Object1} scale 10.0 } #break #case(1) #declare col=Grey; #declare Object2=object{sphere{<0, 1, 0>, 1} material { texture { finish { specular 0.4} pigment {col} }} } difference { object{Object1} object{Object2} scale 10.0 } #break #case(2) #declare col=rgb<0,0.5,1>; #declare Object2=object{sphere{<0, 1, 0>, 1} material { texture { finish { specular 0.4} pigment {col} }} } union{ object{Object1} object{Object2} scale 10.0 } #break #case(3) #declare col=rgb<1,0.5,0>; #declare Object2=object{sphere{<0, 1, 0>, 1} material { texture { finish { specular 0.4} pigment {col} }} } union{ object{Object1} object{Object2} scale 10.0 } #break #end