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 is stuff I have written down on how springs work. Don't ask me what a "logarithmic impulse formula" is for. I don't know. I just copied down equations that looked important.


--------
SPRINGS
--------

http://www.pcug.org.au/~apurdam/doublespring/doublespring.html
two masses, connected by one spring:

M1, M2 = masses
k = coefficient of stiffness of the spring
x1, x2 = the displacements of the masses from their positions of equilibrium
x1'', x2'' = the acceleration for M1 and M2
r = viscous damping
x1', x2' = velocity of masses (from previous frame?)

x1''= k / (M1*(x2-x1)) - r*x1'
x2''= k / (M2*(x1-x2)) - r*x2'



misc notes:

Logarithmic Impulse formula.
Impulse = Log(RestSpan) - Log(CurrentSpan)

Note: this is a different from the usual linear spring formula which is taught in physics classes. With the logarithmic formula, it should be impossible to completely compress the spring. It also means that springs that have long rest lengths vibrate much slower than short ones.