#version 3.7 global_settings { assumed_gamma 1.0 } #include "colors.inc" #include "textures.inc" #declare SEED = seed(324923); // command line: // povray tori.pov +w512 +h512 +AM2 +A0.0 -J +KI0 +KF1 +KFI0 +KFF39 +KC +ofront.png Declare=Direction=0 // povray tori.pov +w512 +h512 +AM2 +A0.0 -J +KI0 +KF1 +KFI0 +KFF39 +KC +oright.png Declare=Direction=1 // povray tori.pov +w512 +h512 +AM2 +A0.0 -J +KI0 +KF1 +KFI0 +KFF39 +KC +oback.png Declare=Direction=2 // povray tori.pov +w512 +h512 +AM2 +A0.0 -J +KI0 +KF1 +KFI0 +KFF39 +KC +oleft.png Declare=Direction=3 // povray tori.pov +w512 +h512 +AM2 +A0.0 -J +KI0 +KF1 +KFI0 +KFF39 +KC +otop.png Declare=Direction=4 // povray tori.pov +w512 +h512 +AM2 +A0.0 -J +KI0 +KF1 +KFI0 +KFF39 +KC +obottom.png Declare=Direction=5 #include "skies.inc" sky_sphere { S_Cloud5 } camera { // Note: This camera settings are such that the sides of the cube // are seamless. location 0 up 2*image_height/(image_height-1)*y right 2*image_width/(image_width-1)*x direction z // Looking directions (ordered like in node.lua) #if (Direction = 0) rotate 0 #elseif (Direction = 1) rotate 90*y #elseif (Direction = 2) rotate 180*y #elseif (Direction = 3) rotate -90*y #elseif (Direction = 4) rotate -90*x #elseif (Direction = 5) rotate 90*x #end translate <0,3,0> } light_source { <0,3,0> color White*0.3 shadowless } union { light_source { 0 color White*1 } sphere { 0, 2 pigment { color White } finish { diffuse 0 ambient 10 } no_shadow } translate <-40, 80, 20> } // The big torus union { #declare ti = 0; #declare tcount=40; #while (ti < tcount) torus { 1, 0.08 //pigment { color White } texture { PinkAlabaster scale 0.1 } rotate x * 90 translate y*3 rotate x * ti*360/tcount } #declare ti = ti+1; #end // the clock runs in [0,1[ rotate x * -clock*360/tcount } // the ladder torus { 2.5, 0.01 rotate z*90 //pigment { color Gray } texture { Chrome_Metal scale 0.1 } translate x*0.2 } torus { 2.5, 0.01 rotate z*90 //pigment { color Gray } texture { Chrome_Metal scale 0.1 } translate x*-0.2 } #declare li = 0; #declare lcount=100; #while (li < lcount) union { cylinder { <-0.2,2.5,0> <0.2,2.5,0> 0.01 texture { EMBWood1 scale 0.02 translate } } sphere { <-0.2,2.5,0> 0.02 texture { New_Brass } } sphere { < 0.2,2.5,0> 0.02 texture { New_Brass } } cylinder { <-0.2,2.5,0> <-0.2,2.8,0> 0.01 texture { Chrome_Metal scale 0.1 } //pigment { color Gray } } sphere { <-0.2,2.8,0> 0.02 texture { Gold_Metal scale 0.1 } } rotate x * (li+0.3)*360/lcount } #declare li = li+1; #end // Some random objects: #macro randob() #local ob_type = rand(SEED) * 2; #if (ob_type < 1) sphere { 0, 1 #else box { -1, 1 #end rotate scale 3 * rand(SEED) translate x*(20+rand(SEED)*20) rotate pigment { color rgb } finish { specular albedo 0.1 roughness 0.01 } } #end #declare i = 0; #while (i < 300) randob() #declare i = i+1; #end