q: how can you spot a bald-faced liar in computer graphics? · q: how can you spot a bald-faced...
TRANSCRIPT
![Page 1: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/1.jpg)
Q: How can you spot a bald-faced liar in computer graphics?
A: Ask if they have fully working code for…
TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAAA
![Page 2: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/2.jpg)
Collision Handling
TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA
![Page 3: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/3.jpg)
Collision Handling
Consists of two steps:
• collision detection:
• what has collided?
• what is colliding?
• what will collide?
![Page 4: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/4.jpg)
Collision Handling
Consists of two steps:
• collision detection:
• what has collided?
• what is colliding?
• what will collide?
• collision response: what to do about it?
![Page 5: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/5.jpg)
Collision Handling
Consists of two steps:
• collision detection:
• what has collided?
• what is colliding?
• what will collide?
• collision response: what to do about it?
Completely different problems and methods
![Page 6: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/6.jpg)
Collision Detection Taxonomy
Discrete: are objects colliding right now?
• check every frame
Issues:
• penetration artifacts
![Page 7: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/7.jpg)
Discrete: are objects colliding right now?
• check every frame
Issues:
• penetration artifacts
• tunneling
Collision Detection Taxonomy
![Page 8: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/8.jpg)
Collision Detection Taxonomy
Discrete: are objects colliding right now?
• check every frame
Continuous-time collision detection (CTCD): when will the next collision occur?
![Page 9: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/9.jpg)
Collision Detection Taxonomy
Discrete: are objects colliding right now?
• check every frame
Continuous-time collision detection (CTCD): when will the next collision occur?
• correct but slow
![Page 10: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/10.jpg)
Collision Detection Taxonomy
Discrete vs continuous-time
Rigid vs deforming objects
• rigid objects allow some precomputation
![Page 11: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/11.jpg)
Collision Detection Taxonomy
Discrete vs continuous-time
Rigid vs deforming objects
• rigid objects allow some precomputation
Collision vs promixity
![Page 12: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/12.jpg)
Broad Phase vs Narrow Phase
Collision detection is O(n^2) problem
![Page 13: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/13.jpg)
Broad Phase vs Narrow Phase
Collision detection is O(n^2) problem
Broad phase: detect collision candidates (hopefully n log n) Narrow phase: check if the candidates actually collide
![Page 14: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/14.jpg)
Broad Phase vs Narrow Phase
Collision detection is O(n^2) problem
Broad phase: detect collision candidates (hopefully n log n) Narrow phase: check if the candidates actually collide In practice: BVH with kDOPs very popular/fast broad phase
![Page 15: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/15.jpg)
Discrete CD for Convex Objects
Do these objects collide?
How can you tell?
![Page 16: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/16.jpg)
Discrete CD for Convex Objects
Algorithm 1: check that all points of one object are outside the other
![Page 17: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/17.jpg)
Discrete CD for Convex Objects
Algorithm 1: check that all points of one object are outside the other
• shoot a random ray, count intersections
• (better method exist based on winding #)
![Page 18: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/18.jpg)
Discrete CD for Convex Objects
Algorithm 2: find a separating axis
![Page 19: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/19.jpg)
Discrete CD for Convex Objects
Algorithm 2: find a separating axis
• for each side of object 1, extent to line
• check all verts on object 2 on correct side
![Page 20: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/20.jpg)
Discrete Collision Detection
What if objects aren’t convex?
![Page 21: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/21.jpg)
Discrete Collision Detection
What if objects aren’t convex?
• compute convex decomposition
• then check collisions between pieces
![Page 22: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/22.jpg)
Discrete Collision Detection
What if objects aren’t convex?
• compute convex decomposition
• far from trivial in 3D…
![Page 23: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/23.jpg)
Discrete Collision Detection
What if you want continuous-time detection?
1. Find separating line/plane
![Page 24: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/24.jpg)
Discrete Collision Detection
What if you want continuous-time detection?
1. Find separating line/plane
2. Calculate earliest time an object hits axis
![Page 25: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/25.jpg)
Discrete Collision Detection
What if you want continuous-time detection?
1. Find separating line/plane
2. Calculate earliest time an object hits axis
• is certificate no earlier collision possible
![Page 26: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/26.jpg)
Discrete Collision Detection
What if you want continuous-time detection?
1. Find separating line/plane
2. Calculate earliest time an object hits axis
3. Try to find new line
![Page 27: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/27.jpg)
Discrete Collision Detection
What if you want continuous-time detection?
1. Find separating line/plane
2. Calculate earliest time an object hits axis
3. Try to find new line
4. Repeat until objects “close enough”
![Page 28: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/28.jpg)
Discrete Collision Detection II
Alternate approach for rigid objects:
• signed distance field
precompute on grid distance to object boundary positive outside, negative inside
![Page 29: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/29.jpg)
Discrete Collision Detection II
Alternate approach for rigid objects:
• signed distance field
precompute on grid distance to object boundary positive outside, negative inside grid moves as object moves query grid to tell if point is inside
![Page 30: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/30.jpg)
Discrete Collision Detection II
Alternate approach for rigid objects:
• signed distance field
precompute on grid distance to object boundary positive outside, negative inside grid moves as object moves query grid to tell if point is inside also useful for computing response
![Page 31: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/31.jpg)
Discrete Collision Detection III
What about deformable objects?
![Page 32: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/32.jpg)
Discrete Collision Detection III
What about deformable objects?
Objects intersect if and only if some triangle pair intersects… so check all pairs
(Hopeless without a broad phase)
![Page 33: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/33.jpg)
Continuous Collision Detection
Let’s start with the easiest case…
![Page 34: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/34.jpg)
Continuous Collision Detection
Let’s start with the easiest case…
find when point hits infinite line
![Page 35: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/35.jpg)
Continuous Collision Detection
Let’s start with the easiest case…
find when point hits infinite line
![Page 36: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/36.jpg)
Continuous Collision Detection
Let’s start with the easiest case…
find when point hits infinite line
wait, two roots?
![Page 37: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/37.jpg)
Continuous Collision Detection
Let’s start with the easiest case…
find when point hits infinite line
wait, two roots?
![Page 38: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/38.jpg)
Continuous Collision Detection
Let’s start with the easiest case…
find when point hits infinite line
for each positive root, check if point inside segment
![Page 39: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/39.jpg)
Continuous Collision Detection
Let’s start with the easiest case…
find when point hits infinite line
for each positive root, check if point inside segment
![Page 40: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/40.jpg)
Continuous Collision Detection
Let’s start with the easiest case…
This algorithm has at least 4 bugs
find when point hits infinite line
for each positive root, check if point inside segment
![Page 41: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/41.jpg)
Continuous Collision Detection
Bug #1:
![Page 42: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/42.jpg)
Continuous Collision Detection
Bug #1:
Bug #2:
![Page 43: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/43.jpg)
Continuous Collision Detection
Bug #1:
Bug #2:
becomes zero when segment collapses
![Page 44: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/44.jpg)
Continuous Collision Detection
Bug #3:
problem:
![Page 45: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/45.jpg)
Continuous Collision Detection
Bug #3:
problem:
just check A = 0 and handle specially, right?
![Page 46: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/46.jpg)
Continuous Collision Detection
Bug #4:
has a collision occurred?
![Page 47: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/47.jpg)
Continuous Collision Detection
for each vertex v of O1:
for each edge e of O2:
CTCD(e, v)
![Page 48: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/48.jpg)
Continuous Collision Detection
for each vertex v of O1:
for each edge e of O2:
CTCD(e, v)
for each vertex v of O2:
for each edge e of O1:
CTCD(e, v)
![Page 49: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/49.jpg)
CTCD is still Buggy
thermal exhaust port
![Page 50: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/50.jpg)
CTCD is still Buggy
thermal exhaust port
(literal) corner case causes collisions to (literally) slip through the cracks
![Page 51: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/51.jpg)
Continuous Collision Detection
for each vertex v of O1:
for each edge e of O2:
CTCD(e, v)
for each vertex v of O2:
for each edge e of O1:
CTCD(e, v)
for each vertex v1 of O1:
for each vertex v2 of O2:
CTCD(v1, v2)
![Page 52: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/52.jpg)
Do Any of These Cases Matter?
Bug #1:
Bug #2:
“zero-probability events”
![Page 53: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/53.jpg)
Do Any of These Cases Matter?
Bug #1:
Bug #2:
“zero-probability events”
Harmon’s Law
When dealing with collisions, “zero-probability events” will occur
100% of the time
![Page 54: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/54.jpg)
Harmon’s Law
![Page 55: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/55.jpg)
CTCD in 3D
Triangle-triangle collision can be decomposed into two types of checks:
![Page 56: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/56.jpg)
Vertex-Face
1. Find when vertex and triangle coplanar
2. Check barycentric coords of vertex
![Page 57: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/57.jpg)
Vertex-Face
1. Find when vertex and triangle coplanar
2. Check barycentric coords of vertex
cubic equation
![Page 58: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/58.jpg)
1. Find when edges coplanar
2. Check barycentric coords of intersection
Edge-Edge
![Page 59: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/59.jpg)
1. Find when edges coplanar
2. Check barycentric coords of intersection
Classic problem: parallel edges
Edge-Edge
![Page 60: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/60.jpg)
CTCD in 3D
For each pair of triangles:
• 6 vertex-face tests
• 9 edge-edge tests
![Page 61: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/61.jpg)
CTCD in 3D
For each pair of triangles:
• 6 vertex-face tests
• 9 edge-edge tests
Also needed for robustness:
• 18 vertex-edge tests
• 9 vertex-vertex tests
![Page 62: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/62.jpg)
Solving These Polynomials
Must find all the roots
• missed roots -> missed collisions
![Page 63: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/63.jpg)
Solving These Polynomials
Must find all the roots
• missed roots -> missed collisions
“Cubic formula” exists but not robust
Best practical code: Jenkins-Traub method
• can find FORTRAN code online
![Page 64: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/64.jpg)
Collision Response
Once collision detected, how to prevent it?
Guiding principles:
• conservation of momentum
• conservation of energy
![Page 65: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/65.jpg)
Collision Response
Once collision detected, how to prevent it?
Guiding principles:
• conservation of momentum
• conservation of energy
Other concerns: friction
![Page 66: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/66.jpg)
Importance of Friction
Key ingredient of spin / “English”
Obviously essential to stable stacking
![Page 67: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/67.jpg)
Collision Response
Once collision detected, how to prevent it?
Guiding principles:
• conservation of momentum
• conservation of energy
Other concerns: friction coefficient of restitution
![Page 68: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/68.jpg)
Coefficient of Restitution
Ratio
Measures dissipation due to heat, sound, vibrations etc
![Page 69: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/69.jpg)
Coefficient of Restitution
Ratio
Measures dissipation due to heat, sound, vibrations etc
Perfectly elastic collision: CoR = 1
Perfectly inelastic collision: CoR = 0
![Page 70: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/70.jpg)
Collision Response
Once collision detected, how to prevent it?
Two main approaches:
• penalty method: push apart over time
• impulse method: stop animation and correct velocities instantly
![Page 71: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/71.jpg)
Main idea: insert springs that push objects apart over time
Spring endpoints connect to closest pair of points on the two objects
Penalty Method
![Page 72: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/72.jpg)
Penalty Method
Pros:
• easy to code
• great for gentle, persistent contact
Cons:
• must pick stiffness of springs:
• too soft objects visibly penetrate
• too hard very expensive (blows up)
![Page 73: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/73.jpg)
Impulse Method
Freeze at time of collision
Change the velocities so collision prevented
• change in velocity called impulse
![Page 74: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/74.jpg)
Impulse Method
Freeze at time of collision
Change the velocities so collision prevented
• change in velocity called impulse
Rigid billiard model: apply equal and opposite impulses along contact normal
![Page 75: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/75.jpg)
Impulse Method
Pros:
• stops collisions before they occur
• friction and CoR easy(ier) to include
Cons:
• Zeno issues
![Page 76: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/76.jpg)
Zeno Paradoxes
Infinite steps in finite time
![Page 77: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/77.jpg)
Zeno Paradoxes
Infinite steps in finite time
![Page 78: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/78.jpg)
Zeno Paradoxes
Infinite steps in finite time
![Page 79: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/79.jpg)
Zeno Paradoxes
Infinite steps in finite time
![Page 80: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/80.jpg)
Zeno Paradoxes
Infinite steps in finite time
![Page 81: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/81.jpg)
Zeno Paradoxes
Infinite steps in finite time
![Page 82: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/82.jpg)
Zeno Paradoxes
Infinite steps in finite time
• might need infinite impulses per frame
![Page 83: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/83.jpg)
Zeno Paradoxes
Infinite steps in finite time
• might need infinite impulses per frame
Also arises when CoR < 1
• inelastic collapse phenomena
![Page 84: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/84.jpg)
Other Issues
Rigid object assumption is suspect
![Page 85: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/85.jpg)
![Page 86: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/86.jpg)
Other Issues
Rigid object assumption is suspect
Collisions involving multiple objects
• pool breaks, stacks of blocks, etc
![Page 87: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/87.jpg)
[IncredibleScience]
![Page 88: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/88.jpg)
[Stéphane Dorbolo]
![Page 89: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/89.jpg)
Other Issues
Rigid object assumption is suspect
Collisions involving multiple objects
• pool breaks, stacks of blocks, etc
Friction handling is extremely complex
• paradoxes abound
Even physicists don’t fully understand some phenomena…
![Page 90: Q: How can you spot a bald-faced liar in computer graphics? · Q: How can you spot a bald-faced liar in computer graphics? A: Ask if they have fully working code for… TexPoint fonts](https://reader035.vdocuments.site/reader035/viewer/2022080719/5f79524dc06bb123124f44af/html5/thumbnails/90.jpg)