This morning I opened up my MIX 10k entry code and worked the pendulum class into a Behavior. I can now drop the LateralPendulum Behavior on any Canvas. The Behavior will animate the Canvas.Top and Canvas.Left properties of each Child element in the Canvas. If more than one pendulum Behavior is attached to the Canvas, it adds up the X and Y calculations so that different types of pendulums can be simulated. I have a test page for now. The code needs some refactoring and that is more than I want to do on a Saturday morning. So I'll have to post up the code and another post about it later.
Here is the test page: Pendulum Behavior Test. This shows an Ellipse set on a Canvas. The Canvas has 4 LateralPendulum Behaviors attached which add up to represent a circular pendulum. It seems to get close to 60 frames per second so I decided to make it look a little smoother by setting the MaxFrameRate to 30 and by tweaking the animation timer a little.
1b062580-1934-44bc-ad26-756ae166df87|0|.0
Code, Silverlight