JohnM 2 years ago 3.2 – Collision Detection of Balls Has anyone done this exercise? I've tried searching OpenStudy through Google but nothing pops up. If someone has solved it, I will have follow-up questions. Thanks. (P.S. It remains very irritating that there is no OpenStudy search engine.)

1. msmithhnova

I don't know the particular exercise as I have not done that course but collision detection of spheres can be done using Pythagorean's theorem and the radius of the balls. By Pythagoreans theorem, the distance from center of one to center of the other is the square root of the sum of of the x differences squared and y differences squared. If the sum of the two radius is greater than or equal to the above calculation then they are touching.

2. andrew.m.higgs

Hi JohnM, Fire away. I am sure there are quite a few people here who would be more than willing to help.

3. Screech

Works in 3 dimensions as well as two, so if you know the centers of the (circles or spheres) and the radii, can easily determine if they are touching or have collided.