home *** CD-ROM | disk | FTP | other *** search
- // CLOCK MODIFIER: EXAMPLE ANIMATION 1
- // ***********************************
- // This animation shows how the modified clock can be used to
- // translate objects in various ways. It also shows how the
- // clock_repeat option can be used.
-
- // CAMERA AND LIGHTS
- camera {location <0, 0, -20> look_at <0, 0, 0> angle 40}
- light_source {<50, 50, -50> rgb 1}
-
- // ROD OBJECTS
- #declare Rod = cylinder {-x * 10, x * 10, .2
- pigment {checker rgb <1, 1, 1>, rgb <.5, .5, .5> translate y * .5}}
-
- object {Rod}
- object {Rod translate y * 3}
- object {Rod translate y * -3}
-
- // TOP SPHERE (Accelerates from left to right)
- sphere {<0, 0, 0>, 1
- pigment {rgb <1, 0, 0>} finish {phong .5}
- #declare clock_type = "Accelerate" #include "ClockMod.inc"
- translate <-5, 3, 0> + mclock * x * 10}
-
- // BOTTOM SPHERE (Decelerates from left to right)
- sphere {<0, 0, 0>, 1
- pigment {rgb <1, 1, 0>} finish {phong .5}
- #declare clock_type = "Decelerate" #include "ClockMod.inc"
- translate <-5, -3, 0> + mclock * x * 10}
-
- // MIDDLE SPHERE (Repeated wave motion)
- sphere {<0, 0, 0>, 1
- pigment {rgb <0, 0, 1>} finish {phong .5}
- #declare clock_type = "Wave" #declare clock_repeat = 2 #include "ClockMod.inc"
- translate <-5, 0, 0> + mclock * x * 10}
-