Separating Axis Theorem (SAT)

Slides:



Advertisements
Similar presentations
Visible-Surface Detection(identification)
Advertisements

Everything you ever wanted to know about collision detection
2.4. Primitive Tests - Closest point
2.5. B ASIC P RIMITIVE I NTERSECTION Details of common forms of primitive intersection test.
Intersection Testing Chapter 13 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Collision Detection CSCE /60 What is Collision Detection?  Given two geometric objects, determine if they overlap.  Typically, at least one of.
Collision Detection and Resolution Zhi Yuan Course: Introduction to Game Development 11/28/
Geometry Chapter Polygons. Convex Polygon – a polygon with a line containing a side with a point in the interior of the polygon.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
A Fast Algorithm for Incremental Distance Calculation Paper by Ming C. Ling and John F. Canny Presented by Denise Jones.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Basic 3D collision detection We want to know if objects have touched Objects are considered to.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Oct 26, Fall 2006IAT 4101 Collision Detection. Oct 26, Fall 2006IAT 4102 Collision Detection  Essential for many games –Shooting –Kicking, punching,
Shortest path algorithm. Introduction 4 The graphs we have seen so far have edges that are unweighted. 4 Many graph situations involve weighted edges.
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
Efficient Distance Computation between Non-Convex Objects by Sean Quinlan presented by Teresa Miller CS 326 – Motion Planning Class.
Oct 3, Fall 2005Game Design1 Collision Detection.
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Collision Detection David Johnson Cs6360 – Virtual Reality.
Computer graphics & visualization Collision Detection – Narrow Phase.
Exploring Solids. What is a Polyhedron? Polyhedrons Non-Polyhedrons.
Week 13 - Wednesday CS361.
Contact Manifolds Erin Catto Blizzard Entertainment.
Geometry B Section 12.3 Surface Area of Pyramids and Cones.
3.4. C ONTACT G ENERATION Generating contacts between rigid bodies.
Week 13 - Monday.  What did we talk about last time?  Exam 2!  Before that…  Polygonal techniques ▪ Tessellation and triangulation  Triangle strips,
NCCER Unit 11- Welding Level 1
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Chris Mayer & Nic Shulver Hidden Surface Wire frame drawings Wire frame drawings are quick to produce but are often confusing It is difficult to determine.
CS 325 Introduction to Computer Graphics 03 / 22 / 2010 Instructor: Michael Eckmann.
Implementation II.
1 Dr. Scott Schaefer Intersecting Simple Surfaces.
12.1 Exploring Solids.
Chapter 11: Surface Area and Volume Section 11-3: Surface Areas of Pyramids and Cones.
Computer Graphics I, Fall 2010 Implementation II.
Do Now. Section 8.2 Angles in Polygons Polygon Interior Angles Theorem The sum of the measures of the interior angles of a convex polygon with n sides.
01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling.
Section 12-1 Exploring Solids. Polyhedron Three dimensional closed figure formed by joining three or more polygons at their side. Plural: polyhedra.
Prims Algorithm for finding a minimum spanning tree
10-5 Surface Area of Pyramids Slant height (ℓ) of a pyramid is the height of the triangular faces. It goes along the side of the pyramid. Also called the.
Polygons. Polygon Interior Angle Theorem The sum of the measures of the interior angles of a convex polygon is given by: Sum = 180(n – 2) where n represents.
9/30/20161 Path Planning Cognitive Robotics David S. Touretzky & Ethan Tira-Thompson Carnegie Mellon Spring 2012.
The point opposite the base of the pyramid
Measurement of Rotation
2D Simulation of Rigid Bodies
Computer Graphics Implementation II
8.1 Angles of Polygons What you’ll learn:
air water As light reaches the boundary between two media,
Implementation II Ed Angel Professor Emeritus of Computer Science
Objectives Learn and apply the formula for the surface area of a pyramid. Learn and apply the formula for the surface area of a cone.
Convex Sets & Concave Sets
2.4. Primitive Tests - Closest point
2.5. Basic Primitive Intersection
Question 1 When is detector active; when is it inactive?
Lecture 5 Announcements.
Standardized Test Practice
CURVED MIRRORS.
Reference and Coterminal Angles
Coordinate Systems.
Computer Animation Algorithms and Techniques
Introduction to Computer Graphics with WebGL
Transformation Operators
Computer Graphics Material Colours and Lighting
1 Trigonometric Functions.
Point To Triangle(intro)
Implementation II Ed Angel Professor Emeritus of Computer Science
Clipping Polygons Lecture 31 Fri, Nov 9, 2007.
3.3: Rectangle Collisions
Presentation transcript:

Separating Axis Theorem (SAT)

SAT … Iterate through ALL face normal Define a line Project all edges onto the line If no overlaps in the projected segements  Conclusion: no collision Early termination! If reach the end Collision

How to resolve overlap? Pay attention to the overlaps

How to resolve overlap?

“push out” (along Axis direction)

Can we resolve based on other edges/axes?

Can we resolve based on other edges/axes?

Interesting? Does not quite work? Notice that … Always push “the other” Resolved polygon no longer collided with the edge! But pushed too far! Two observations: First. Per-edge operation!! Resolve in the direction of the axis

Support Point: Efficient SAT Implementation Given two convex polygons: A and B Support Point For an edge on A (will use the edge normal) [faceNormal] For each Vertex on B Vertex-i on B is a support point for an edge-e on A when Vertex-i has the MOST NEGATIVE distance from edge-e Distance measured along the face normal of edge-e Associated distance: support point distance Note: Support point relationship changes for each frame!!

Find all the support points

Find all the support points Edge-e on A Vertex-i on B Distance measured along face normal of Edge-e Edge-e and face normal

Find all the support points Edge-e on A Vertex-i on B Distance measured along face normal of Edge-e Edge and face normal Vertex-i

Find all the support points Edge-e on A Vertex-i on B Distance measured along face normal of Edge-e Edge and face normal Vertex-i Distance measured along face normal (negative number)

Support point? Edge-e on A Vertex-i on B Edge and face normal Vertex-i Distance measured along face normal of Edge-e Edge and face normal Vertex-i Distance measured along face normal (negative number)

Support point? Edge-e on A Vertex-i on B Edge and face normal Distance measured along face normal of Edge-e Support point is the MOST negative! Edge and face normal Vertex-i Distance measured along face normal (negative number)

What about this edge? Edge-e on A Vertex-i on B Edge-e and face normal Distance measured along face normal of Edge-e Support point is the MOST negative! Edge-e and face normal

What about this edge? Edge-e on A Vertex-i on B Edge-e and face normal Distance measured along face normal of Edge-e Support point is the MOST negative! Edge-e and face normal

What about this edge? Edge-e on A Vertex-i on B Edge-e and face normal Distance measured along face normal of Edge-e Support point is the MOST negative! This distance is positive?! Edge-e and face normal

What about this edge? Edge-e on A Vertex-i on B Edge-e and face normal Distance measured along face normal of Edge-e Support point is the MOST negative! This distance is positive?! Edge-e and face normal

Find all the support points

Axis of least penetration

No Support Point: Vertex-i on B is a support point for an edge-e on A when Vertex-i has the MOST NEGATIVE distance from edge-e Distance measured along the normal of edge-e For edge eB1: no support point Because A is entirely in front of B  No support points: DO NOT collide Early termination! As soon as we find an edge without support points Implementation note: Support Distance: measured along negative normal direction

SAT Implementation with Support Point