NotebookDirectory[];SetDirectory[NotebookDirectory[]]

Let us calculate the circumference of the ellipse with axes a and b where a>0 and b>0.  The following command does not work.

(* Integrate[(Sqrt[(a^(2 ))(((Sin[t]))^2)+(b^2)(((Cos[t]))^2)]),{t,0,2 Pi}] *)

The command below works but gives a conditional expression since Mathematica does not know that a > 0 and b > 0.

4 Integrate[(Sqrt[(a^2)(((Sin[t]))^2)+(b^2)(((Cos[t]))^2)]),{t,0,Pi/2}]

Options[Integrate]

The following command is faster.

4 Integrate[(Sqrt[(a^2)(((Sin[t]))^2)+(b^2)(((Cos[t]))^2)]),{t,0,Pi/2},Assumptions:>And[a>0,b>0]]

Integrating over [0,2 π] gives. It is slow, but it does evaluate.

(* Integrate[(Sqrt[(a^2)(((Sin[t]))^2)+(b^2)(((Cos[t]))^2)]),{t,0,2Pi},Assumptions:>And[a>0,b>0]] *)

Plot3D[2 (b EllipticE[1-((a^2)/(b^2))]+a EllipticE[1-((b^2)/(a^2))]),{a,0,3},{b,0,3}]

ContourPlot[2 (b EllipticE[1-((a^2)/(b^2))]+a EllipticE[1-((b^2)/(a^2))]),{a,0,Pi},{b,0,Pi}]

The following graph plots the values of a and b which give ellipses whose circumference is 2π.

ContourPlot[2 (b EllipticE[1-((a^2)/(b^2))]+a EllipticE[1-((b^2)/(a^2))])==2Pi,{a,0,2},{b,0,2},FrameTicks->{Range[0,Pi,(Pi/4)],Range[0,Pi,(Pi/4)],{},{}},FrameLabel-> {a,b}]

The following solve command does not work.

Solve[2 (b EllipticE[1-((a^2)/(b^2))]+a EllipticE[1-((b^2)/(a^2))])==2Pi,b]

But, using a different formula for the circumference does work.

4 b EllipticE[1-((a^2)/(b^2))]

Solve[4 b EllipticE[1-((a^2)/(b^2))]==2Pi,a]

Plot[{(Sqrt[(b^2)-(b^2) (EllipticE^((-1)))[(π/(2 b))]]),b},{b,0,Pi/2},Prolog->{{Dashing[{0.005,.005}],GrayLevel[0.7],Line[{{1,0},{1,1},{0,1}}]}},AspectRatio->Automatic,Ticks->{Join[Range[0,Pi,(Pi/4)],{1}],Join[Range[0,Pi,(Pi/4)],{1}]},AxesLabel-> {b,a}]

Notice that for b=1 we have

(Sqrt[(1^2)-(1^2) (EllipticE^((-1)))[(π/(2 1))]])

Although the formula  (Sqrt[(b^2)-(b^2) (EllipticE^((-1)))[(π/(2 b))]]) for a does work, it is slow when we use it in the plot.

Further notice that the function (Sqrt[(b^2)-(b^2) (EllipticE^((-1)))[(π/(2 b))]]) is symmetric with respect to b=a line. That is, this function is its own inverse.  Therefore we need to calculate only values for  a when b is in the interval [0,1]

Myabs=Table[N[{b(Sqrt[1- (EllipticE^((-1)))[(π/(2 b))]]),b}],{b,(1/20),1,(1/20)}];

Myabs[[1]]

Myabs[[1]][[1]]

Show[Table[ParametricPlot[{(Myabs[[k]][[1]]) Cos[t],(Myabs[[k]][[2]]) Sin[t]},{t,0,2 Pi},PlotStyle->{{Thickness[0.003],Hue[Myabs[[k]][[2]]]}},PlotRange->{{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)}},Axes->False,Frame->True,FrameTicks->{Join[Range[0,Pi,(Pi/4)],{1}],Join[Range[0,Pi,(Pi/4)],{1}],{},{}},ImageSize->250],{k,1,Length[Myabs]}]]

To get the complete picture we have to swap the roles of  a and b.

Show[Table[ParametricPlot[{(Myabs[[k]][[1]]) Cos[t],(Myabs[[k]][[2]]) Sin[t]},{t,0,2 Pi},PlotStyle->{{Thickness[0.003],Hue[Myabs[[k]][[2]]]}}],{k,1,Length[Myabs]}],Table[ParametricPlot[{(Myabs[[k]][[2]]) Cos[t],(Myabs[[k]][[1]]) Sin[t]},{t,0,2 Pi},PlotStyle->{{Thickness[0.003],Hue[Myabs[[k]][[2]]]}}],{k,1,Length[Myabs]}],PlotRange->{{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)}},Axes->False,Frame->True,FrameTicks->{Join[Range[-Pi,Pi,(Pi/4)],{-1,1}],Join[Range[-Pi,Pi,(Pi/4)],{-1,1}],{},{}},ImageSize->350]

