EllipticalTable = Show[Graphics[Circle[{0,0},{3,2}]],Axes->True]

(* A Parametric version of the ellipse from 0 to 2Pi.  *)
	curve[t_]:={3Cos[t],2Sin[t]};
(* Some functions to plot points and line segments of orbits.  *)
	rpoint[t_]:= Graphics[{Red,PointSize[Large],Point[curve[t]]}];
	segment[t0_,t1_]:=curve[t1]-curve[t0];

segmentLength[t0_,t1_]:=N[EuclideanDistance[curve[t0],curve[t1]]]
	tangent[s_]:=D[curve[s0],s0]/.  s0->s;
	segmentVector[t_]:=-N[cosineAngle[t]*Norm[tangent[t]]/tangent[t]]; 
	cosineAngle[t_]:=(tangent[t].segment[0,t])/(Norm[tangent[t]]*Norm[segment[0,t]]);
	cosineAngleH[tBase_,tHead_]:=(tangent[tHead].segment[tHead,tBase])/(Norm[tangent[tHead]]*Norm[segment[tHead,tBase]]);
	angleH[tBase_,tHead_]:=ArcCos[(tangent[tHead].segment[tHead,tBase])/(Norm[tangent[tHead]]*Norm[segment[tBase,tHead]])];
	angleB[tBase_,tHead_]:=ArcCos[(tangent[tBase].segment[tBase,tHead])/(Norm[tangent[tBase]]*Norm[segment[tHead,tBase]])];
	cosineAngleB[tBase_,tHead_]:=(tangent[tBase].segment[tBase,tHead])/(Norm[tangent[tBase]]*Norm[segment[tHead,tBase]]);
	
	tangentLineSegment[t0_]:= ParametricPlot[curve[t0]+t*tangent[t0],{t,-.2,.2},PlotStyle->Orange]
(* The function midPoint refers to the orbit midpoint. We are allowing the midpoint to vary and calculating the sum of the 
   chord distances, looking for the maximum.  *)
	midPoint[tl_,th_]:= (t/. Maximize[{segmentLength[tl,t]+segmentLength[t,th],tl<t<th},t][[2]])
(* Plots. *)
	curveplot = ParametricPlot[curve[t],{t,0,2Pi},Ticks->None];
	segmentPlot[t0_,t1_]:=ParametricPlot[curve[t0]+t*segment[t0,t1],{t,0,1},PlotStyle->{Blue,Thick}]

(* Interpolation:  Constructing orbit segments by calculating the internediate point.  We calculate the orbit midpoint,
   allowing the endpoints to vary by slider. Here, the lower point t1 ranges from 0 to just under the upper point t3.  *)
Manipulate[{t2=midPoint[t1,t3];Show[curveplot,rpoint[t1],rpoint[t2],rpoint[t3],segmentPlot[t1,t2],segmentPlot[t2,t3],tangentLineSegment[t3],tangentLineSegment[t2],tangentLineSegment[t1],ImageSize->400],cosineAngleH[t1,t2],-cosineAngleB[t2,t3]}, {t1,0,t3-.01},{t3,.01,2Pi}]

{x,y}/. Solve[{x^2/9+y^2/4==1,y==2Sin[t]-2(x-3Cos[t])Cos[t-a]/Sin[t-a]},{x,y}] /. {t->.5,a->0}

{{2.6327476856711187`,0.9588510772084058`},{2.9707542995170217`,-0.27858283579664933`}}

(* Construct periodic orbits. Here we fix one point on the ellipse along the horizontal (diameter) axis,
    and allow the other points of an n-gon vary.  To find an n=periodic point, we maximize the perimeter of the polygon.
	This corresponds to minimizing the function H(t1,t2,...,tn).  *)
	Period3:={tOne,tTwo} /. Maximize[{segmentLength[0,tOne]+segmentLength[tOne,tTwo]
	+segmentLength[tTwo,0],0<tOne<Pi,Pi<tTwo<2Pi},{tOne,tTwo}][[2]]
	Period4:={tOne,tTwo,tThree} /. Maximize[{segmentLength[0,tOne]+segmentLength[tOne,tTwo]
	+segmentLength[tTwo,tThree]+segmentLength[tThree,0],Pi/4<tOne<3Pi/4,Pi/2<tTwo<3*Pi/2,Pi<tThree<2Pi},{tOne,tTwo,tThree}][[2]]
	Period5:={tOne,tTwo,tThree,tFour} /. Maximize[{segmentLength[0,tOne]+segmentLength[tOne,tTwo]
	+segmentLength[tTwo,tThree]+segmentLength[tThree,tFour]+segmentLength[tFour,0],Pi/4<tOne<3Pi/4,Pi/2<tTwo<Pi,
		Pi<tThree<3Pi/2,3Pi/2<tFour<2Pi},{tOne,tTwo,tThree,tFour}][[2]]
