All about Verlets Physics

Blitz3D Forums/Blitz3D Programming/All about Verlets Physics

Techlord(Posted 2003) [#1]
Well I have come to a road block in my quest for cool physics using the verlet integrator. Strickly, due to my disadvantages in math or programming. Many details are missing from my verlet system.

For those of you familar with the article on advance character physics, there are many pseudo-code examples missing to explain how to deal with angular constraints, collision (blitz collision), and friction.

My goal is to implement the verlet system for all physics needs to include cloth, jelly, rigid objects, vehicle suspension, character articulation, and particle effects. I know that it can be achieved, but, I struggle.

What I have been able to achieve: I have been able to create a tetrahedron rigid body and get it to bounce/move around in a virtual cube 1000x1000x1000. But, this is the only extent of my success. If anyone has successfully achieved any of these feats mentioned, I'm literally beggin for assistance in understanding how (layman terms).


Bouncer(Posted 2003) [#2]
I just say you have a quite a long road ahead of you before you reach your goal.... good luck.

You should give a specific problem... the field is so huge and all of that can be done in a million of different ways.


Bot Builder(Posted 2003) [#3]
I've done cloth and rigid objects. It really isn't all that hard. The easy way is to have a pivot representing your current/projected position, and store your previous position. I assume you already have the integrator/constraints as you mentioned having a tetrahedron in a cube. First of all, set up collisions with all the pivots. Then, detect these collisions and act upon them(friction) etc. a very good blitz example(that you might want to build on) is http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=andreas_blixt11272003032437&comments=no
by andreas blixt. Very nice.


poopla(Posted 2003) [#4]
Indeed. I'm adding boyancy in concordance with my mesh deform system to allow objects to "float" in my water simulations. Granted they arent too dense/heavy.


Techlord(Posted 2003) [#5]
@Bouncer,

One of my issues is using blitz collision. Instead of having my Tetrahedron bouncing around in a virtual cube, I would like to bounce it around on some terrain or room meshes. I have tried to implement collision in solving C1 (virtual cube) but something is not clicking here:(

@bot builder,

I'll have to analyze and comprehend the code, which is another challenge. But, I'll give a shot.

@All,

I have two 3D vectors (vector1 and vector2) and I want to know the angle/rotation of vector1 with the y-axis aligned to vector2. I know this is elementary geometry, but, i'm truly math disadvantaged. Any help would be greatful.


Bot Builder(Posted 2003) [#6]
@shattered reality
Funny thing is, I'm implementing this in my engine. + the objects will effect the water ;). Currently not doing mesh deforms though. mostly I just need rigid bodies.

@Frank Taylor
One way to do this is have a global pivot and position it at the first particle. then use aligntovector to point it at the other particle along the correct axis. Finally, grab the particles yaw/pitch. One thing to note is that when you aligntovector it's not the global position of vector2, but the position relative to vector1 that you input(v2x-v1x).


Techlord(Posted 2003) [#7]
bot builder,

Thanks a mil. Ghostdag provided code for this situation, but, it just did not sink in. Now on to collision.