(* It is an open problem since 1960, whether there exists a     *)
(* convex exterior billiard table with an unbounded orbit       *)                          
(* the following lines compute an orbit of 20000 at the         *)
(* semi circle |arg(z)|<= pi/2, |z|<=1                          *)
(* starting at z0 = 2+i. The orbit seems to escape to infinity  *)
(* Serge Tabatchnikov had suggested that this exterior billiard *)
(* table is unstable. The problem is open.                      *)
(* Mathematica code: Oliver Knill, March 2005, Math118r Harvard *)

T1[z_]:=Module[{}, r=Abs[z]; alpha=2 ArcCos[1/r]; z*Exp[I alpha]];
T2[z_]:=z+2(-I-z); T3[z_]:=z+2(I-z);
T[z_]:=N[If[Re[z]<0 && Im[z]>-1,T2[z],If[Re[z]>=0 && Im[z]>=1, T3[z],T1[z]]]];
A1=Graphics[{RGBColor[1,1,0],Disk[{0,0},1,{-Pi/2,Pi/2}]}];
ss=NestList[T,2+I,20000];
coord[z_]:={Re[z],Im[z]};
A3=Graphics[{RGBColor[1,0,0],PointSize[0.00001],Map[Point,Map[coord,ss]]}];
S=Show[A1,A3,AspectRatio->1,PlotRange->All]
