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.
Today I'm finally releasing a final (or more honestly, “final”) pre-publication draft of my Algorithms textbook under a CC-BY license. This 448-page textbook evolved out of a subset of the algorithms lecture notes I've been maintaining for about 20 years....
R. Sharipov. (2004)cite arxiv:math/0412421Comment: The textbook, AmSTeX, 132 pages, amsppt style, prepared for double side printing on letter size paper.
A. Slivkins. (2019)cite arxiv:1904.07272Comment: The manuscript is complete, but comments are very welcome! To be published with Foundations and Trends in Machine Learning.