Results 1 to 4 of 4

Thread: Separating Axis Theorem

  1. #1
    Join Date
    Jan 2009
    Posts
    57

    Separating Axis Theorem

    hi there

    I am facing some rpoblem in a theorem. I have searched a lot for a real, decent, sensitive explanation regarding the Separating Axis Theorem, and I am unable to find anything which makes any sense. I also can't visualize what the search talks about.

    I want to detect and extract some information from a collision between two Orientated Boxes.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Separating Axis Theorem

    For objects lying in a plane (2-dimensional space), the separating axis theorem states that the projection of two convex shapes onto some line will be separate if and only if they are not intersecting. The line for which the objects have disjoint projections is called the separating axis. An equivalent way of stating the theorem is to say that two convex shapes in the plane are not intersecting if and only if a line can be placed with one shape to one side of the line and the other side. Such a separating line will be perpendicular to the separating axis.

    For three-dimensional space, an axis can be found where the projection of two convex shapes can be separated if and only if they are not intersecting. In 3D, lines and planes are duals, and you can thus turn the separating axis theorem for 3D into the separating plane theorem. The general result in n dimensions is called the separating hyperplane theorem.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: Separating Axis Theorem

    The first thing you have to understand is how to project objects onto a line (an axis) in space. You can imagine this, visually, by placing a spotlight directly over the objects and watching where their "shadows" would fall on the line. (The virtual spotlight should be oriented so that it shines directly onto the line; its light rays should be perpendicular to the line) The shadows are the projection of these objects on the line.

    If you don't know how to mathematically find the projection of one vector onto another, then you should take a course or read a book on vector math, dot and cross products, etc. I'll assume you know how to do this.

    Anyway, imagine two boxes in quadrant I of a 2D space. Let's use the x-axis as our "line" for simplicity's sake. Now imagine the projection of these boxes onto the line. If the projections don't overlap (you have two distinct projections with some separating region between them), then the boxes cannot be colliding and you have found the "separating axis". If they were colliding in any way, then the shadows/projections would overlap.

    Keep in mind that if the shadows/projections DO overlap, that doesn't mean that the boxes are colliding. It just means you can't tell yet. You have to try another axis. Try the y-axis. Still overlapping? How about the line formed by one of the box-edges? The Gottschalk paper describes the minimum number of such tests required to find a separating axis. If you exaust all of those tests and still can't find a separating axis, then the boxes must be colliding.

    In 3D, the same analogy applies. Imagine the shadows of the boxes on some arbitrary plane (since we've added a dimension, we're looking for a separating plane now). If they don't overlap, then you know the boxes can't be touching each other. If they do, then you have to try another plane.

    Ultimately, it turns out you have to try, at most, 15 such tests before you can be sure that the boxes are colliding. The paper describes a lot of simplification in the math that makes these tests a lot faster computationally. I also think it does a great job explaining it.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Separating Axis Theorem

    Used in Collision Detection:

    The theorem does not apply if one of the bodies is not convex.

    The separating axis theorem says that if two convex objects are not penetrating, there exists an axis for which the projection of the objects will not overlap. This is an important definition, because it suggests an algorithm for testing whether two convex solids intersect or not -- and, in fact, it's heavily used in computational geometry, including computer games. It is also an important definition, because no matter what the dimensionality, the separating axis is always an axis. For example, in 3D, there is still a separating axis. That axis is the dual of a separating plane.

    The separating axis theorem can be applied for fast collision detection between polygon meshes. Each face's normal or other feature directions is used as a separating axis, as well as the cross products. Note that this yields possible separating axes, not separating lines/planes.

    If the cross products were not used, certain edge-on-edge non-colliding cases would be treated as colliding. For increased efficiency, parallel axes may be calculated as a single axis.

Similar Threads

  1. Do you like Yahoo Axis or Not
    By T.Y.K in forum Polls & Voting
    Replies: 6
    Last Post: 29-05-2012, 01:25 PM
  2. Replies: 1
    Last Post: 12-05-2012, 01:16 PM
  3. Excitation for the Tetris axis 3DS
    By Lol$prakash in forum Video Games
    Replies: 1
    Last Post: 08-10-2011, 09:50 AM
  4. Screen Separating on Toshiba Thrive Tablet
    By Tam^bura in forum Portable Devices
    Replies: 6
    Last Post: 02-08-2011, 08:23 PM
  5. Separating a string in java
    By Aaliya Seth in forum Software Development
    Replies: 5
    Last Post: 10-02-2010, 04:27 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,953,304.02220 seconds with 17 queries