To emphasize the unit circle

Show[
(* wide ellipses *)Table[ParametricPlot[{(Myabs[[k]][[1]]) Cos[t],(Myabs[[k]][[2]]) Sin[t]},{t,0,2 Pi},PlotStyle->{{Thickness[0.003],Hue[Myabs[[k]][[2]]]}}],{k,1,Length[Myabs]}],

(* tall ellipses *)Table[ParametricPlot[{(Myabs[[k]][[2]]) Cos[t],(Myabs[[k]][[1]]) Sin[t]},{t,0,2 Pi},PlotStyle->{{Thickness[0.003],Hue[Myabs[[k]][[2]]]}}],{k,1,Length[Myabs]}],


(* unit circle *)
ParametricPlot[{ Cos[t],Sin[t]},{t,0,2 Pi},PlotStyle->{{Thickness[0.006],Red}}],PlotRange->{{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)}},Axes->False,Frame->True,FrameTicks->{Join[Range[-Pi,Pi,(Pi/4)],{-1,1}],Join[Range[-Pi,Pi,(Pi/4)],{-1,1}],{},{}},ImageSize->350]

To experiment with the number of ellipses we use

st=(1/25);ET=Table[N[{b(Sqrt[1-(EllipticE^((-1)))[(π/(2 b))]]),b}],{b,st,1-st,st}]; 
Length[ET]

(* thickness for ellipses *) the=0.002; 
(* thickness for the unit circle *) thc=0.0035;  

ManyEllipses=Show[
(* wide ellipses *)

Table[ParametricPlot[{(ET[[k]][[1]]) Cos[t],(ET[[k]][[2]]) Sin[t]},{t,0,2 Pi},PlotStyle->{{Thickness[the],Hue[ET[[k]][[2]]]}}],{k,1,Length[ET]}],

(* tall ellipses *)
Table[ParametricPlot[{(ET[[k]][[2]]) Cos[t],(ET[[k]][[1]]) Sin[t]},{t,0,2 Pi},PlotStyle->{{Opacity[0.85],Thickness[the],Hue[ET[[k]][[2]]]}}],{k,Length[ET],1,-1}],

(* unit circle *)
ParametricPlot[{ Cos[t],Sin[t]},{t,0,2 Pi},PlotStyle->{{Thickness[thc],Red}}],

PlotRange->{{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)}},Axes->False,Frame->True,FrameTicks->{Join[Range[-Pi,Pi,(Pi/4)],{-1,1}],Join[Range[-Pi,Pi,(Pi/4)],{-1,1}],{},{}},ImageSize->800]

(* Export["ManyEllipses.png",ManyEllipses];Export["ManyEllipses.svg",ManyEllipses];Export["ManyEllipses.gif",ManyEllipses] *)

The rest of the notebook is just to make two animations for the class website.

Next I will try to make a related animation.

