simple constraint equation, feedback wanted

This topic is 3663 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hello all, Trying to wrap my mind around the concept of rigid body constraints I've started out with finding a straight-forward solution to the simple "bead-on-a-circular-wire" problem: For each program loop I simply find the point on the circle closest to the bead's actual position, and then I calculate backwards and find the exact force needed to make the bead move to that spot within one timestep, its current position and velocity taken into consideration. since both current bead position and the desired "rest-position" vectors are known, I can find the neccesary force: dv = dx / dt a = (dv - db) / dt f = m * a or simply f = m * ( (dx / dt) - vb)/dt where f = force, m = mass, a = acceleration, dv = the required velocity, dx = distance vector the bead needs to travel, db = bead velocity vector projected onto normalised distance vector. The method seems incredibly stable, and the energy of the system doesn't change over time, so I assume no work is done by the constraint. I'd really appreciate some feedback on wether this method is any good in the bigger perspective or wether it's a dead-end. Can this method be generalized to constrain for instance a row of particles forming a rigid chain or similar bigger bodies of interconnected particles? Please help a novice along! (small example program + commented source: http://www.jernmager.dk/stuff/rigid_constraint.zip) Cheers, Michael

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• Forum Statistics

• Total Topics
633708
• Total Posts
3013468
×