Billiards on Non-Rectangular Tables

Comp 110 Course Module 9b

You are now going to study the motion of billiard balls on non-rectangular tables.  If you wrote your code for the rectangular billiards table in good modular form, then extending your programs to work for non-rectangular tables should be straightforward.

Slightly more interesting than the motion of a ball on a rectangular table is the motion of a ball on a circular table.

The behavior of the billiard ball gets even more interesting when we consider tables with other shapes.  In this case we will consider a stadium-shaped billiards table.  The stadium shape is based on the circular shape, but with a twist.  Cut along the y-axis and pull the 2 semi-circular components apart;  then fill the open section with straight lines of length 2a.  The value a=0 represents a circle and a>0 a stadium shape.  You will now study the motion of a billiard ball inside this shape.  A function that represents the boundary of the stadium-shaped billiards table is given below.

stadium[r_,a_]:=Graphics[{AbsoluteThickness[2],
Line[{{-a,r},{a,r}}],Circle[{a,0},r,{-π/2,π/2}],
Line[{{a,-r},{-a,-r}}],
Circle[{-a,0},r,{π/2,3π/2}]},
AspectRatio->Automatic]