Point of Contact by Separating Axis Theory - Java-Games
This is a discussion on Point of Contact by Separating Axis Theory - Java-Games ; hi,
i'm currently making my first steps into rigidbody physics. I'm trying to
find the point of contact by a given Separating Axis(Body). It runs smoothly
, when I have no parallel edges in my polgons. Cause if edges are ...
-
Point of Contact by Separating Axis Theory
hi,
i'm currently making my first steps into rigidbody physics. I'm trying to
find the point of contact by a given Separating Axis(Body). It runs smoothly
, when I have no parallel edges in my polgons. Cause if edges are parallel
(for example a rectangle), I have two identical axis.
pseudo code:
boolean hasSeparatingAxis( bodyA, bodyB )
{
//> create all separating axis around th edges and getIntervals( axis,
body ) for each Body
//> proof if its separating the bodies (no overlap of the intervals)
//> if not findPointOfContact( axisMinimumDistanceVertex,
bodyThatIntersect the Axis ); return false;
return true;
}
vector2D findPointOfContact( axis, body)
{
//> return getClosestVertex
}
As I said, for non parallel shapes, it allways find the right
PointOfContact, but for parallel edges, it can fail, cause the intervals are
equal. It's a kind of random, which POC will return. I tried to find the
condition, but I could need some help.
Any suggestions, how to solve this are welcome. I'm more interested in an
idea, not the full solution !
--
aM
http://www.andre-michelle.com
-
Re: Point of Contact by Separating Axis Theory
That's partly why nobody uses separating plane tests much
any more. That was a popular idea around 1995, but it's been
superseded by better techniques, like GJK.
For convex polyhedra, GJK will give you the closest
point to point, point to edge, edge to edge, point
to face, edge to face, or face to face situation.
Each of those has to be handled.
You have to handle multipoint contact, or resting
contact will never stabilize.
John Nagle
Animats
André Michelle wrote:
> hi,
>
>
> i'm currently making my first steps into rigidbody physics. I'm trying to
> find the point of contact by a given Separating Axis(Body). It runs smoothly
> , when I have no parallel edges in my polgons. Cause if edges are parallel
> (for example a rectangle), I have two identical axis.
>
> pseudo code:
> boolean hasSeparatingAxis( bodyA, bodyB )
> {
> //> create all separating axis around th edges and getIntervals( axis,
> body ) for each Body
> //> proof if its separating the bodies (no overlap of the intervals)
> //> if not findPointOfContact( axisMinimumDistanceVertex,
> bodyThatIntersect the Axis ); return false;
> return true;
> }
> vector2D findPointOfContact( axis, body)
> {
> //> return getClosestVertex
> }
>
> As I said, for non parallel shapes, it allways find the right
> PointOfContact, but for parallel edges, it can fail, cause the intervals are
> equal. It's a kind of random, which POC will return. I tried to find the
> condition, but I could need some help.
>
> Any suggestions, how to solve this are welcome. I'm more interested in an
> idea, not the full solution !
>
> --
> aM
> http://www.andre-michelle.com
>
>
-
Re: Point of Contact by Separating Axis Theory
> but it's been superseded by better techniques, like GJK.
Thanks, I will study this.
I have found a solution, which seems to be solid by testing the closest
Vertex to the SeparationAxis.
--
aM
Similar Threads
-
By Application Development in forum Functional
Replies: 2
Last Post: 08-17-2007, 03:56 PM
-
By Application Development in forum Graphics
Replies: 8
Last Post: 08-01-2007, 04:05 PM
-
By Application Development in forum Graphics
Replies: 4
Last Post: 06-10-2007, 03:44 AM
-
By Application Development in forum Graphics
Replies: 4
Last Post: 12-09-2006, 09:28 AM
-
By Application Development in forum Theory
Replies: 0
Last Post: 08-17-2006, 05:07 PM