myphysicslab – 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.