# MyPhysicsLab – Roller Coaster with Spring

This simulation shows a roller coaster with a ball which is also attached to 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 the spring anchor point or drag the ball to change the starting position.

คลิกเข้าไปทดลอง  คลิกค่ะ

Click to select a different track:

 hump loop circle infinity oval spiral

## Physics of the Roller Coaster with Spring

This simulation is a variation of the Simple Roller Coaster, please see that page for more information on the physics and how the simulation is done. The only difference here is that the spring force is added to the differential equation.

roller coaster forces
Define the following variables:
• P = (px, py) = position of ball in 2 dimensional space
• Q = (qx, qy) = fixed end of spring
• k = slope of track at point P
• R = rest length of spring
• c = stiffness of spring (constant)
• θ = angle between the spring and tangent vector
• m = mass
• g = gravity constant

The width and height of the spring is given by: sx = qxpx
sy = qypy
The length of the spring is then √(sx2 + sy2). The magnitude of the spring force is c (√(sx2 + sy2) − R).  The direction of the spring force is towards Q, the fixed end of the spring. The component of the spring force that is parallel to the track is
 F = cos(θ) c (√(sx2 + sy2) − R) (1)
It is this parallel-to-the-track component of the spring force that will accelerate the ball along the track. Consider a couple of cases to convince yourself of this: If the spring is perpendicular to the track, then θ ≈ 90° and cos(θ) ≈ 0 so the spring doesn't accelerate the ball. Conversely, if θ ≈ 0 then the spring will accelerate the ball in the positive track direction. Or, if θ ≈ 180° then the spring accelerates the ball in the negative track direction.

We can find cos(θ) by using the formula for the angle between two vectors A, B
 cos θ = A · B |A| |B|
where the numerator is the dot product, and the denominator is the product of the magnitudes. Define our two vectors by
• A = (1, k) the slope vector, pointing in the direction of increasing p
• B = (sx, sy) the spring force vector
 cos θ = sx + k sy √(1 + k2)   √(sx2 + sy2)
Put this expression into equation (1) and combine with the gravity and friction forces developed for the Simple Roller Coaster to get
 a = −g k − b⁄m v + c (√(sx2 + sy2) − R) (sx + k sy) √(1 + k2) m √(1 + k2)   √(sx2 + sy2)
(2)
where b = damping constant and v = velocity. Keep in mind that the slope k and spring stretch sx, sy are functions of the position p.

Besides this change to the force equation, the simulation is similar to the Simple Roller Coaster. Please see that page for more information on how the simulation is implemented.

# MyPhysicsLab – Physics Simulation with Java

Click on one of the physics simulations below... you'll see them animating in real time, and be able to interact with them by dragging objects or changing parameters like gravity. Get Java software if you don't already have it.
 single spring double spring pendulum chaotic pendulum double pendulum 2D spring double 2D spring colliding blocks cart with pendulum dangling stick rigid bodycollisions sumo wrestlinggame roller coaster roller coasterwith spring roller coasterwith 2 balls roller coasterwith flight molecule 2 molecule 3 molecule 4 molecule 5 molecule 6

ศัพท์วิทยาศาสตร์ ฉบับราชบัณฑิตสถาน

A  B  D  F  G  H  I  J  K  L  M  N  O  Q  R  S  T  U  V  W  X  Y

ถ                                       อ

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 หมวด : ก | ข | ค | ซ | ฐ | ด | ต | ท | น | ป | ผ | พ | ฟ | ภ | ม | ย | ร | ล | ว | ศ | ส | ห | อ | ฮ |

พจนานุกรมเสียง 1   แมว    วัว 1    วัว 2    วัว 3    เหมียว   แกะ     พจนานุกรมภาพการ์ตูน

 การเรียนการสอนฟิสิกส์ 1  ผ่านทางอินเตอร์เน็ต 1. การวัด 2. เวกเตอร์ 9.  การหมุน 12. ความยืดหยุ่น 17.  คลื่น การเรียนการสอนฟิสิกส์ 2  ผ่านทางอินเตอร์เน็ต 10. ทรานซิสเตอร์ 16. นิวเคลียร์

ครั้งที่

ภาพประจำสัปดาห์