Lifting an ellipse in the sub Nil space

Find the shortest path between the origin and {0,0,π}

The program allows the User to change the one of the radii of an ellipse. The ellipse is then lifted in nil space. The program plots the projected ellipse and the curve. The programs calculates the length of the curve  the height of the endpoint. The User may change α to change the ellipse.
Then evaluate both of the following cells 
Each curve in nil space can be uniquely determined by the projection on to the xy plane because one can only traverse  one a tangent plane for any given point. Using a parametizes curve where x and y are given, z = Integral of dz, where dz = .5*(x*D[y,t]-D[x,t]*y). Since the spaning vectors we are using are {1,0,-.5y} and {0,1,.5x}.

α =1;

(*The User should not change any of the code below this point*)Clear[t,x,y,z,dx,dy,dz,f];
x=α*Sin[t];
y=(1/α)*(-Cos[t]+1);
dz=.5*(x*D[y,t]-D[x,t]*y);
dz=TrigReduce[dz];
z=Integrate[dz,t];
Print["The projected ellipse"];
ParametricPlot[{x,y},{t,0,2*Pi}]
Print["The curve in Nil space"];
ParametricPlot3D[{x,y,z},{t,0,2*Pi}]
dx=D[x,t];
dy=D[y,t];
f=dx^2+dy^2+dz^2;
f=Sqrt[TrigReduce[f]];
Print["The length of the curve is:"];
Print[NIntegrate[f,{t,0.00,2.*Pi},WorkingPrecision->15]];
t=2*Pi;
Print["The final position is :" ]
Print[z]

Finding the ellipse with that produces the shortest curve

This program Plots the length of one of the radii of the ellipse vs. the length of the curve.  The minimum of this plot occurs when the radius is equal to one. In this case the ellipse is a circle. Proving our conjecture that the shortest path projects a circle on to the xy plane.

Clear[t,x,y]
x=β Sin[t];
y=((-Cos[t]+1)/β);
dz=0.5* (x (∂_t)y-(∂_t)x y);
dz=TrigReduce[dz];
z=∫dz\[DifferentialD]t;
dx=(∂_t)x;
dy=(∂_t)y;
f=(dx^2)+(dy^2)+(dz^2);
f=TrigReduce[f];
f=(Sqrt[f])
Plot[NIntegrate[f,{t,0.,2. π}],{β,0,10},AxesLabel->{β,length},PlotLabel->"radius vs. length of curve"]
 {a,b} =FindMinimum[NIntegrate[f,{t,0.,2. π}],{β,0.75,1.25}];
Print["The minimum curve length is: "]
Print[a]
Print["when " b];

Try you own curve 
(remember the height is equal to the area contained in the closed curve)

Clear[t,x,y]

Manipulate[
dz=.5*(x*D[y,t]-D[x,t]*y);
dz=TrigReduce[dz];
z=Integrate[dz,t];
temp =z;
t = 0;
c = temp;
Clear[t];
z = z -c;
dx=D[x,t];
dy=D[y,t];
f=dx^2+dy^2+dz^2;
f=Sqrt[TrigReduce[f]];
p =NIntegrate[f,{t,0,tend},WorkingPrecision->15];
t = tend;
fp = {x, y, z};
Clear[t];

Dynamic[ParametricPlot3D[{x,y,z},{t,tstart,tend}]],
Item["The Length of the curve in Nil",Alignment->Center],
Item[p,Alignment->Center],
Dynamic[ ParametricPlot[{x,y}, {t, tstart, tend}]],
Item["Final Position",Alignment->Center],
Item[fp,Alignment->Center],
{x, Sin[t]},
{y,(1-Cos[t])}, {tstart, 0 }, {tend, 2*Pi},ControlPlacement->{Left}, Paneled-> False]

This function show that the height is equal to the area contained in the curve.

Clear[t,x,y,z,dx,dy,dz,f];

x = Sin[t];
y = Cos[t];
tstart = 0;
tend  = Pi;
Print["The area contained in the curve is: "];
N[Abs[Integrate[y*D[x,t], {t, 0, Pi/2}]]+Abs[Integrate[y*D[x,t], {t, Pi/2, Pi}]],6]

dz=.5*(x*D[y,t]-D[x,t]*y);
dz=TrigReduce[dz];
z=Integrate[dz,t];
temp =z;
t = 0;
c = temp;
Clear[t]
z = z -c;
Print["The projected ellipse"];
ParametricPlot[{x,y},{t,tstart,tend}]
Print["The curve in Nil space"];
ParametricPlot3D[{x,y,z},{t,tstart,tend}]
dx=D[x,t];
dy=D[y,t];
f=dx^2+dy^2+dz^2;
f=Sqrt[TrigReduce[f]];
Print["The length of the curve is:"];
Print[NIntegrate[f,{t,tstart,tend},WorkingPrecision->15]];
t=tend;
Print["The final position is :" ]
Print[z]

Other curves
Also try curves with corners