(* For Period5c, we set the intervals for the adjacent points on the polygon to interlace, creating a pentagram instead of a pentagon. *)
	Period5c:={tOne,tTwo,tThree,tFour} /. Maximize[{segmentLength[0,tOne]+segmentLength[tOne,tTwo]
	+segmentLength[tTwo,tThree]+segmentLength[tThree,tFour]+segmentLength[tFour,0],Pi/2<tOne<Pi,3Pi/2<tTwo<2*Pi,
		Pi/6<tThree<Pi/2,Pi<tFour<3Pi/2},{tOne,tTwo,tThree,tFour}][[2]]
	Period6:={tOne,tTwo,tThree,tFour,tFive} /. Maximize[{segmentLength[0,tOne]+segmentLength[tOne,tTwo]
	+segmentLength[tTwo,tThree]+segmentLength[tThree,tFour]+segmentLength[tFour,tFive]+segmentLength[tFive,0],
		Pi/6<tOne<Pi/3,Pi/3<tTwo<5Pi/6,3Pi/4<tThree<5Pi/4,Pi<tFour<4Pi/3,3Pi/2<tFive<2Pi},{tOne,tTwo,tThree,tFour,tFive}][[2]]
(* For newPeriod3, we set the fixed point on teh other side of the ellipse. *)	
	NewPeriod3:={tOne,tTwo,tThree} /. Maximize[{segmentLength[tOne,tTwo]+segmentLength[tTwo,tThree]
	+segmentLength[tThree,tOne],Pi/4<tOne<Pi/3,Pi/2<tTwo<3Pi/2,Pi<tThree<7Pi/4},{tOne,tTwo,tThree}][[2]]
(*  Now we Display the periodoc orbits above.  *)
	Show[curveplot,rpoint[0],rpoint[Period3[[1]]],rpoint[Period3[[2]]],segmentPlot[0,Period3[[1]]],
		segmentPlot[Period3[[1]],Period3[[2]]],segmentPlot[Period3[[2]],0]]
	(* Export["EllPeriod3.eps",%]*)
	Show[curveplot,rpoint[0],rpoint[Period4[[1]]],rpoint[Period4[[2]]],rpoint[Period4[[3]]],
		segmentPlot[0,Period4[[1]]],segmentPlot[Period4[[1]],Period4[[2]]],
		segmentPlot[Period4[[2]],Period4[[3]]],segmentPlot[Period4[[3]],0]]
	(* Export["EllPeriod4.eps",%] *)
	Show[curveplot,rpoint[0],rpoint[Period5[[1]]],rpoint[Period5[[2]]],rpoint[Period5[[3]]],
		rpoint[Period5[[4]]],segmentPlot[0,Period5[[1]]],segmentPlot[Period5[[1]],
		Period5[[2]]],segmentPlot[Period5[[2]],Period5[[3]]],segmentPlot[Period5[[3]],
		Period5[[4]]],segmentPlot[Period5[[4]],0]]
	(* Export["EllPeriod5.eps",%] *)
	Show[curveplot,rpoint[0],rpoint[Period6[[1]]],rpoint[Period6[[2]]],rpoint[Period6[[3]]],
		rpoint[Period6[[4]]],rpoint[Period6[[5]]],segmentPlot[0,Period6[[1]]],
		segmentPlot[Period6[[1]],Period6[[2]]],segmentPlot[Period6[[2]],Period6[[3]]],
		segmentPlot[Period6[[3]],Period6[[4]]],segmentPlot[Period6[[4]],Period6[[5]]],segmentPlot[Period6[[5]],0]]
	(* Export["EllPeriod6.eps",%] *)
	Show[curveplot,rpoint[NewPeriod3[[3]]],rpoint[NewPeriod3[[1]]],rpoint[NewPeriod3[[2]]],
		segmentPlot[NewPeriod3[[1]],NewPeriod3[[2]]],segmentPlot[NewPeriod3[[2]],
		NewPeriod3[[3]]],segmentPlot[NewPeriod3[[3]],NewPeriod3[[1]]]]
(* And here is the pentagram. *)
	Show[curveplot,rpoint[0],rpoint[Period5c[[1]]],rpoint[Period5c[[2]]],rpoint[Period5c[[3]]],
		rpoint[Period5c[[4]]],segmentPlot[0,Period5c[[1]]],segmentPlot[Period5c[[1]],
		Period5c[[2]]],segmentPlot[Period5c[[2]],Period5c[[3]]],segmentPlot[Period5c[[3]],
		Period5c[[4]]],segmentPlot[Period5c[[4]],0]]
(* Export["Pentagram.eps",%]. *)