This book explains the algorithms behind those collisions using basic shapes like circles, rectangles, and lines so you can implement them into your own projects.
This manual has been available on this site since about 1996, with improvements taking place frequently. The current version has been published as a book of about 350 pages by Cambridge University Press. By agreement with the Press, however, it will remain posted on this web site. Many improvements in the current version over previous ones are due to the (anonymous) referees of the Press, whom I wish to thank heartily. I also wish to thank Lauren Cowles, of the New York office of the Press, for much help with preparing the original version for publication. The paper edition appears also in Duotone red and black. For information on obtaining the paper edition, take a look at the Cambridge Press catalogue.