## Conservation of momentum in position based solver

Please don't post Bullet support questions here, use the above forums instead.
jun
Posts: 1
Joined: Thu Jan 03, 2019 12:52 am

### Conservation of momentum in position based solver

Hello everyone!

I'm trying to understand Muller's paper "Position Based Dynamics (2006)" these days, but there is something I can't understand...

In his paper he said, internal constraint cannot be affected by rigidbody modes,

so if we choose delta-pos to be along gradient of constraint, then both linear and angular momentum are automatically conserved.

But I think there is some case where both position and orientation of rigidbody are not changed,

but angular velocity is affected by projection of solver, that is, angular momentum is not conserved.

Suppose I have two particles, which has same mass and are rotating about origin,

and has distance constraint so their distance remain constant during simulation.

There is no external forces.

(You can imagine free rod rotating at origin, composed of two particles by distance constraint)

Supposing this case, I've tried solve this system manually, but I found a loss of angular velocity of system caused by

integration step and Verlet integration.

Let's say

time step is 1

initial condition of system
x1 = initial postion of particle 1 = (0, 1)
x2 = initial postion of particle 2 = (0, -1)
v1 = initial velocity of particle 1 = (-1/sqrt(3), 0)
v2 = initial velocity of particle 2 = ( 1/sqrt(3), 0)

after integration (both particles have moved out of circular path)
p1 = first prediction pos of particle 1 = (-1/sqrt(3), 1)
p2 = first prediction pos of particle 2 = (1/sqrt(3), -1)

after projection
p'1 = projected pos of particle 1 = (-1/2, sqrt(3)/2)
p'2 = projected pos of particle 2 = (1/2, -sqrt(3)/2)

after velet integration scheme
v'1 = (p'1 - x1) / 1 = (-1/2, (sqrt(3)-2)/2)
v'2 = (p'2 - x2) / 1 = ( 1/2, -(sqrt(3)-2)/2)
x'1 = p'1 = (-1/2, sqrt(3)/2)
x'2 = p'2 = ( 1/2, -sqrt(3)/2)

There is difference between length of v1 and length of v'1. So angular velocty has changed.

Is there anything that I'm missing on his paper?

I'm really begginer at this field, so I need your help.

Any insight into this would be appreciated. Thank you.