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.
J. Heiberg (Hrsg.) Bibliotheca scriptorum graecorum et romanorum teubneriana (BT) In Aedibvs B.G. Tevbneri MCMLXXII, Stvtgardiae, Editio stereotypa editionis anni MCMX Edition, (1972)
C. Ptolemaeus. Felicibus astris eat in lucem: Ductu Petri Liechtenstein Coloniensis Germani. Anno Virginei Partus .1515. Die .10. Ia. Venetiis ex officina eiusdem litteraria, Venetiis, (1515)
O. Firman, und J. Spoerhase. Proc. 16th International Conference and Workshops on Algorithms and Computation (WALCOM'22), 13174, Seite 328--339. (2022)