O'Reilly logo

Sage Beginner's Guide by Craig Finch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - detecting collisions between spheres

We will use collision detection as an example to demonstrate some common optimization techniques. Detecting collisions is an important part of Monte Carlo simulations, that are used in physics and chemistry to simulate the motion of molecules and particles. Collision detection is also used in flight simulators and video games. It is easy to detect collisions between spheres, so most collision detection algorithms define a "bounding sphere" around each complex object, and check for intersections between the bounding spheres. If the bounding spheres intersect, then more computationally expensive calculations are used to determine whether or not the objects themselves actually overlap.

This example ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required