## Intro

This is an pexplanation on how to calculate this type of reflection:

It can be light bouncing off a mirror (or a ball bouncing perfectly off a surface, though it would behave physically unrealistically, on its own)

I did a quick search and I think it is referred to as specular reflection, in the case of light:

(Image by Zátonyi Sándor from Wikipedia — Laws of reflection)

I wanted to write an explanation for these projects:

## Context

So I wanted to work out how to calculate bouncing like this from Lumosity:

The ball bounces off those white bumpers at 90 degree angles. But I wanted to make it work for any angle, not just 90°.

## Overview

So this is how I was thinking of it:

If you measure from the normal (the line that is perpendicular or at a 90-degree angle to the surface), the size of the angle from the normal to the incoming ray, and from the normal to the outgoing ray would be the same:

(It would be the same size even if you happened to measure the larger angle between the normal and two rays — `b`

, in this case)

(The 90°-turn would occur if the ball hit the bumper/surface at a 45° angle.)

## Calculation

So, you can work out the normal by adding 90° to the rotation of the surface.

(It doesn’t matter whether you add or subtract 90, because the line of the perpendicular is the same, and, like I mentioned previously with the picture of `a`

and `b`

, it doesn’t matter which side of the normal that you choose to subtract the angle difference from — as long as you make the outgoing ray the same-sized angle, from the same normal)

So to actually work out the size of the angle `a`

between the incident ray and the reflected ray, the incident ray needs to be turned around by 180° (remembering the original incident ray is going down, and to the right in this case, so subtracting that angle from the perpendicular would not be `a`

):

So here is the size of angle `a`

:

And to work out the outgoing ray’s angle, you just add that difference `a`

, back to the normal, in order to get the outgoing angle on the other side of that normal:

Hope that helps to explain a bit. Feel free to add any info or let me know if this could be made clearer and easier to understand ^^

## Additional note

If you are familiar with vectors, for this diagram, the angle is the same since the magnitude and direction of the horizontal translation is preserved, and the magnitude of the vertical translation is preserved (but opposite direction):

(But this modelling alone is physically unrealistic for the ball, as it would mean no kinetic energy is lost.)

Here is another explanation by @anisotr0py (using terms that are relative to the surface, and not just the specific case I mentioned where the surface is horizontal):