CSE 381 – Advanced Game Programming GJK. GJK Gilbert – Johnson – Keerthi distance algorithm Used to determine the minimum distance between convex sets.

Slides:



Advertisements
Similar presentations
The Gilbert-Johnson-Keerthi (GJK) Algorithm
Advertisements

Surface Simplification using Quadric Error Metrics Guowei Wu.
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/
Computer graphics & visualization Collisions. computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization.
Integers less than 0 are (positive, negative) integers.
CSE 380 – Computer Game Programming Pathfinding AI
Convex Hulls in Two Dimensions Definitions Basic algorithms Gift Wrapping (algorithm of Jarvis ) Graham scan Divide and conquer Convex Hull for line intersections.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Divide and Conquer.
Continuous Collision Detection: Progress and Challenges Gino van den Bergen dtecta
Introduction to Collision Detection & Fundamental Geometric Concepts Ming C. Lin Department of Computer Science University of North Carolina at Chapel.
Advanced Computer Graphics Spring 2014
Distance between Points on a Coordinate Plane
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
UNC Chapel Hill M. C. Lin References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics.
1 Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line.
Oct 26, Fall 2006IAT 4101 Collision Detection. Oct 26, Fall 2006IAT 4102 Collision Detection  Essential for many games –Shooting –Kicking, punching,
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
Matching Polytope, Stable Matching Polytope Lecture 8: Feb 2 x1 x2 x3 x1 x2 x3.
Lecture 6 Divide and Conquer for Nearest Neighbor Problem Shang-Hua Teng.
Oct 3, Fall 2005Game Design1 Collision Detection.
Visualization and graphics research group CIPIC January 21, 2003Multiresolution (ECS 289L) - Winter Surface Simplification Using Quadric Error Metrics.
Collision Detection Michael Fuller. Overlap testing Most Common Technique Most Error Prone Test if two bodies overlap.
Collision Detection David Johnson Cs6360 – Virtual Reality.
Vertical Angles Supplementary Angles Complementary Angles.
Table of Contents Factoring – Trinomials (a = 1) If leading coefficient a =1, we have … We will start factoring trinomials where a = 1, that is, the leading.
Angle Pairs.
CSE 381 – Advanced Game Programming Quickhull and GJK.
Collision handling: detection and response
Enlargements Objectives To be able to: Enlarge shapes given a scale factor and centre of enlargement. Find centres of enlargement.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
October 9, 2003Lecture 11: Motion Planning Motion Planning Piotr Indyk.
Regression Lines. Today’s Aim: To learn the method for calculating the most accurate Line of Best Fit for a set of data.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 6, 2002 Day 10.
Microsoft® Small Basic Collision Detection Estimated time to complete this lesson: 1 hour.
Remediation Notes Relation Function Every equation/graph/set of ordered pairs represents a relation, but sometimes a relation is a function. Functions.
3D Game Engine Design 1 3D Game Engine Design Ch D MAP LAB.
Configuration Spaces for Translating Robots Minkowsi Sum/Difference David Johnson.
Advanced Computer Graphics Spring 2009
How to Use the Library Catalog Objective: Students will understand how to locate information using a library catalog.
Algorithm for computing positive α-hull for a set of planar closed curves Vishwanath A. Venkataraman, Ramanathan Muthuganapathy Advanced Geometric Computing.
COMPUTATIONAL GEOMETRY AND MATRIX MULTIPLICATION Mohammed Zeeshan Farooqui Minhaj Uddin.
CS6234 Advanced Algorithms - Convex hull. Terminologies – ◦ Convex hull of a set Q of points is the smallest convex polygon P for which each point in.
Game Programming 13 Physics in Games (cont.) 2010 년 2 학기 디지털콘텐츠전공.
7.G.5 ~ Find measures of angles formed by intersecting lines.
Introduction to Game Programming & Design III Lecture III.
13.1 Angle Relationships.
GJK Supplement Reference: SIGGRAPH2004 Course Note Original Reference: A Fast Procedure for Computing the Distance between Objects in Three-Dimensional.
Minkowski Sums and Distance Computation Eric Larsen COMP
Physics for Games Programmers: Collision Detection Crash Course Gino van den Bergen
Physics for Games Programmers: Continuous Collision Detection Gino van den Bergen Playlogic Game Factory
Physics for Games Programmers: Collision Detection
7.G.5 ~ Find measures of angles formed by intersecting lines
Convex Hull R.L. Graham’s Algorithm Computer Graphics.
References Additional lecture notes for 2/18/02.
Binary Code  
Chapter 4.2 Collision Detection and Resolution
Physics for Games Programmers: Crash Course in Collision Detection
2.2 Operations on Algebraic Vectors
Angle Relationships.
CS Digital Image Processing Lecture 5
Objective- To find the opposite of a sum or difference.
Objective- To find the opposite of a sum or difference.
References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics of Surfaces 1998.
Computer Animation Algorithms and Techniques
CO Games Concepts Week 12 Collision Detection
David Johnson Cs6360 – Virtual Reality
Vertical Angles, Linear Pairs, Exterior Angles
Adjacent, Vertical, Supplementary, and Complementary Angles
Presentation transcript:

CSE 381 – Advanced Game Programming GJK

GJK Gilbert – Johnson – Keerthi distance algorithm Used to determine the minimum distance between convex sets Why? –to see if they are colliding –to see where they are colliding

What’s a convex set? What does convex mean? Convex Test: –For all the shape’s vertices: Make a line between each pair Is entire line inside object? –If yes, it is convex –If no, it is not (i.e., has dent)

Convex Set vs. Hull Convex Set –a set of points representing a convex shape Convex Hull –a minimal convex set –minimally snugly fits points (rubber band analogy)

Minkowski Sum What’s that? –A mathematical operation performed on 2 shapes A B = All Points in A + All Points in B How many points do we end up with? –A * B

Visualizing Minkowski Sums Results in swept shapes A B A B

Minkowski Difference The Opposite of a Minkowski Sum A B = All Points in A – All Points in B How many points do we end up with? –A * B

Visualizing Minkowski Differences Results in swept shapes A B A B

An Interesting Detail For Minkowski Difference A B If A and B are intersecting, A B contains origin A B A B

Now Let’s Get Back To GJK Assume we have two shapes, A & B We want to know if A & B intersect

GJK for A & B Collision Test 1.Calculate Minkowski Difference 2.Select any Minkowski Difference point 3.Start at that point, and try to get to origin by visiting other points. –remember, this is a convex set 4.Build polytope using 4 points –iteratively update to find next one 5.If any polytope along way contains origin, no collision 6.If polytope never contains origin, no collision

Visualizing GJK Miss (no collision) Note: I’ve simplified things a bit for rendering

Visualizing GJK Hit (collision)