Physics Simulation Forum


All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Feb 06, 2013 11:12 pm 

Joined: Sun Jul 08, 2012 11:32 am
Posts: 74

I am having trouble with implementing a revolute joint between two particles. I am representing the particle as having a position, velocity and acceleration and no angular dynamic components.

So the constraint derivation is as follows:

C = xa + ra - xb - rb
CDot = va - vb

CDot = [ 1 -1] [va vb]T

So the Jacobian is [1 -1]

I initially store the anchor in local coords of each particle

localA = worldAnchor - particleA.position
localB = worldAnchor - particleB.position

Since the particles do not rotate, they have an identity matrix at all times with translation components on their last row

[ 1 0 0 0 ]
[ 0 1 0 0 ]
[ 0 0 1 0 ]
[ tx ty tz 1 ]

So transferring the anchor points to world coords, I do the following:

worldAnchor1 = localA + m_pParticleA->position
worldAnchor2 = localB + m_pParticleB->position

Then the radii between the anchors and the bodies becomes:

ra = worldAnchor1 - m_pParticleA->position
rb = worldAnchor2 - m_pParticleB->position

This undoes the previous addition and returns world anchors to local anchors. How do I go about doing this properly?

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group