For your animation assignment you will need to simulate a swinging pendulum in 2D. Unlike the pendulum we studied in class, which just swings around a fixed point, this pendulum might also be experiencing a translation due to the spline animation. (Consider, for instance, a pendulum clock being quickly thrust around the scene.) So, we need to slightly generalize our equations of motion.
In particular, consider a pendulum in 2D of bar length L and mass m swinging from a pivot point whose location x(t) is a given time-varying function. Your job is to come up with an equation that describes the motion of the pendulum in terms of the angle theta(t) with the vertical, and the corresponding angular velocity omega(t).
This quiz has been broken down into many parts, each of which should be pretty simple. If you find yourself doing a lot of work for one question, you may be on the wrong track!
Let y(t) denote the position of the swinging endpoint. What is y as a function of theta and L? And what is dy/dt as a function of theta, L, and omega?
What is the gravitational potential energy U? Remember that in general gravitational potential energy is mgh, and for the stationary pendulum we worked out a potential of -mgLcos(theta). Now we also have to take the location of the pivot point x into account.
What is the kinetic energy K? For the stationary pendulum, we saw that the energy was I omega^2 / 2 = m L^2 omega^2. Now, we also have to incorporate the velocity of the moving pivot x(t). To make later derivations easy, your final expression for kinetic energy should be explicitly in terms of theta and omega. [Hint: the velocity can be expressed as the sum of the velocity due to translation plus the linear velocity due to rotation.]
What is the Lagrangian L? (This should be VERY easy once you've done parts 1 and 2!)
What is the partial derivative of L with respect to theta?
What is the partial derivative of L with respect to omega?
What is the time derivative of the expression computed in Question 7?
Using the expressions from Question 6 and Question 8, write down the equations of motion arising from the Euler-Lagrange equations, which you can find in Lecture 18. Try to make the final form as simple as possible by canceling expressions and collapsing sums of products into dot products where possible. (Imagine that you eventually have to use this formula to implement a piece of code, and want it to be as error-free as possible!)