Jump to content
  • Advertisement
Sign in to follow this  

Pendulum cart simulation

This topic is 5195 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am about to program a 2d scene where a player controls a cart with a hook attached underneath. The player will use the arrowkeys to move the cart, and the hook needs to be dangeling underneath. The analogy to real life is the mechanical machines where you control a robot arm grabbing into a pile of teddybears etc. I would like to model it as a pendulum cart, where the user can control the resting length (5 different lengths) of the spring holding the cart. When the player choose a position it should wait until it has fallen to a rest and lower the hook to collect one of the five prizes. (Every player is a winner) My problem is that I need to solve the pendulum cart problem numerically, and I havent tried that before. I have tried reading http://www.myphysicslab.com/pendulum_cart.html which describes the physical equations, but it ends up saying i need to plug the result into a runge-kutta integrator?!? I dont think it models the changing in the wire length either? I have not done that before. The closest i have been is to use the euler method. Physical precision is less important than speed, because I work on a very slow platform. Any suggestions?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!