Re: [Algorithms] Computing the penetration distance
Brought to you by:
vexxed72
|
From: Adam M. <amo...@dp...> - 2000-10-13 19:37:11
|
Hi Pierre, What I do is not let objects actually penetrate, but define a skin width. If two objects come within skinWidth distance of one another, contact forces are applied (which I compute via LCP). The distance d (0 < d < skinWidth) between two bodies can be computed with several simple algorithms (I only use OBBs for which I wrote special purpose code). I think you could use this distance to base penalty force computations on as well. I never tried to compute penetration distances (letting objects penetrate at all is a very bad idea in my book) but considering you don't know how to do it, its probably less easy. P.S: I have found computing accurate separations to be very useful for LCP type physics as well, so this is by no means wasted work if penalty methods don't work out for you. -- --Adam Moravanszky http://www.n.ethz.ch/student/adammo >Ok, > >Before diving into the funny hell of LCP programs and all those painful >little things, I'd give penalty methods a chance - à la David Wu. So, I need >to estimate (or better, compute accurately) the penetration distance >between, say two convex polytopes, even if it would be better if I were able >to derive it for any pair of non-convex objects. > >GJK gives you the closest-points and the exact distance when no collision >occurs. But all bets are off when the polytopes collide. I've looked into my >archives, and I don't have the faintest, slightest, little reference >regarding that topic. Hence, before cooking up my own wacked solution, I >feel obliged to ask the list : would you have one or two links for me...? > >Thanks, list. > >Pierre > > >PS: don't bother telling me to forget penalty methods. |