//-------------------- Fig.15.2 animation 2
// command line Input
// +KFF30
#version 3.7
#include "colors.inc"
#include "textures.inc"
#include "Woods.inc"
#include "skies.inc"
global_settings
{ assumed_gamma 2.2 }
//---------------------------camera and light
camera{
location <0,-4.3,0.5>
sky <0, 0, 1>
right <-image_width/image_height,0,0>
look_at <0, 0, 1.2>
}
light_source { <0, 200, 500> color White*1.3 }
light_source { <0, -5, 150> color White*0.5 }
//===================================== room
//-----------------------------wall
difference {
box{0,1 scale <800,0.5,800> translate <-400,-0.25,0>
texture {T_Wood1 scale 0.5}
finish { ambient 0.6}
}
box{-1,1 scale <2,0.5,3>
pigment{ rgb<1,0.7,0.5> }
finish { ambient 0.3}
}
}
//----------------------------pillar
cylinder {0,z*3,0.15
pigment{ rgb 1 }
finish { ambient 0.2}
}
//----------------------------door
box{0,1 scale <4,0.06,3> translate <-2,-0.03,0>
texture {T_Wood7 scale 1}
finish { ambient 0.6}
rotate <0, 0,clock*180 > // <<<-------- clock
}
//----------------------------floor
box{-1,1 scale<20,20,1> translate <0,-20,-0.99>
pigment{checker rgb<1,1,0.9>
rgb<1,1,0.9>*1.2 scale 0.5 }
}
//--------------------------------plane
plane{z,0
pigment{rgb<0.75,0.8,0.5>*1.2}
normal{granite 0.3 scale 5}
}
//======================================= sky
sky_sphere{
pigment{
wrinkles
color_map{
[ 0.3 SkyBlue]
[ 0.9 White ]
}
scale <1, 0.2, 0.2>
}
}
object{ O_Cloud1 rotate x*90
rotate z*(clock*30+20) } // <<<------ clock