Chain physics!

Blitz3D Forums/Blitz3D Programming/Chain physics!

Halo,

I've posted this, however looking at what you're doing you might be able to help me...

In the old 8bit Thrust you'll remember that Orb that you pick up and how it exerted it's force on your ship. It's essentially 1 point mass connected to another by an inelastic rod. I imagine it's pretty much the same thing that you're using to do your chain...

I'm wondering how one would go about simulating this given the following variables:

General:
g# gravity constant

Your ship:
X# x position
Y# y position
XV# x velocity
YV# y velocity
M# mass

The orb:
oX# x position
oY# y position
oXV# x velocity
oYV# y velocity
oM# mass

Rope/Bar/Connecting thing that connects ship to orb:
d# length
rM# rope mass (if you want to get pedantic, though probably not really relevant)

It's like a pendulum attached to an asteroids ship, swinging around you when you thrust around the place.

Halo - if you could help me with this you'd be my hero (or not-- whatever you prefer) :)

-R