BOUNCING LIGHT BEAMS AND THE HAMILTONIAN ANALOGY