PhysLab.net – Roller Coaster with Two Balls
This simulation shows 2 balls on a roller coaster track. The 2 balls are connected by a spring.
You can change the track shape by clicking a button below. You can change parameters such as gravity or damping. You can drag either ball with your mouse to change the starting position. If you don't see the simulation try instructions for enabling Java. Scroll down to see the math!
Click to select a different track:
This simulation is a variation of the Roller Coaster with Spring
, please see that page for more information on the physics and how the simulation is done. The difference here is that the other end of the spring is attached to another ball on the track, instead of being fixed.
We have 4 variables in this simulation:
- p1 = position on the track of ball 1 (measured by path length along the track)
- v1 = velocity of ball 1
- p2 = position on the track of ball 2
- v2 = velocity of ball 2
The force equations for each ball are identical to that shown in Roller Coaster with Spring
except that the position of the "fixed end" of the spring is replaced by the position of the other ball.