Billiards on Any Conic

Any conic curve (ellipse, parabola, hyperbola) can be formed by varying the five blue points. The colored line segments represent the billiard orbit, with time varying from red to purple. When moving the defining points, the orbit may converge to a point, in which case the applet should be restarted.