#version 3.7; #declare R = 0.75; #declare Step=2; #declare T = texture { pigment { color rgb<1.0, 0.7, 0.5> } finish { phong 0.5 reflection 0.375 } } // the loop union { // merge { cylinder { <-1,+1,+1>,<+1,+1,+1>, R } cylinder { <-1,-1,-1>,<-1,-1,+1>, R } cylinder { <+1,-1,-1>,<+1,+1,-1>, R } // sweep 1: XY plane: from red to blue, around the green #declare W=0; #while(W<=270) sphere { <0,2,+1>, R rotate z*W translate <-1,-1,0> + <0,0,-2*W/270> // pigment { color rgb <0,0,1> + <1,1,0>*W/270} } #declare W=W+Step; #end // sweep 2: XZ plane: from green to red around the blue #declare W=0; #while(W<=270) sphere { <-2,-1,0>, R rotate -y*W translate <0, +2*W/270, 0> + <+1,0,-1> } #declare W=W+Step; #end // sweep 2: YX plane: from green to blue around the red #declare W=0; #while(W<=270) sphere { <-1,-2,+0>, R rotate -x*W translate <+2*W/270,0,0> translate <0,+1,+1> // pigment { color rgb <0,0,1> + <1,1,0>*W/270} } #declare W=W+Step; #end texture {T} rotate -y*clock*360 } light_source { <-33,33,-33> color 1 area_light <5,0,0>, <0,5,0>, 5,5 jitter adaptive 1 } camera { location <5,5,-15> look_at <0,0,0> angle 35.7 }