Elastic physics algorithm

Blitz3D Forums/Blitz3D Programming/Elastic physics algorithm

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.

Hi,

I was wondering if anyone would know how to do "elastic physics" (in 2D - well actually, 1D would suffice :))?

I would have one object (x1,y1) and another (x2,y2) that's "hanging" from it with a virtual wire. It would fall down, but start bouncing back once it reaches a certain distance, then fall again and come up again, and eventually stop... and when the first object moves, it would have to either fall down again or be pulled up (depending if the object moved up or down).

I can't find a way to do this realistically, but then again, I suck at physics.

Anyone wanna help me?

Thanks!