# lecture8c - Introduction to Computer Programming with...

• Test Prep
• 4

This preview shows pages 1–3. Sign up to view the full content.

Introduction to Computer Programming with MATLAB CEE/MAE M20 Lecture 8c Collision Detection III — Uniform Grid Partitioning CEE/MAE M20 Spatial Partitioning Group objects into smaller spatial subsets Only test for collisions if objects are in the same subset Spatial partitioning is a form of broad phase collision detection 2 CEE/MAE M20 Uniform Grid Algorithm Partition the system into a grid of equally sized cells Use AABBs to determine object's location in grid Only test for collisions if object's AABBs occupy the same cell 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 CEE/MAE M20 Model System 4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Each cell is assigned a unique number

This preview has intentionally blurred sections. Sign up to view the full version.

CEE/MAE M20 Model System Each cell is assigned a unique number An AABB occupies a cell that contains any of its vertices. Using arithmetic, floor and ceil , determine which cell contains each AABB vertex 5 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 11 1 2 3 4 5 6 7 8 9 10 11 12 13 14 CEE/MAE M20 Goal: Determine object ID pairs to be exact collision tested. Pairs
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern