// 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 "shapes.inc" global_settings { assumed_gamma 1.0 } // ---------------------------------------- camera { location <0, 0.5, -24.0> direction 1.5*z right x*image_width/image_height look_at <0.0, 0.0, 0.0> angle 12 } // a "smoothly turning on" function //(0 off to 1 on transitions) //tt is "current time" //tt0 is turn on time start //dtt is turn on time duration #declare transitor=function(tt,tt0,dtt) { .5*(1-cos(min(max(tt-tt0,0),dtt)/dtt*pi))} sky_sphere { pigment { White } } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <-30, 30, -30> } // ---------------------------------------- /*plane { y, -3 pigment { color rgb <0.7,0.6,0.5> } } */ #declare wholecone=cone { <0, -2, 0>,1, <0, 1, 0>, 0} #declare lclock=clock+.0; #declare q=80*transitor(lclock,.35,.6); #declare boxsize=2; #declare boxy=.65+(1-transitor(lclock,0,.25)); // #declare csampler= intersection{ Wedge(90+q) box{-5*z-boxsize/2*y,+5*z+boxsize/2*y+boxsize*x} translate -boxsize*x*.5 rotate -x*90 translate boxy*y } #declare slab=difference{ object{csampler scale <.99,1,.99>} object{csampler translate .05*y} } union{ intersection{ //cone top object{wholecone} object{csampler} pigment{color rgbt <.8,.2,.2,.5>} } difference{ //cone bottom object{wholecone} object{csampler} pigment{color rgbt <.2,.2,.8,.5>} } object{slab pigment{color rgbt <.7,.7,.5,.7>} } intersection{ object{slab} object{wholecone} pigment{color rgbt <.3,.7,.3,0>}} rotate y*45 translate -.75*x+.5*y rotate x*15 } //the shape (conic section) intersection{ object{slab} object{wholecone} pigment{color rgbt <.3,.7,.3,.0>} rotate z*(q+90) rotate y*90 translate 1.25*x translate -boxy*z translate -1.0*y }