Reverse[Reverse[#]&/@ET]

aET=Join[ET,{{1,1}},Reverse[Reverse[#]&/@ET]];

Length[aET]

(* thickness for ellipses *) the=0.002; 
(* thickness for the unit circle *) thc=0.0035;  

ManyEllipsesAni=Table[Show[
(* all ellipses *)

Table[ParametricPlot[{(aET[[k]][[1]]) Cos[t],(aET[[k]][[2]]) Sin[t]},{t,0,2 Pi},PlotStyle->{{Thickness[the],Hue[Min[aET[[k]]]]}}],{k,1,n}],

PlotRange->{{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)}},Axes->False,Frame->True,FrameTicks->{Join[Range[-Pi,Pi,(Pi/4)],{-1,1}],Join[Range[-Pi,Pi,(Pi/4)],{-1,1}],{},{}},ImageSize->800],{n,1,Length[aET]}];

ManyEllipsesAni=Join[ManyEllipsesAni,Reverse[ManyEllipsesAni]];

Length[ManyEllipsesAni]

(*  
Export["ManyEllipsesAniS1.gif",ManyEllipsesAni[[49]],"GIF",{"ImageSize"->600}];

Export["ManyEllipsesAni.gif",ManyEllipsesAni,"GIF","AnimationRepetitions"->Infinity,"ImageSize"->600,"DisplayDurations"->0.3] 
*)

Finally, all these ellipses, when placed atop of each other form a closed surface.

MyF=Interpolation[Append[Prepend[aET,{0,Pi/2}],{Pi/2,0}]]

MyF[.2]

Plot[MyF[x],{x,0,Pi/2}]

ParametricPlot3D[{(MyF[b]) Cos[t],(b) Sin[t],(Pi/2) If[b<1,b,1+(1-MyF[b])]},{t,0,2 Pi},{b,0,Pi/2},PlotRange->{{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)},{0,Pi}},Axes->True,ImageSize->350]

ParametricPlot3D[{(If[b≤1,MyF[b],2-b]) Cos[t],(If[b≤1,b,MyF[2-b]]) Sin[t],(Pi/2) b},{t,0,2 Pi},{b,0,2},PlotRange->{{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)},{0,Pi}},Axes->True,ImageSize->350]

vp={1.571063728874434`,-2.8292354233883845`,0.9885270248503611`}

Show[ParametricPlot3D[{(If[b≤0,MyF[1+b],1-b]) Cos[t],(If[b≤0,1+b,MyF[1-b]]) Sin[t],(Pi/2) b},{t,0,2 Pi},{b,-1,1},PlotPoints->{100,100},PlotStyle->{{Opacity[0.6]}},Mesh->False],(* Table[ParametricPlot3D[{(If[b≤0,MyF[1+b],1-b]) Cos[t],(If[b≤0,1+b,MyF[1-b]]) Sin[t],(Pi/2) b},{t,0,2 Pi},PlotPoints->{100},PlotStyle->{{Hue[1-Abs[b]],Thickness[0.005]}}],{b,-0.75,0.75,.3}],*)ParametricPlot3D[{(1) Cos[t],(1) Sin[t],0},{t,0,2Pi},PlotPoints->{100},PlotStyle->{{Red,Thickness[0.005]}}],PlotRange->{{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)}},Ticks->{Join[Range[-(Pi/2),(Pi/2),(Pi/2)],{-1,1}],Join[Range[-(Pi/2),(Pi/2),(Pi/2)],{-1,1}],Range[-(Pi/2),(Pi/2),(Pi/2)]},Axes->True,ImageSize->350,ViewPoint->vp]

vp={1.571063728874434`,-2.8292354233883845`,0.9885270248503611`}

Manipulate[Show[ParametricPlot3D[{(If[b≤0,MyF[1+b],1-b]) Cos[t],(If[b≤0,1+b,MyF[1-b]]) Sin[t],(Pi/2) b},{t,0,2 Pi},{b,-1,bb},PlotPoints->{100,100},PlotStyle->{{Opacity[0.6]}},Mesh->False],ParametricPlot3D[{(If[bb≤0,MyF[1+bb],1-bb]) Cos[t],(If[bb≤0,1+bb,MyF[1-bb]]) Sin[t],(Pi/2) bb},{t,0,2Pi},PlotPoints->{100},PlotStyle->{{RGBColor[0,0,.5],Thickness[0.005]}}],ParametricPlot3D[{(1) Cos[t],(1) Sin[t],0},{t,0,2Pi},PlotStyle->{{Red,Thickness[0.005]}}],PlotRange->{{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)}},Ticks->{Join[Range[-(Pi/2),(Pi/2),(Pi/2)],{-1,1}],Join[Range[-(Pi/2),(Pi/2),(Pi/2)],{-1,1}],Range[-(Pi/2),(Pi/2),(Pi/4)]},Axes->True,ImageSize->250,ViewPoint->vp],{bb,-0.999,1}]

TDManyEllipsesAni=Table[Show[ParametricPlot3D[{(If[b≤0,MyF[1+b],1-b]) Cos[t],(If[b≤0,1+b,MyF[1-b]]) Sin[t],(Pi/2) b},{t,0,2 Pi},{b,-1,bb},PlotPoints->{100,100},PlotStyle->{{Opacity[0.6]}},Mesh->False],ParametricPlot3D[{(If[bb≤0,MyF[1+bb],1-bb]) Cos[t],(If[bb≤0,1+bb,MyF[1-bb]]) Sin[t],(Pi/2) bb},{t,0,2Pi},PlotPoints->{100},PlotStyle->{{RGBColor[0,0,.5],Thickness[0.005]}}],ParametricPlot3D[{(1) Cos[t],(1) Sin[t],0},{t,0,2Pi},PlotStyle->{{Red,Thickness[0.005]}}],PlotRange->{{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)},{-(Pi/2),(Pi/2)}},Ticks->{Join[Range[-(Pi/2),(Pi/2),(Pi/2)],{-1,1}],Join[Range[-(Pi/2),(Pi/2),(Pi/2)],{-1,1}],Range[-(Pi/2),(Pi/2),(Pi/2)]},Axes->True,ImageSize->600,ViewPoint->vp],{bb,-.999,1,(1.999/30)}];

Length[TDManyEllipsesAni]

TDManyEllipsesAni[[31]]

ListAnimate[TDManyEllipsesAni]

TDManyEllipsesAni=Join[TDManyEllipsesAni,Reverse[TDManyEllipsesAni]];

Length[TDManyEllipsesAni]

(* 
Export["TDManyEllipsesAniS1.gif",TDManyEllipsesAni[[31]],"GIF",{"ImageSize"->600}];

Export["TDManyEllipsesAni.gif",TDManyEllipsesAni,"GIF","AnimationRepetitions"->Infinity,"ImageSize"->600,"DisplayDurations"->0.3] 
*)