// THIS SCENE BEGAN WITH BOB HUGHES' WORK ON TWISTED TORII, // WHICH WAS PRECIPITATED BY PETER POPOV'S POSTING IN P.B.I. // // THE BASICS OF THIS SCENE ARE FAIRLY SIMPLE. // WHAT YOU ARE SEEING ARE TWO TWISTED TORII. // A LARGER, OUTER TORUS HAS A SILVER-TONED GLASS // TEXTURE. THE SMALLER, INNER TORUS IS CUT DIFFERENTLY // IN THAT IT HAS NEGATIVE BLOB COMPONENTS RUNNING IN A // BACKWARDS ROTATION AND CUTTING A NIFTY, TWISTING HOLE // IN THE TWISTED TORUS. THIS TORUS HAS A GOLD, GLASSLIKE // TEXTURE AND HAS AN EMITTING MEDIA CONTAINED WITHIN IT. // // DAVID R. HEYS #version unofficial MegaPov 0.5; global_settings { assumed_gamma 2.2 max_trace_level 100 ambient_light 0.25 /* assumed_gamma 2.2 max_trace_level 100 ambient_light 0.25 ini_option "+QR" ini_option "Preview_Start_Size=8" ini_option "Preview_End_Size=4" radiosity{ count 75 nearest_count 5 error_bound 1 recursion_limit 4 low_error_factor .5 gray_threshold 0.0 minimum_reuse 0.015 brightness 3.5 max_sample 1 adc_bailout 0.01/.25 } */ photons{ count 20000 autostop 0 jitter .4 } } #include "colors.inc" #declare cm1= camera{ location <0,3,-10> look_at <0,1,0> } camera {cm1} light_source{<0,40,-100> rgb .15} light_source{<20,40,20> rgb .5 spotlight point_at <0,-1.25,0> radius 3 falloff 5 tightness 15} light_source{<-20,40,20> rgb .5 spotlight point_at <0,-1.25,0> radius 3 falloff 5 tightness 15} light_source{<20,40,-20> rgb 0.65 spotlight point_at <0,-1.25,0> radius 3 falloff 5 tightness 15} light_source{<-20,40,-20> rgb 0.65 spotlight point_at <0,-1.25,0> radius 3 falloff 5 tightness 15} box {<-500,-1.5,-500>,<500,500,500> pigment { marble color_map { [0 Coral/2] [0.4 Brown/2] [0.8 Gold] } turbulence 0.4 scale <5,5,13> } finish {ambient 0.125 reflection 0.22} hollow rotate 45*y } #declare TURNS = 8; // total number of sub-loops #declare RADIUSX = .25; // mess with these to make oblong CIRCLECOIL #declare RADIUSZ = .25; // or wider coils // minor radius of CIRCLECOIL #declare MRADIUSX = 1.25; // major radius of CIRCLECOIL #declare MRADIUSZ = 1.25; // major radius of CIRCLECOIL #macro CIRCLECOIL ( TURNS, RADIUSX, RADIUSZ, MRADIUSX, MRADIUSZ ) blob { #declare I = 0+clock; #while ( I < 1+clock ) sphere {0,0.5,2 scale <1,0.5,1> translate < sin(I*((2*TURNS)*pi))*RADIUSX, 0.0, cos(I*((2*TURNS)*pi))*RADIUSZ > rotate <0,0,90-(I*360)> translate < sin(I*(2*pi))*MRADIUSX, cos(I*(2*pi))*MRADIUSZ, 0.0 > } sphere {0,0.5,-2 scale <0.5,2,0.5> translate < -sin(I*((2*TURNS)*pi))*RADIUSX, 0.0, -cos(I*((2*TURNS)*pi))*RADIUSZ > rotate <0,0,90-(I*360)> translate < -sin(I*(2*pi))*MRADIUSX, -cos(I*(2*pi))*MRADIUSZ, 0.0 > } #declare I = I + 0.01; // decrease to make smoother but takes longer to parse #end hollow } #end #macro CIRCLECOIL2 ( TURNS, RADIUSX, RADIUSZ, MRADIUSX, MRADIUSZ ) blob { #declare I = 0+clock; #while ( I < 1+clock ) sphere {0,0.6,2 scale <1,0.6,1> translate < sin(I*((2*TURNS)*pi))*RADIUSX, 0.0, cos(I*((2*TURNS)*pi))*RADIUSZ > rotate <0,0,90-(I*360)> translate < sin(I*(2*pi))*MRADIUSX, cos(I*(2*pi))*MRADIUSZ, 0.0 > } #declare I = I + 0.01; // decrease to make smoother but takes longer to parse #end hollow } #end object { CIRCLECOIL ( TURNS, RADIUSX, RADIUSZ, MRADIUSX, MRADIUSZ ) rotate 90.0*x pigment {Gold filter 0.5 transmit 0.5} interior { ior 1.5 media { emission 1.0 method 3 density { bozo scale <.4,0.3,0.3> turbulence .85 octaves 2 lambda 1.01 omega .75 rotate 90*z density_map { [0 Gold] [0.1 Gold*4] [0.2 Coral*4] [0.3 Coral] [0.4 rgb 0] [0.5 rgb -1] [0.6 rgb 0] [0.7 Coral] [0.8 Coral*4] [0.9 Gold*4] [1 Gold] } } scale 2 } } scale 2 } object { CIRCLECOIL2 ( TURNS, RADIUSX+0.1, RADIUSZ+0.1, MRADIUSX, MRADIUSZ ) rotate 90.0*x pigment {Silver transmit 0.7} finish { ambient 0.125 blinn 40 facets 0.12421}// reflection 0.15 } scale 2 interior {ior 1.5} photons { target refraction on reflection off ignore_photons } }