When light hits a mirror, it reflects out at the same angle that it hit the mirror at. This angle is measured off of the normal vector, which is perpendicular to the surface of the mirror. Try moving the light ray to the right to see reflection in action.
Law of Reflection
The angle with which light hits the mirror (θi) is the same as the angle it reflects out at (θr).
θi = θr
Over to the right, there are two lights, red and blue, and a mirror. If you stood next to the red light, and looked at it, well, it would look like where it was. Not very exciting.
But if you looked at the red lamps reflection, it would appear to be where the blue lamp is. The blue lamp represents the red lamps virtual image. You'll notice that the virtual image is flipped perpendicular to the plane of the mirror. This means that what points down in this simulation now points up. But left still points left, and right still points right.
Side note: you might notice that it is impossible to tell if the purple rays came from the reflection of the red lamp, or were the rays from the blue lamp transmitted through the mirror...
Light hitting a curved mirror can get a bit more complicated.
When the rays hit a concave part of the mirror, it focuses the light onto a point. The rays also flip which side of the beam they're on. This is why when you look into a spoon, your reflection is flipped. Try hovering over the rays to see this.
When the light hits a convex part of the mirror, it tends to spread out, and the rays don't flip. This is why convex mirrors are more boring than concave mirrors.
Here's another curved mirror to play with. This one's been modified to not be perfectly reflective.
Instead, it only reflects 50% of the light that hits it. It lets another 10% through, and the absorbs the other 40%. The absorbed light gets turned into heat. Real mirrors tend to have reflectances within 80% - 99%, and absorb the rest.
Focusing light is very useful. It can help to amplify a weak signal, heat water in a solar collector, and light things on fire, among other uses.*
Since curved mirrors focus light, you can use a half circle to focus a beam onto a point.
But, as you can see to the right, not all of the light is focused. Most rays just bounce out of the circle without coming near the focus. The rays that do hit the focus don't focus into a point, but rather into a upside down heart like shape (cardioid). This is more visible when the radius of the circle is smaller.
The fact that a circle doesn't perfectly focus light is called spherical aberration. It can be minimized by only using the bottom part of the circle.
The parabola is another choice for focusing light, and as you will see, it focuses light far better than the circle.*
You can see how the parabola focuses light by trying out the vertical beam (left). The light rays will all focus onto the parabolas focal point. You can change how far away that point is with the slider below.
Then, try the cone lamp (right) and position it at the focal point. If you get it close enough, the lamp's rays should all be reflected to form a vertical beam.
Below, you can try using this property to focus light from one parabola onto another.
This simulation shows how satellite dishes work.
Satellite dishes are 3D parabolas.* Every satellite dish has a rod that sticks out from it. At the end of the rod is the transceiver. It can emit and detect radio waves, which are a kind of light that we humans can't see naturally.
The rod is used to position the transceiver at the parabola's focal point, so it can easily pick up all incoming light. When two dishes are pointed at each other, any light from one of them will be focused into a beam that points toward the other dish, where it gets focused onto the other's receiver.
(These rays are limited to only reflect twice, just so things don't get to messy.)
An ellipse, or oval, can also focus light. It has two focal points. When a light is placed at one focal point, all of its rays are focused onto the other focal point.
A lot of phenomena related to reflecting light also work for sound. For example, if you stand in the focal point of an elliptical room, and whisper, your whisper will be focused onto the other focal point. Someone at that point will therefore be able to hear you whispering from across the room.
Similarly, the parabola can also focus sound. This kind of device is called a parabolic microphone, and it can let you hear sounds that are very far away.
(These rays are limited to only reflect once, just so things don't get to messy.)
Now you can try playing around with light rays inside a circular mirror. It makes pretty patterns.
In reality, the rays would keep bouncing, but to keep your computer happy, these ones can only bounce 10 times.
Once you're done, you can move onto refraction!