// Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.5 // Desc: Basic Scene Example // Date: mm/dd/yy // Auth: ? // #version 3.5; #include "colors.inc" #include "textures.inc" #include "metals.inc" #include "woods.inc" global_settings { assumed_gamma 1.0 ambient_light rgb <1, 1, 1> } // ---------------------------------------- #macro make_clock(cc) union{ cylinder { <0, 0, 0>, <0, 0, .1>, 1 pigment{color rgb <1, 1, 1>}} cylinder { <0, 0, 0>, <0, 0, -.02>, .02 pigment{color rgb <0, 0, 0>}} #local i = 1; #local tic_width = .02; #local tic_height = .2; #local tic_depth = .01; #while (i<=12) box { <-tic_width/2, 0, 0>, pigment{color rgb <1, .2, .2>} translate y*.7 rotate z*i*30} #local i = i+1; #end merge { cylinder { <0, -.1, 0>, <0, .7, 0>, .05 } cone { <0, .7, 0>, 0.1, <0, .9, 0>, .001 } pigment{color rgb <.2, .2, 1>} scale <1,1,.1> translate -z*1.1*tic_depth rotate -cc*z*360 } } #end #declare clock_clock=clock; #declare zcar=80*(clock); camera { location <20, 8, 0.0> look_at <0.0, 0.0, zcar> } //tracks #declare tracklength = 900; #declare trackwidth = 2; #declare railwidth = .2; #declare railheight = .52; #declare rail = box{ <-railwidth/2,railheight,-.5*tracklength>, texture{Rust scale .1} } union{ object{rail translate x*trackwidth/2} object{rail translate -x*trackwidth/2} } //wheel #declare wheel_diameter=1.8; #declare wheel= union{ cylinder{<-railwidth/2,0,0>,<+railwidth/2,0,0>,wheel_diameter/2} cylinder{<+railwidth/2,0,0>,<+railwidth,0,0>, wheel_diameter/2+railheight/4} texture{T_Brass_5A } } declare axel=union{ //wheels object{wheel translate y*(railheight+wheel_diameter/2)-x*trackwidth/2} object{wheel rotate y*180 translate y*(railheight+wheel_diameter/2)+x*trackwidth/2} //axel cylinder{<-1.2*trackwidth/2,railheight+wheel_diameter/2,0> <+1.21*trackwidth/2,railheight+wheel_diameter/2,0> .15 texture{Rust scale .001}} //supports union{ box { <-.0, -.35, -.25>, <.15, 1.3, .35> translate <-.7*trackwidth/2,railheight+wheel_diameter/2,0> } box { <-.0, -.35, -.25>, <.15, 1.3, .35> translate <-.7*trackwidth/2,railheight+wheel_diameter/2,0> rotate y*180} texture{T_Chrome_1A}} } #declare tcarwidth=1.3*trackwidth; #declare tcarlength=8; declare tcar = union{ object{axel translate .8*tcarlength/2*z} object{axel translate -.8*tcarlength/2*z} box{<-tcarwidth/2,0,-tcarlength/2>, translate y*(1.3+railheight+wheel_diameter/2) texture{T_Wood13 translate y*4}} } object{tcar translate zcar*z} sky_sphere { pigment { gradient y color_map { [0.0 rgb <0.6,0.7,1.0>] [0.7 rgb <0.0,0.1,0.8>] } } } cone { <0, 1, 0>, 0.0, <0, -1, 0>, 1.0 } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <0, 80, -50> } // ---------------------------------------- plane { y, 0 texture{Sandalwood scale .2}}