Image formation by spherical mirrors

How to use the simulation:

Click-and-drag the red dot left or right to change the focal length.
Click-and-drag the center of the mirror to move the mirror left or right.
Click-and-drag the top of the object (the dark blue arrow) up or down to change the height of the object.
Click-and-drag the bottom of the object (the dark blue arrow) left or right to change the position of the object. Note that you can drag the object through the mirror (or the mirror past the object). The simulation shows a concave mirror situation when the object is to the left of the mirror, and a convex mirror situation when the object is to the right of the mirror.
Use the check boxes on the right to control whether the image is shown, and to turn on or off various rays.