[Math] Angle of Reflection Inside A Circle

circlesgeometrytrigonometry

Note: I have browsed and found solutions to problems involving an external collision (angle of reflection along the tangent outside).

I am making a program which has a ball inside a larger circle, and I want to have it bounce when it collides with the circumference. I can detect the collision, and I have degrees/radians, speeds in the x and y directions, and now I would like to know what angle I should set the ball to after collision to keep it in the circle.

How do I find the angle after the ball reaches the point and bounces?

Best Answer

In general, and ignoring the size of your ball (treating it as a point), when something "bounces" or reflects off of a surface, it behaves the same as if it bounced off the tangent plane to the surface at the point of collision. As Aaron Golden has pointed out, this makes the angle of incidence equal to the angle of reflection. In a circle, the radius at the point of collision is also perpendicular to the tangent, so the angle to the radius is the same entering and leaving.