Fast rigid bodies

Blitz3D Forums/Blitz3D Programming/Fast rigid bodies

My rigid bodies uses links to build a cage out of verlets. This is slow, and the cage can get squished. I need a method to fix a rigid body in its proper shape. It doesn't have to be perfectly accurate, just fast and believable.

Let's say I have a box with 8 corners made of verltes, each with its own velocity. I update velocities, and the vertlets no long form the shape of a box. I then need to rotate the box to fit the average shape the verlets give, then reposition the verlets to the box. Once the box is rotated, I just transform coordinates to move the verlets to their proper place.

The problem is in the first step. I know the position of the box, because its just the average of all the verlet positions. Let's say I have a box positioned at 0,5,14, and I have one corner of the box positioned at x,y,z. I know that the position of this corner relative to the box should be 1,1,1. How do I rotate the box to fit the position of the corner? If I could figure this out, then boxes, cylinders, or any other shape could be done.