ATTENTION READERS! Lucky's VB Gaming Site is no longer active. For updated game programming information and tutorials, please visit The Game Programming Wiki!
Circular Motion
Ever been on a roller coaster that does a loop-de-loop? Recall that uncomfortable feeling you had
as your guts attempted to pack themselves into your nether-regions? You have Centripetal Force
to thank for that sensation!
Any body in uniform circular motion experiences centripetal force as a result of it's constantly
changing velocity. The magnitude of the object's velocity (its speed) is constant, but it's
direction is always changing. This is acceleration (since velocity is a vector, a change in direction
without a change in magnitude is still acceleration!) and must be brought about by a force.
A body in circular motion has a velocity whose direction is tangential to its circular path. The centripetal
force however acts constantly towards the center of the circle, thereby causing the change in velocity
direction.
Now, this centripetal force doesn't come out of nowhere once an object begins to move in a circular path.
No, it must be provided. A good example is gravity. The gravitational pull of the Earth on a satellite
provides the necessary centripetal force to keep that satellite in orbit. In the case of a roller coaster,
the centripetal force is provided by the seat that pushes against (a normal force) you and compacts
your innards.
Here comes the physics of it. The centripetal force is proportional to the square of the object's
velocity multiplied by its mass and divided by the radius of motion:
F = (mv^2)/r
So, if we know the magnitude of the force, the mass, and the radius, we can calculate the speed of
the object's rotation. If we know the speed, mass, and radius, we can calculate the centripetal force.
Something further to note:
F = ma
Yes, Force = Mass multiplied by Acceleration. So:
a = (v^2)/r
The mass value cancels out if we replace F with ma. You don't even need to know the
mass of the object! Nifty, huh?
"How do we apply this to games? How do we factor in surface gravity?" No worries, I've written a nifty little
program to demonstrate exactly that.