verlet physics update

Blitz3D Forums/Blitz3D Programming/verlet physics update

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Here's some ideas:


Imagine a tetrahedron. A pyramid with a triangular bottom.

Now imagine your tire is connected to the top point of the terahedron.

The bottom three points form a plane.

You can determine which side of that plane the top point is on. Therefore you can push the top point back if it gets on the wrong side of this plane, just like when you push the point back when it collides with the ground.


But when you have a single verlet conencted to another single verlet, or a single verlet connected to just two other verlets you still have a problem. Hm...


I wonder if you could somehow give the verlets a quaternion orientation and then use that to determine the location of other verlets realtive to it.

Or maybe...

You have two verlets connected. Verlet 1, and Verlet 2. Verlet 2 is in motion. Verlet 1 is not.

We will call then V1 and V2. But V2 has two positions. V2a, which is where it was, and V2b which is where it's going.

That means we have V1, V2a, and V2b... which are three verlets, though two of them are just different locations of one of them.

Because we have three, we can calcualte the plane in which they lie.

Then once we have that plane, we can determine if V2b is clockwise or counterclockwise from V2a.

And if we do a dot product between vectors V1,V2a and V1,V2b, then we know how far apart in angle they are.

Hm...

Perhaps this information would would enable one to determine if the verlet has suddenly flipped around to the other side of a verlet. That would indicate the spring/stick collapsed completely and inverted, and you could then fix it by going back and collapsing it almost all the way but not enough to have the verlets on top od one another which would destroy the directional information.


Hm...

Hey wait a minute...

I always thought you needed three points to define a plane. But do you really?

If you take V1, and V2 in their initial locations in the model, And imagine that V1 lies in the plane, and that the two points goether represent tha plane's normal, then you know how that plane is oriented in space.

You don't know what it's ROLL is, but do you need to know the roll of a plane? I'm not sure. I don't think that even if you have three points that that defines a roll at all.