Inequality Constraint in PBD
-
- Posts: 19
- Joined: Mon Jul 14, 2014 9:05 pm
Inequality Constraint in PBD
In position based dynamic, equality constraint such as distant constraint can be solved using constraint projection method. However, in paper related to PBD, how to solve inequality constraint are not mentioned a lot. How to solve the inequality constraint in the PBD framework ?
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
Re: Inequality Constraint in PBD
You simply skip over the constraint if the inequality is satisfied.
-
- Posts: 19
- Joined: Mon Jul 14, 2014 9:05 pm
Re: Inequality Constraint in PBD
Then, if the inequality constraint is not satisfied, how to solve the constraint?Dirk Gregorius wrote:You simply skip over the constraint if the inequality is satisfied.
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
Re: Inequality Constraint in PBD
Conceptually very much like equality constraints. It depends on the type
-
- Posts: 197
- Joined: Sat Aug 19, 2006 11:52 pm
Re: Inequality Constraint in PBD
If your state is within the valid region: the constraint isn't violated, you don't have to do anything.
If your state is outside the valid region: find the point on the surface of the valid region closest to the current state, this is your target state.
So, for a min/max distance constraint:
if(current_distance < min_distance): project to min
if(current_distance > max_distance): project to max
else: do nothing
("project to X" means "solve distance constraint using X as the desired/target/rest distance")
If your state is outside the valid region: find the point on the surface of the valid region closest to the current state, this is your target state.
So, for a min/max distance constraint:
if(current_distance < min_distance): project to min
if(current_distance > max_distance): project to max
else: do nothing
("project to X" means "solve distance constraint using X as the desired/target/rest distance")