Coffee Cup Caustic
Drag the slider for the light angle a: parallel rays reflect off the inside of a round cup, and their envelope, a nephroid, is the bright caustic.
Light that falls into a cup of coffee makes a bright curve with a cusp on the surface. It is a caustic: the curve where the reflected rays bunch together. This document models the cup as a circle of radius 1 and the light as parallel rays that fall in at the angle a and reflect off the inside wall.
A ray that meets the wall at the angle \phi from the direction of the light leaves in the direction -(\cos(2\phi + a), \sin(2\phi + a)) and crosses the cup along a chord of length 2\cos\phi . The caustic is the envelope of these reflected rays: on each ray, the point at the distance (\cos\phi)/2 from the wall. These points form the nephroid x = (3\cos\phi - \cos 3\phi)/4 , y = (3\sin\phi - \sin 3\phi)/4 , turned by a , with a cusp at the distance 1/2 from the centre.
The document draws R = 40 reflected rays, evenly spaced across the beam, faintly, and the nephroid over them. The slider for a turns the light from -0.8 to 0.8 radian, and the caustic turns with it.
JavaScript is required to view the interactive plot.