 | Collision detection: Encyclopedia II - Collision detection - Overview
Collision detection - Overview
In physical simulation, we wish to conduct experiments, such as playing billiards. The physics of bouncing billiard balls are well understood, under the umbrella of rigid body motion and elastic collisions. An initial description of the situation would be given, with a very precise physical description of the billiard table and balls, as well as initial positions of all the balls. Given a certain impulsion on the white ball (probably resulting from a player hitting the ball with his cue), we want to calculate the trajectories, precise motion, and eventual resting places of all the balls with a computer program. A program to simulate this game would consist of several portions, one of which would be responsible for calculating the precise impacts between the billiard balls. This particular example also turns out to be numerically unstable: a small error in any calculation will cause catastrophic changes in the final position of the billiard balls.
Video games have similar requirements, with some crucial differences. While physical simulation needs to simulate real-world physics as precisely as possible, video games need to simulate real-world physics in a believable way, in real time and robustly. Compromises are allowed, so long as the resulting simulation is satisfying to the game player.
Computational geometers are interested in precise collision detection algorithms (much like physical simulators.) However, computational geometers are more interested in algorithms that have provably good running times. Unfortunately, most algorithms used in physical simulations and video games do not have very satisfying worst-case running times. An example problem is the ray tracing problem: given a list of objects in three dimensional space, as well as the initial position and velocity of a particle, find the first solid object the particle will hit. It is very obvious how to do this in time proportional to the number of objects in the scene, however it is very difficult to do better than this, at least in the worst-case (or even expected case) sense.
It turns out that one can do significantly better for the raytracing problem. Using big O notation, the naïve algorithm works in O(n) time, without any preprocessing. However, there are algorithms for solving this problem in O(logn) time. The problem, however, is that a precomputation step needs to be performed. The idea is that the set of objects is first given to the program, the precomputation occurs, and then for each subsequent query of a particle with an initial position and velocity, the time it takes to find the first object hit is of order O(logn). However, the precomputation generates a data structure of size O(n4 + ε) for any desired ε > 0 which makes these algorithms completely unusable in practice. (See, for instance, P.K. Agarwal and J. Matousek. Ray shooting and parametric search. SIAM Journal on Computing, 22(4):794--806, 1993.)
On the other hand, for the purpose of physical simulation, data structures were created which work well in practice. In all cases, these algorithms do not have especially interesting running times in the big O sense, however it is found that in practice they perform very well. The University of North Carolina, Chapel Hill has a group who have investigated this problem extensively, please see http://www.cs.unc.edu/~geom/collide/index.shtml.
Other related archivesBounding volume, Game physics, NP-hard, Newton's method, Plane (mathematics), Voronoi diagram, axis-aligned bounding boxes, big O notation, billiards, binary search, binary space partitioning, binary tree, bubble sort, collision, computational geometry, computer program, convex, elastic collisions, line-plane intersection, matrix, numerically, octrees, physical simulations, physics, polyhedra, ray tracing, real time, recursive, rigid body motion, spatial partitioning, splines, sprites, theory of computation, torus, video games
 Adapted from the Wikipedia article "Overview", under the G.N U Free Docmentation License. Please also see http://en.wikipedia.org/wiki |