// Create an infinite sphere around scene and allow any pigment on it #macro hex2dec(h) #local a=asc(h); #switch a #case 48..58 #local d=a-48; #break #case 65..71 #local d=a-55; #break #end d #end #macro HTML2rgb(html2) #local html=strupr(html2); #local r16=substr(html,0,1); #local r1=substr(html,1,1); #local g16=substr(html,2,1); #local g1=substr(html,3,1); #local b16=substr(html,4,1); #local b1=substr(html,5,1); #local r=16*hex2dec(r16)+hex2dec(r1); #local g=16*hex2dec(g16)+hex2dec(g1); #local b=16*hex2dec(b16)+hex2dec(b1); #end sphere { 0,1 no_image hollow texture { pigment { gradient y scale 2 color_map {[0 color rgb <0.7,0.7,1.0>] [0.5 color blue 0.3] [0.5 color rgb <0.15,0.1,0.1>] [1.0 color <0.5,0.4,0.3>] } } finish { ambient 1 diffuse 0 } } texture { pigment { gradient y scale 2 pigment_map{ [0.5 bozo turbulence 2 color_map {[0.5 color rgbt <1,1,1,1>] [0.7 color rgbt <1,1,1,0>]} scale 1 ][0.5 color rgbt 1] } } finish { ambient 1 diffuse 0 } } scale 100000 } #declare MET_STEEL=texture { pigment{ color rgb <0.6,0.58,0.8> } finish { ambient 0.2 reflection {0.2,0.8} metallic specular 0.2 } } #declare MET_GOLD=texture { pigment{ color rgb <1,0.9,0.2> } finish { ambient 0.2 reflection {0.5,1} metallic specular 0.4 } } // Begin POV code #declare Rust2= texture { pigment { bozo turbulence 0.9 color_map { [0.00 rgbf<0.5, 0.5, 0.7, 1>] [0.22 rgbf<0.6, 0.2, 0.1, 1>] [0.35 rgbf<0.3, 0.0, 0.0, 0.95>] [0.65 rgbf<1, 0.6, 0.0, 0.85>] [0.85 rgbf<0.8, 0.3, 0.0, 0.75>] [0.95 rgbf<0.6, 0.2, 0.0, 0.95>] [1.00 rgbf<0.4, 0.0, 0.0, 0.55>] } } normal { bozo 12.5 turbulence 0.9 } finish { specular 0.13 roughness 0.6 } scale 0.2 } texture { pigment { bozo turbulence 0.9 color_map { [0.00 rgbf<0.5, 0.5, 0.7, 0.95>] [0.22 rgbf<0.6, 0.2, 0.1, 0.95>] [0.35 rgbf<0.3, 0.0, 0.0, 0.9>] [0.65 rgbf<1, 0.6, 0.0, 0.8>] [0.85 rgbf<0.8, 0.3, 0.0, 0.7>] [0.95 rgbf<0.6, 0.2, 0.0, 0.9>] [1.00 rgbf<0.4, 0.0, 0.0, 0.5>] } } normal { bozo 12.5 turbulence 0.9 } finish { specular 0.13 roughness 0.6 } scale 0.25 } texture { pigment { bozo turbulence 0.9 color_map { [0.00 rgbf<0.5, 0.5, 0.7, 0.9>] [0.22 rgbf<0.6, 0.2, 0.1, 0.9>] [0.35 rgbf<0.3, 0.0, 0.0, 0.85>] [0.65 rgbf<1, 0.6, 0.0, 0.75>] [0.85 rgbf<0.8, 0.3, 0.0, 0.65>] [0.95 rgbf<0.6, 0.2, 0.0, 0.85>] [1.00 rgbf<0.4, 0.0, 0.0, 0.45>] } } normal { bozo 12.5 turbulence 0.9 } finish { specular 0.13 roughness 0.6 } scale 0.3 } texture { pigment { bozo turbulence 0.9 color_map { [0.00 rgbf<0.5, 0.5, 0.7, 0.85>] [0.22 rgbf<0.6, 0.2, 0.1, 0.85>] [0.35 rgbf<0.3, 0.0, 0.0, 0.8>] [0.65 rgbf<1, 0.6, 0.0, 0.7>] [0.85 rgbf<0.8, 0.3, 0.0, 0.6>] [0.95 rgbf<0.6, 0.2, 0.0, 0.8>] [1.00 rgbf<0.4, 0.0, 0.0, 0.4>] } } normal { bozo 12.5 turbulence 0.9 } finish { specular 0.13 roughness 0.6 } scale 0.35 } texture { pigment { bozo turbulence 0.9 color_map { [0.00 rgbf<0.5, 0.5, 0.7, 0.8>] [0.22 rgbf<0.6, 0.2, 0.1, 0.8>] [0.35 rgbf<0.3, 0.0, 0.0, 0.75>] [0.65 rgbf<1, 0.6, 0.0, 0.65>] [0.85 rgbf<0.8, 0.3, 0.0, 0.55>] [0.95 rgbf<0.6, 0.2, 0.0, 0.75>] [1.00 rgbf<0.4, 0.0, 0.0, 0.35>] } } normal { bozo 12.5 turbulence 0.9 } finish { specular 0.13 roughness 0.6 } scale 0.4 } texture { pigment { bozo turbulence 0.9 color_map { [0.00 rgbf<0.5, 0.5, 0.7, 0.75>] [0.22 rgbf<0.6, 0.2, 0.1, 0.75>] [0.35 rgbf<0.3, 0.0, 0.0, 0.7>] [0.65 rgbf<1, 0.6, 0.0, 0.6>] [0.85 rgbf<0.8, 0.3, 0.0, 0.5>] [0.95 rgbf<0.6, 0.2, 0.0, 0.7>] [1.00 rgbf<0.4, 0.0, 0.0, 0.3>] } } normal { bozo 12.5 turbulence 0.9 } finish { specular 0.13 roughness 0.6 } scale 0.45 } #declare Rust_Tex = texture { pigment{bumps color_map{ [0.000000 color rgbt <0.113636, 0.113636, 0.113636, 0.000000>] [0.243924 color rgbt <0.395047, 0.243284, 0.147405, 0.000000>] [0.493990 color rgbt <0.676458, 0.372932, 0.181175, 0.000000>] [0.493990 color rgbt <0.676458, 0.372932, 0.181175, 0.000000>] [0.493990 color rgbt <0.676458, 0.372932, 0.181175, 0.000000>] [0.493990 color rgbt <0.676458, 0.372932, 0.181175, 0.000000>] [0.493990 color rgbt <0.676458, 0.372932, 0.181175, 0.000000>] [0.747913 color rgbt <0.838229, 0.447461, 0.200587, 0.000000>] [0.777963 color rgbt <1.000000, 0.521990, 0.220000, 0.000000>] [0.777963 color rgbt <1.000000, 0.521990, 0.220000, 0.000000>] [0.854667 color rgbt <0.602272, 0.321683, 0.133005, 0.000000>] [1.000000 color rgbt <0.204545, 0.121376, 0.046011, 0.000000>] } turbulence 1.2} normal {bumps normal_map{ [0.2 bumps turbulence 1.1 scale 0.01] [0.8 granite turbulence 0.1]} } } #declare SevereRust= texture { bozo scale 3 turbulence 2 texture_map { [0.3 MET_STEEL] [0.5 Rust_Tex] } } #declare LightRust= texture { bozo scale 3 turbulence 1.5 texture_map { [0.6 MET_STEEL] [0.8 Rust_Tex] } } #declare _Rp=3; #declare _Pipe_s_30=cylinder { <0,0,0>,<30,0,0>,_Rp texture { MET_STEEL } } #declare _Pipe_r30_45 = intersection { torus { 30,_Rp rotate x*90} plane { -x,0 } plane { -x,0 rotate z*135} translate -y*30 texture {MET_STEEL} } #declare _Pipe_r30_n45=object{ _Pipe_r30_45 scale <1,-1,1> } #declare _Pipe_r30_30 = intersection { torus { 30,_Rp rotate x*90} plane { -x,0 } plane { -x,0 rotate z*150} translate -y*30 texture {MET_STEEL} } #declare _Pipe_r30_n30=object{ _Pipe_r30_30 scale <1,-1,1> } #declare _Clamp_30= union { cylinder { 0,x*30,_Rp texture {MET_STEEL}} cylinder { x*10,x*20,_Rp+2 texture {MET_GOLD} } torus { _Rp+1,2 rotate z*90 translate x*12 texture {MET_GOLD}} torus { _Rp+1,2 rotate z*90 translate x*18 texture {MET_GOLD}} torus { _Rp,2 rotate z*90 translate x*10 texture {MET_GOLD}} torus { _Rp,2 rotate z*90 translate x*20 texture {MET_GOLD}} } #declare _Flange_s30= union { cylinder{0,x*14,_Rp texture {MET_STEEL}} cylinder{x*16,x*30,_Rp texture {MET_STEEL}} cylinder{x*12,x*14.8,_Rp*3 texture {MET_STEEL} } cylinder{x*15.2,x*18,_Rp*3 texture {MET_STEEL} } #declare _i=0; #while(_i<360) cylinder {x*10,x*20,1.5 translate y*_Rp*2 rotate x*_i texture {MET_GOLD} } #declare _i=_i+(360/8); #end } #declare _Pipe_s60_cool=union{ cylinder {0,x*60,_Rp texture {MET_STEEL}} difference { union { cylinder {x*15,x*45,_Rp*3} cone {x*5,_Rp,x*15,_Rp*3 texture {MET_STEEL}} cone {x*55,_Rp,x*45,_Rp*3 texture {MET_STEEL}} } #local _i=0; #while(_i<360) box{<0,-1,_Rp*2.5>,<60,1,_Rp*3+1> rotate x*_i} #local _i=_i+(360/15); #end texture {MET_STEEL} } } #declare _Pipe_s30_wheel=union{ cylinder {0,x*30,_Rp texture {MET_STEEL}} sphere {0,_Rp texture{MET_STEEL} scale <3,2,2> translate x*15 } union { cylinder {0,y*(_Rp*2+10),2 texture {MET_GOLD}} sphere { y*(_Rp*2+10),4 texture {MET_GOLD}} cylinder {<0,_Rp*2+10,-10>,<0,_Rp*2+10,10>,1 texture {MET_GOLD} rotate y*60} cylinder {<0,_Rp*2+10,-10>,<0,_Rp*2+10,10>,1 texture {MET_GOLD} rotate -y*60} cylinder {<0,_Rp*2+10,-10>,<0,_Rp*2+10,10>,1 texture {MET_GOLD} } difference { torus { 10,2 scale <1,1.2,1> translate <0,_Rp*2+10,0> } #declare th=0; #while(th<360) cylinder { <0,_Rp*2+5,13>,<0,_Rp*2+15,13>,2 rotate y*th} #declare th=th+(360/20); #end texture {MET_STEEL} } translate x*15 rotate -x*30 } } #declare _Pipe_s30_wheel2=object { _Pipe_s30_wheel rotate -x*30 } #declare _Pipe_s30_wheel3=object { _Pipe_s30_wheel rotate -x*90 } #declare _Pipe_s30_wheel4=object { _Pipe_s30_wheel rotate -x*120 } #declare _Join_4_90=union{ cylinder {0,x*60,_Rp texture {MET_STEEL}} cylinder {<30,-30,0>,<30,30,0>,_Rp texture {MET_STEEL}} sphere {<00,0,0>,_Rp*2 translate x*30 texture {MET_GOLD}} } #declare _Join_3_90=union{ cylinder {0,x*30,_Rp texture {MET_STEEL}} cylinder {<30,-30,0>,<30,30,0>,_Rp texture {MET_STEEL}} sphere {<00,0,0>,_Rp*2 translate x*30 texture {MET_GOLD}} } #declare _Join_3_120=union { #local _x=15/cos(radians(30)); cylinder {-x*_x,0,_Rp texture {MET_STEEL}} cylinder {-x*_x,0,_Rp rotate z*120 texture {MET_STEEL}} cylinder {-x*_x,0,_Rp rotate -z*120 texture {MET_STEEL}} sphere {0,_Rp*2 texture {MET_GOLD}} translate x*_x } #declare _PipeEnd_s15=union { cylinder{0,x*2,_Rp texture{MET_STEEL}} cone{x*2,_Rp,x*4,_Rp*2 texture{MET_STEEL}} cylinder{x*4,x*8,_Rp*2 texture{MET_GOLD}} cone{x*8,_Rp*3,x*15,0 texture{MET_GOLD}} } #declare NUM=16; #declare Pipes=array[NUM] {_Pipe_s_30, _Pipe_r30_45, _Pipe_r30_n45, _Pipe_r30_30, _Pipe_r30_n30 _Clamp_30, _Flange_s30, _Pipe_s60_cool, _Pipe_s30_wheel, _Pipe_s30_wheel2, _Pipe_s30_wheel3, _Pipe_s30_wheel4, _Join_4_90, _Join_3_90, _Join_3_120, _PipeEnd_s15 } #declare PipeDis=array[NUM] {x*30, <30*sin(radians(45)),-30*(1-cos(radians(45))),0>, <30*sin(radians(45)),30*(1-cos(radians(45))),0>, <30*sin(radians(30)),-30*(1-cos(radians(30))),0>, <30*sin(radians(30)),30*(1-cos(radians(30))),0>, <30,0,0>, <30,0,0>, x*60, x*30, x*30, x*30, x*30, x*60, <30,-30,0>, <30*sin(radians(60)),-30*(1-cos(radians(60))),0> <0,0,15> } #declare PipeRot=array[NUM] {<0,0,0>, <0,0,-45>, <0,0,45>, <0,0,-30>, <0,0,30>, <0,0,0>, <0,0,0>, <0,0,0>, <0,0,0>, <0,0,0>, <0,0,0>, <0,0,0>, <0,0,0>, <0,0,-90>, <0,0,-60> <0,0,0> } #declare lastP=<-480,0,0>; #declare lastR=<0,0,0>; #macro AddPipe(pipe) #if (pipe>0) object { Pipes[pipe-1] rotate lastR translate lastP } #local Dis=vrotate(PipeDis[pipe-1],lastR); #declare lastR=lastR+PipeRot[pipe-1]; #declare lastP=lastP+Dis; #else #local Dis=vrotate(x*30,lastR); #declare lastP=lastP+Dis; #end #end #macro AddDis(pipe) #if (pipe>0) #local Dis=vrotate(PipeDis[pipe-1],lastR); #declare lastR=lastR+PipeRot[pipe-1]; #declare lastP=lastP+Dis; #else #local Dis=vrotate(x*30,lastR); #declare lastP=lastP+Dis; #end #end #macro AddPipeString(pc) #local i=0; #while (i0) #declare __PosSP=__PosSP-1; #declare lastP=__PS[__PosSP]; #declare lastR=__RS[__PosSP]+z*180; #else #error "Position Stack underflow!\n" #end #end #macro Reverse() #declare lastR=lastR+z*180; #end