Geodesics 
in the Heisenberg group

Off[ParametricPlot3D::"ppcom"]

Clear[x, y, z, t, a, b, c]

\(\(\(
\)\(x[t_, a_, b_, 
          c_] = \(a\ Sin[c\ t] - \ b\ \((1 - Cos[c\ t])\)\)\/c;\)\)\)

y[t_, a_, b_, 
          c_] = ((b  Sin[c t] + a (1 - Cos[c t]))/c) ;

z[t_, a_, b_, 
          c_] = ((((a^2) + (b^2)) ( c t  - Sin[c t]))/(2 (c^2)));

A few geodesics:

uno = {x[t, a, b, c], y[t, a, b, c], z[t, a, b, c]} /. {a -> 1, b -> 0, 
          c -> 2  Pi}

uno /. t -> 0

uno /. t -> 1

ParametricPlot3D[uno, {t, 0, 1}]

End points a two parametric family of geodesics

ParametricPlot3D[{x[1, a, Sqrt[1 - a^2], c], y[1, a, Sqrt[1 - a^2], c], 
        z[1, a, Sqrt[1 - a^2], c]}, {a, -1, 1}, {c, -2 Pi, 
        2 Pi },  PlotPoints -> 40]

Definitely non Euclidean!

In Polar Coordinates:

\(\(\(
\)\(x[t_, r_, θ_, 
          c_] = \(r\ Cos[θ]\ Sin[c\ t] - \ r\ Sin[θ]\ \((1 - Cos[c\ t])\)\)\/c;\)\)\)

y[t_, r_, θ_, 
          c_] =  ((r Sin[θ]  Sin[c t] + r Cos[θ] (1 - Cos[c t]))/c);

z[t_, r_, θ_, 
          c_] = (((r^2) (c t - Sin[c t]))/(2 (c^2)));

Let us know plot the top of the unit ball r=1 in the Carnot-Caratheodory metric (rescaled in the z axis for an easier viewing):

top = 
      ParametricPlot3D[{x[1, 1, θ, c], y[1, 1, θ, c], 
          3  z[1, 1, θ, c]}, {θ, 0, 2 Pi}, {c, 0.00001, 
          2  Pi},  AspectRatio -> Automatic]

Here is the bottom:

bottom = 
      ParametricPlot3D[{x[1, 1, θ, c], y[1, 1, θ, c], 
          3  z[1, 1, θ, c]}, {θ, 0, 
          2 Pi}, {c, -2 Pi ,  - .0001},  
        AspectRatio -> Automatic]

Both together:

Show[top,  bottom ]

The ball is invariant under rotations in the (x,y) plane.