|
 |
Hello POV-Ray Users!
So, i was rendering an animation of a metronome whose pendulum swings back and
forth between a specific angle and its negative.
Here's how I did it:
#declare maxangle = 35;
#declare actangle = maxangle * sin( clock * 4 ) * cos( clock * 4 );
polygon {
5,
<-.06,0>, <-.06,2.6>, <.06,2.6>, <.06,0>, <-.06,0>
texture{ Chrome_Metal
// normal { bumps 0.5 scale 0.05 }
// finish { phong 1 }
} // end of texture ---------------------------
translate <0,0,0>
rotate <0,0,clock*actangle>
translate <0,.3,-.8>
}
}
object { metronome
scale .5 }
This is not the complete scene, just the pendulum, which is a polygon that
rotates (maxangle value).
(I'm not an experienced user, and I don't know much about trigonometry and stuff
like that, srry.)
However, the pendulum doesn't swing back and forth constantly (as it should);
instead, it moves a very short distance at the beginning of the animation, and
as the animation progresses, the distance it travels increases until it exceeds
the angle that had been set (or so I think) as the maximum.
If anyone knows what's going on and how to fix it, I would really appreciate
it if you could share your knowledge with me.
Thanks!
(sorry if my english is bad, most of this post was translated)
- S I R ?
Post a reply to this message
|
 |