Margins: added or subtracted
Posted: Mon Oct 07, 2013 6:46 pm
Hello,
I'm trying to create a small physics engine for fun.
I have implemented GJK and EPA algorithms.
Now, I would like to use these algorithms: use GJK for small depth penetrations and EPA for the rest (hybrid algorithm). To do that, I need margin on my objects.
When I read the Bullet user manual, we can see that the margins are sometimes subtracted from objects (box shape) or sometimes added to object (convex hull, cylinder, cone).
Why we don't subtract the margin for convex hull ? What are the difficulties ?
Moreover, add the margin to convex hull will "round' the convex hull which will cause some imprecision errors, no ?
Thank you in advance.
I'm trying to create a small physics engine for fun.
I have implemented GJK and EPA algorithms.
Now, I would like to use these algorithms: use GJK for small depth penetrations and EPA for the rest (hybrid algorithm). To do that, I need margin on my objects.
When I read the Bullet user manual, we can see that the margins are sometimes subtracted from objects (box shape) or sometimes added to object (convex hull, cylinder, cone).
Why we don't subtract the margin for convex hull ? What are the difficulties ?
Moreover, add the margin to convex hull will "round' the convex hull which will cause some imprecision errors, no ?
Thank you in advance.