// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 // Copyright 2004 by Tor Olav Kristensen // Email: t o r . o l a v . k [_A_T_] g m a i l . c o m // http://subcube.com // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 #version 3.5; #include "colors.inc" #include "rad_def.inc" global_settings { assumed_gamma 1 max_trace_level 12 ambient_light color White radiosity { Rad_Settings(Radiosity_Final, off, off) } photons { spacing 0.02 max_trace_level 5 } } // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 #declare M_Glass = material { texture { pigment { color rgbf <1.0, 0.6, 0.0, 1.2> } finish { ambient 0.0 diffuse 0.05 specular 0.6 roughness 0.001 reflection { 0.1, 0.9 fresnel on } conserve_energy } } interior { ior 1.5 fade_power 1001 fade_distance 0.9 fade_color <0.5,0.8,0.6> } } // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 #macro Tilt_Trans(vTilt) #local v0 = vnormalize(vTilt); #local X = v0.x; #local Y = v0.y; #local Z = v0.z; #if (abs(Y) = 1) #if (Y = 1) #local Transform = transform { } #else #local Transform = transform { rotate 180*z } #end // if #else #local T = (Y - 1)/(X*X + Z*Z); #local Transform = transform { matrix } #end // if transform { Transform } #end // macro Tilt_Trans // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 #declare MajR = 20; #declare MinR = 6; #declare MicR = 1.5; #declare BandThickness = 0.8; #declare NrOfBands = 4; #declare dAngle = 360/NrOfBands; #declare VillarceauTori = union { #declare Cnt = 0; #while (Cnt < NrOfBands) torus { MajR, MicR transform { Tilt_Trans(< MinR, sqrt(MajR*MajR - MinR*MinR), 0>) translate MinR*z rotate Cnt*dAngle*y } } #declare Cnt = Cnt + 1; #end // while } #declare OuterBands = intersection { object { VillarceauTori } torus { MajR, MinR + BandThickness } torus { MajR, MinR + BandThickness/2 inverse } } #declare InnerBands = intersection { object { VillarceauTori } torus { MajR, MinR - BandThickness inverse } torus { MajR, MinR - BandThickness/2 } } union { object { InnerBands } object { OuterBands } texture { pigment { color White*0.6 } finish { ambient 0.0 diffuse 0.6 specular 0.3 } } // photons { reflection on } } #declare NrOfBands = 6; #declare dAngle = 360/NrOfBands; #declare CrossBands = union { #declare Cnt = 0; #while (Cnt < NrOfBands) torus { MinR, BandThickness*6 rotate 90*x translate MajR*x rotate Cnt*dAngle*y } #declare Cnt = Cnt + 1; #end // while } intersection { object { CrossBands } difference { torus { MajR, MinR + BandThickness/2 - 0.01 } torus { MajR, MinR - BandThickness/2 + 0.01 } } material { M_Glass } photons { target 1.0 refraction on reflection on } } plane { y, - MinR - BandThickness*2 texture { pigment { color White - Blue*0.15 } finish { ambient 0.0 diffuse 0.6 specular 0.3 } } } // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 sphere { <0, 0, 0>, 1 hollow texture { pigment { gradient y color_map { [ 0.5 color rgb <0.0, 0.0, 0.5> ] [ 1.0 color rgb <1.0, 1.0, 1.0>*0.7 ] } } finish { ambient color White*0.7 diffuse 0.6 specular 0.3 } scale <1, 2, 1> translate <0, -1, 0> } scale <1, 1, 1>*1000 } light_source { <4, 2, -3>*100 color rgb <1.0, 0.95, 0.90>*1.5 photons { refraction on reflection on } } camera { orthographic location <0, 4, -5>*10 look_at <-10, 1, 0> } // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10