// POLYHEDRA / Drum Shaped Polyhedron Family '00.12 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.1; global_settings { assumed_gamma 2.2 } camera { location <0,50,-100> angle 5.6 look_at <0,0,0> } light_source { <100,500,-100> color rgb <1,1,1> } #declare Texpla= texture { pigment { color rgbt <1,0.5,0.2,0> } finish { reflection 0 ambient 0.4 phong 1 brilliance 1 } } #declare Texplb= texture { pigment { color rgbt <0.2,1,0.5,0> } finish { reflection 0 ambient 0.4 phong 1 brilliance 1 } } #declare Texplc= texture { pigment { color rgbt <0.5,0.2,1,0> } finish { reflection 0 ambient 0.4 phong 1 brilliance 1 } } #macro Polynt (N) #declare A=asin((1-cos(pi/N))/sqrt(3)/sin(pi/N)); #declare Ra=sqrt(3)/4*cos(A); #declare Rb=sqrt(1/pow(sin(pi/N)*2,2)+3*pow(cos(A)/4,2)-1/3); intersection { plane { y,Ra texture {Texpla} } plane { -y,Ra texture {Texpla} } #declare I=0; #while (I Rb+0.5 } } no_shadow } #end #macro Polyns (M) #declare Ra=0.5; #declare Rb=1/tan(pi/M)/2; intersection { plane { y,Ra texture {Texplc} } plane { -y,Ra texture {Texplc} } #declare I=0; #while (I Rb+0.5 } } no_shadow } #end // #declare K=3; #while (K<8) object { Polynt (K) rotate <20,90,160> translate } #declare K=K+1; #end #declare L=3; #while (L<8) object { Polyns (L) rotate <20,90,170> translate } #declare L=L+1; #end