Clear[t,x,y,z,dx,dy,dz,f];
x=Piecewise[{{2*Sqrt[Pi]*t, t<1},{2*Sqrt[Pi]*(-t^2+2),1≤t <Sqrt[2]}, {0 ,1+Sqrt[2] ≥ t≥ Sqrt[2 ]}, {t,1+Sqrt[2] < t }}]
y=Piecewise[{{0, t<1},{Sqrt[Pi]*(t^2-1),1≤t <Sqrt[2]},
{Sqrt[Pi]*(1+Sqrt[2]-t), t≥Sqrt[2]}}]
tend = 1 + Sqrt[2];
dz=.5*(x*D[y,t]-D[x,t]*y);
dz=TrigReduce[dz];
z=Integrate[dz,t];
Print["The projected line"];
ParametricPlot[{x,y},{t,0,tend}]
Print["The curve in Nil space"];
ParametricPlot3D[{x,y,z},{t,0,tend}]
dx=D[x,t];
dy=D[y,t];
f=dx^2+dy^2+dz^2;
f=Sqrt[TrigReduce[f]];
Print["The length of the curve is:"];
Print[NIntegrate[f,{t,0.00,10},WorkingPrecision->15]];
t=tend;
Print["The final position is :" ]
Print[{x,y,z}]

Another curve with corners

Clear[t,x,y,z,dx,dy,dz,f];
x=Piecewise[{{Sqrt[Pi]*t, t<1},{Sqrt[Pi],1≤t <2},{3*Sqrt[Pi]-Sqrt[Pi]*(t),2≤t <3},{0,3≤ t <=4}, {t, t>4}}]
y=Piecewise[{{0, t<1},{-Sqrt[Pi]+Sqrt[Pi]*(t),1≤t <2},{Sqrt[Pi],2≤t <3},
{Sqrt[Pi](4-t), t≥3}}]
tend = 4;
dz=.5*(x*D[y,t]-D[x,t]*y);
dz=TrigReduce[dz];
z=Integrate[dz,t];
Print["The projected line"];
ParametricPlot[{x,y},{t,0,tend}]
Print["The curve in Nil space"];
ParametricPlot3D[{x,y,z},{t,0,tend}]
dx=D[x,t];
dy=D[y,t];
f=dx^2+dy^2+dz^2;
f=Sqrt[TrigReduce[f]];
Print["The length of the curve is:"];
Print[NIntegrate[f,{t,0.00,10},WorkingPrecision->15]];
t=tend;
Print["The final position is :" ]
Print[{x,y,z}]

Closed curve

Clear[t,x,y,z,dx,dy,dz,f];
x=(1-Cos[t]);
y=Sin[t]*Cos[t];
tend = 2*Pi;
dz=.5*(x*D[y,t]-D[x,t]*y);
dz=TrigReduce[dz];
z=Integrate[dz,t];
temp =z;
t = 0;
c = temp;
Clear[t]
z = z -c;
Print["The projected line"];
ParametricPlot[{x,y},{t,0,tend}]
Print["The curve in Nil space"];
ParametricPlot3D[{x,y,z},{t,0,tend}]
dx=D[x,t];
dy=D[y,t];
f=dx^2+dy^2+dz^2;
f=Sqrt[TrigReduce[f]];
Print["The length of the curve is:"];
Print[NIntegrate[f,{t,0.00,10},WorkingPrecision->15]];
t=tend;
Print["The final position is :" ]
Print[{x,y,z}]

Self Intersecting Curve

α = 3;
Clear[t,x,y,z,dx,dy,dz,f];
x=α/3*(Cos[t]-Cos[2t]);
y=1/α*(Sin[t]-Sin[2t]);
tend = 2*Pi;
dz=.5*(x*D[y,t]-D[x,t]*y);
dz=TrigReduce[dz];
z=Integrate[dz,t];
temp =z;
t = 0;
c = temp;
Clear[t]
z = z -c;
Print["The projected line"];
ParametricPlot[{x,y},{t,0,tend}]
Print["The curve in Nil space"];
ParametricPlot3D[{x,y,z},{t,0,tend}]
dx=D[x,t];
dy=D[y,t];
f=dx^2+dy^2+dz^2;
f=Sqrt[TrigReduce[f]];
Print["The length of the curve is:"];
Print[NIntegrate[f,{t,0.00,10},WorkingPrecision->15]];
t=tend;
Print["The final position is :" ]
Print[{x,y,z}]

Clear[t,x,y,z,dx,dy,dz,f];
x=2*Sin[t]*Cos[t];
y=(-Cos[t]+1)*Cos[t];
tend = 2*Pi;
dz=.5*(x*D[y,t]-D[x,t]*y);
dz=TrigReduce[dz];
z=Integrate[dz,t];
temp =z;
t = 0;
c = temp;
Clear[t]
z = z -c;
Print["The projected line"];
ParametricPlot[{x,y},{t,0,tend}]
Print["The curve in Nil space"];
ParametricPlot3D[{x,y,z},{t,0,tend}]
dx=D[x,t];
dy=D[y,t];
f=dx^2+dy^2+dz^2;
f=Sqrt[TrigReduce[f]];
Print["The length of the curve is:"];
Print[NIntegrate[f,{t,0.00,10},WorkingPrecision->15]];
t=tend;
Print["The final position is :" ]
Print[{x,y,z}]