// Persistence of Vision Ray Tracer Scene Description File // File: iso_csg_test02.pov // Vers: 3.5 // Desc: iso_csg demo // Date: Feb. 2002 // Auth: Christoph Hormann // background { color <0.750,0.500,0.300> } camera { location <-10, 25, 10>*1.5 direction y sky z up z right 1.33333*x look_at <0, 0, 1.7> angle 28 } light_source { <-1000, 2500, 4800> color rgb 1.2 } #include "iso_csg.inc" #declare fn_2=IC_Box(<-0.3,0,0>,<0.3,10,2>) #declare fn_3=IC_Cylinder(<-0.5,5,2>,<0.5,5,2>, 1) #declare fn_1=IC_Difference2(function { fn_2(x, y, z) }, function { fn_3(x, y, z) }) #undef fn_2 #undef fn_3 #declare fn_2=IC_Rotate(function { fn_1(x, y, z) }, <0,0,20>) #declare fn_3=IC_Rotate(function { fn_1(x, y, z) }, <0,0,40>) #declare fn_4=IC_Merge3(function { fn_1(x, y, z) }, function { fn_2(x, y, z) }, function { fn_3(x, y, z) }) #undef fn_1 #undef fn_2 #undef fn_3 #declare fn_2=IC_Rotate(function { fn_4(x, y, z) }, <0,0,60>) #declare fn_3=IC_Rotate(function { fn_4(x, y, z) }, <0,0,120>) #declare fn_1=IC_Merge3(function { fn_4(x, y, z) }, function { fn_2(x, y, z) }, function { fn_3(x, y, z) }) #undef fn_4 #undef fn_2 #undef fn_3 #declare fn_2=IC_Rotate(function { fn_1(x, y, z) }, <0,0,180>) #declare fn_3=IC_Merge2(function { fn_1(x, y, z) }, function { fn_2(x, y, z) }) #undef fn_1 #undef fn_2 #declare fn_2=IC_Cone(<0, 0,0>,2,<0, 0, 4.2>,0) #declare fn_1=IC_Merge2(function { fn_3(x, y, z) }, function { fn_2(x, y, z) }) #undef fn_2 #undef fn_3 // ----- POV logo ------ #declare fn_8=IC_Sphere(<0,2,0>,1) #declare fn_3=IC_Sphere(<0,2,0>,1.4) #declare fn_2=IC_Scale(function { fn_3(x, y, z) }, <1,1,2>) #declare fn_3=IC_Cone(<0,2,0>,1,<0,-4,0>,0) #declare fn_4=IC_Difference2(function { fn_3(x, y, z) }, function { fn_2(x, y, z) }) #undef fn_2 #undef fn_3 #declare fn_3=IC_Sphere(<0,0,0>,1) #declare fn_2=IC_Scale(function { fn_3(x, y, z) }, <2.6, 2.2, 1>) #declare fn_5=IC_Sphere(<0,0,0>,1) #declare fn_7=IC_Transform(function { fn_5(x, y, z) }, transform { scale <2.3, 1.8, 2> translate <-0.35, 0, 0> }) #undef fn_5 #declare fn_6=IC_Difference2(function { fn_2(x, y, z) }, function { fn_7(x, y, z) }) #declare fn_5=IC_Transform(function { fn_6(x, y, z) }, transform { rotate z*30 translate 2*y }) #undef fn_2 #undef fn_3 #undef fn_6 #undef fn_7 #declare fn_3=IC_Merge3(function { fn_8(x, y, z) }, function { fn_4(x, y, z) }, function { fn_5(x, y, z) }) #declare fn_2=IC_Transform(function { fn_3(x, y, z) }, transform { rotate <0, 0, -25> translate <-0.5,-0.35,0> scale 0.7 rotate 90*x rotate 180*z translate 4.5*z}) #undef fn_3 #undef fn_4 #undef fn_5 #undef fn_8 #declare fn_3=IC_Merge2(function { fn_1(x, y, z) }, function { fn_2(x, y, z) }) /* merge { sphere {2*y, 1} difference { cone {2*y, 1, -4*y, 0} sphere {2*y, 1.4 scale <1,1,2>} } difference { sphere {0, 1 scale <2.6, 2.2, 1>} sphere {0, 1 scale <2.3, 1.8, 2> translate <-0.35, 0, 0>} rotate z*30 translate 2*y } rotate <0, 0, -25> translate <-0.5,-0.35,0> scale 1/4 } */ #declare fn_N=function { (f_noise3d(x/2, y/2, z/2)-0.5)*0.75 } #declare fn_XX= //function { fn_3(x, y, z) } function { fn_3(x+fn_N(x, y, z), y+fn_N(x+10, y, z), z+fn_N(x-10, y, z)) } isosurface { function { fn_XX(x, y, z) } max_gradient 1.6 //evaluate 1.2, 1.2, 0.9 contained_by { box { -8+z*5, 8+2*z } } pigment { rgb <0, 0.2, 1.1> } finish { specular 0.3 } scale 1.2 }