#include "colors.inc" #include "textures.inc" camera { location<0,50,-100> look_at<0,30,0> right up y } light_source { <2000,2000,-2000> color White } light_source { <-2000,2000,-2000> color White } //background { color Black } background { color White } fog { color White distance 1550 } #declare Mysky = sphere { <0,0,0>,0.98 texture { Blue_Sky3 finish { reflection 0.0 diffuse 0.0 ambient 1.0 } } } #declare Env=union { difference { sphere { <0,0,0>,1 } object { Mysky } scale <3000,500,3000> texture { Blue_Sky3 finish { reflection 0.0 diffuse 0.0 ambient 1.0 } } no_shadow //rotate<0,Angle,0> } plane { y,-5 texture { Cork normal { bumps .6 } scale <50,50,50> } } } //object { Env } #declare CSeed=seed(5); #declare CaseyGlass=texture { Glass3 finish { ambient .5 diffuse 0 } } #declare R1=seed(5); #declare CountStep=10; #declare Rad=.0625; #declare Top=0; #declare TopStep=.5; #declare CenterX=15; #declare CenterY=0; #declare CenterZ=0; #declare CenterXStep=.05; #declare WormRad=4; #declare WorkRadHalf=WormRad/2; #declare Worm=union { #declare Count=0; #while (Count < 1400) #declare c1=vrotate(,<0,Count,0>); //#declare p2=vrotate(,<0,Count,0>) #declare p1=vrotate(,<0,Count,0>); #declare p2=vrotate(,<0,Count,0>); #declare p3=vrotate(,<0,Count,0>); #declare r3=vrotate(,<0,Count,0>); #declare r4=vrotate(,<0,Count,0>); #declare p4=vrotate(,<0,Count,0>); #declare p5=vrotate(,<0,Count,0>); #declare p6=vrotate(,<0,Count,0>); #declare p7=vrotate(,<0,Count,0>); #declare p8=vrotate(,<0,Count,0>); #declare p1a=vrotate(,<0,Count+CountStep,0>); #declare p2a=vrotate(,<0,Count+CountStep,0>); #declare p3a=vrotate(,<0,Count+CountStep,0>); #declare r3a=vrotate(,<0,Count+CountStep,0>); #declare r4a=vrotate(,<0,Count+CountStep,0>); #declare p4a=vrotate(,<0,Count+CountStep,0>); #declare p5a=vrotate(,<0,Count+CountStep,0>); #declare p6a=vrotate(,<0,Count+CountStep,0>); #declare p7a=vrotate(,<0,Count+CountStep,0>); #declare p8a=vrotate(,<0,Count+CountStep,0>); union { triangle { p1,p2,p1a } triangle { p1a,p2a,p2 } /* union { triangle { p2,p3,p2a } triangle { p2a,p3a,p3 } texture { CaseyGlass pigment { color rgb<0,rand(CSeed)*100/100,rand(CSeed)*100/100> } } } */ triangle { p3,p4,p3a } triangle { p3a,p4a,p4 } /* union { triangle { p4,p5,p4a } triangle { p4a,p5a,p5 } texture { CaseyGlass pigment { color rgb<0,rand(CSeed)*100/100,rand(CSeed)*100/100> } } } */ triangle { p5,p6,p5a } triangle { p5a,p6a,p6 } /* union { triangle { p6,p7,p6a } triangle { p6a,p7a,p7 } texture { CaseyGlass pigment { color rgb<0,rand(CSeed)*100/100,rand(CSeed)*100/100> } } } */ triangle { p7,p8,p7a } triangle { p7a,p8a,p8 } /* union { triangle { p8,p1,p8a } triangle { p8a,p1a,p1 } texture { CaseyGlass pigment { color rgb<0,rand(CSeed)*100/100,rand(CSeed)*100/100> } } } */ texture { Aluminum } } #declare aDiv=.5; difference { sphere { c1,WormRad } box { , } } union { box { , } sphere { <-c1.x,c1.y,c1.z>,WormRad*.5 } cylinder { <-c1.x,c1.y,c1.z>,<0,c1.y,0>,WormRad*.2 } //sphere { <-2,c1.y,c1.z>,WormRad*.5 } texture { Polished_Brass } } union { #declare xCount=0; #while (xCount < 50) #declare xa=c1.x-WormRad*aDiv+(rand(R1)*(WormRad*aDiv*2)); #declare za=c1.z-WormRad*aDiv+(rand(R1)*(WormRad*aDiv*2)); cone { ,WormRad*.1,,.001 } #declare xCount=xCount+1; #end texture { Polished_Brass } //texture { pigment { color White } } } //light_source { c1, color White } sphere { p1,Rad } sphere { p2,Rad } sphere { p3,Rad } sphere { p4,Rad } sphere { p5,Rad } sphere { p6,Rad } sphere { p7,Rad } sphere { p8,Rad } cylinder { p1,p2,Rad } //cylinder { p2,p3,Rad } cylinder { p3,p4,Rad } //cylinder { p4,p5,Rad } cylinder { p5,p6,Rad } //cylinder { p6,p7,Rad } cylinder { p7,p8,Rad } //cylinder { p8,p1,Rad } cylinder { p1,p1a,Rad } cylinder { p2,p2a,Rad } cylinder { p3,r3,Rad } cylinder { r3,r3a,Rad } cylinder { r3,r4,Rad } cylinder { r4,r4a,Rad } union { triangle { r3,r3a,p3 } triangle { p3,p3a,r3a } texture { Ruby_Glass } } cylinder { p3,p3a,Rad } cylinder { p4,p4a,Rad } cylinder { p5,p5a,Rad } cylinder { p6,p6a,Rad } cylinder { p7,p7a,Rad } cylinder { p8,p8a,Rad } cylinder { p7,<0,p7.y,0>,Rad} cylinder { p7a,<0,p7a.y,0>,Rad} union { triangle { p7,p7a,<0,p7.y,0> } triangle { p7,p7a,<0,p7a.y,0> } texture { Ruby_Glass } } #declare WormRad=WormRad-.025; #declare WorkRadHalf=WormRad/2; #declare CenterX=CenterX-CenterXStep; #declare Top=Top+TopStep; #declare Count=Count+CountStep; #end texture { Polished_Brass } } //union { //#declare Count=0 #while (Count < 360) //object { Worm translate<0,10,0> rotate<0,0,Count> } //object { Worm translate<0,10,0> rotate } //#declare Count=Count+10 #end //} object { Worm } union { //plane { y,-5 } sphere { <0,70,0>,3 } cylinder { <0,70,0>,<0,-5,0>,2 } sphere { <0,-5,0>,8 } texture { Polished_Brass } }