Dynamics of a billiard ball and ray tracing