1 / 19

CS6360 Collision Detection/Response Loose End

CS6360 Collision Detection/Response Loose End. David Johnson. Work Through An Example. Two objects Rectangle and Triangle. (-1,2) (1,2) (0,1). (-1, -2) (1,-2) (-1,-1) (1,-1). Compute Center of Mass. Find the area using signed area of polyline face

vanida
Télécharger la présentation

CS6360 Collision Detection/Response Loose End

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS6360 Collision Detection/Response Loose End David Johnson

  2. Work Through An Example • Two objects • Rectangle and Triangle (-1,2) (1,2) (0,1) (-1, -2) (1,-2) (-1,-1) (1,-1)

  3. Compute Center of Mass • Find the area using signed area of polyline face • Nth vertex same as 0th • Compute centroid coordinates

  4. Translate the Triangle (-1,2) (1,2) (3,1) (-1, -2) (1,-2) (2,-1) (4,-1)

  5. Check for Collision • Use GJK • Pick a random direction to start the simplex (1,1) • Find the support vertex of Minkowski difference Z support(Z, d) = support(Y, d) – support(X, -d)

  6. Support for the Box Support(Y,d) = (1,2) (-1,2) (1,2) (-1, -2) (1,-2)

  7. Support for the Triangle support(X, -d) = (2,-1) (3,1) (2,-1) (4,-1)

  8. Total Support • support(Z, d) = support(Y, d) – support(X, -d) = (1,2) – (2,-1) = (-1,3) • Increase the simplex by finding new dir

  9. Find new support Support(Z,d) = (1,-2) – (3,1) = (-2,-3) (-1,2) (1,2) (3,1) (2,-1) (4,-1) (-1, -2) (1,-2)

  10. Extend Simplex • Simplex is now a line • Find closest point • Make new dir (-1.45, 0.24)

  11. Find new support Support(Z,d) = (1,-2) – (2,-1) = (-1,3) (-1,2) (1,2) (3,1) (2,-1) (4,-1) (-1, -2) (1,-2)

  12. Simplex Doesn’t Extend • Closest Point has same distance as last time • No collision (-1.45, 0.24)

  13. Look at Collision Case Support(Z,d) = (-1,2) – (2.5,-1) = (-3.5,3) (-1,2) (1,2) (1.5,1) (0.5,-1) (2.5,-1) (-1, -2) (1,-2)

  14. Initialize Simplex • Simplex is a point • Find closest point • Make new dir

  15. Look at Collision Case Support(Z,d) = (1,-2) – (1.5, 1) = (-0.5,-3) (-1,2) (1,2) (1.5,1) (0.5,-1) (2.5,-1) (-1, -2) (1,-2)

  16. Extend Simplex • Simplex is a line • Find closest point • Make new dir

  17. Look at Collision Case Support(Z,d) = (1,2) – (0.5, -1) = (0.5,-3) (-1,2) (1,2) (1.5,1) (0.5,-1) (2.5,-1) (-1, -2) (1,-2)

  18. Extend Simplex • Simplex is a line • Find closest point • Make new dir

  19. What is the Collision Normal? (-1,2) (1,2) (1.5,1) (0.5,-1) (2.5,-1) (-1, -2) (1,-2)

More Related