Sign in to follow this  
LordG

a pendulum problem

Recommended Posts

LordG    122
Hi, I'm having trouble trying to come up with a rotation matrix that transforms a pendulum at a particulur time. So let's say I want to animate a clock pendulum located at the origin with the pendulum weight hanging down vertically (-Y axis) in the XY plane. The pendulum swings through k radians from end to end, this takes m seconds. The pendulum is at one extreme at k/2 radians at time t = 0. One swing of the pendulum is defined by the function sin(a), where -pi/2 <= a <= pi/2 Now the problem is what is the rotation matrix that would give the the transformation of the pendulum at any given time t, to animate the oscillating pendulum. Can anyone help me out? [Edited by - LordG on October 17, 2004 4:11:49 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Actually solving a real (not mathematical) pendulum problem leads to a differential equation, the solution of which cannot be expressed as an elementary function. So there is no exact function of time giving angle. Only approximations are possible, and thus the exact matrix also cannot exist.
So you just can't exactly convert time to angle.
That is if I had understood your question correctly..

(the story is different about a mathematical pendulum, since there we assume that sin(a) = a, for small amplitudes, and the equation becomes solvable (the one tought in school))

Share this post


Link to post
Share on other sites
LilBudyWizer    491
Assuming you don't want a mathematically correct pendulum you could use a function similar to pi/2*cos(2*t*pi/m) to produce the angle. That will at least get it to swing back and forth.

Share this post


Link to post
Share on other sites
LordG    122
No, I don't really care if the pendulum is mathematically correct.

Thanks LilBudyWizer, I think that equation you gave is what I needed.

[Edited by - LordG on October 17, 2004 9:53:32 PM]

Share this post


Link to post
Share on other sites
grhodes_at_work    1385
For small angles, e.g., the pendulum swing back and forth maybe +/- 5 degrees, the sin/cos formulas are pretty darned close to reality. This is provable based on linearization of the governing equations of motion.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
[cos(theta) -sin(theta) 0 0
sin(theta) cos(theta) 0 0
0 0 1 0
0 0 0 1]

where theta = pi/2*cos(2*t*pi/m)

is this a valid 4x4 matrix for the original poster's problem?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this