(* This computes the action of proper affine parabolic group on a line *)Phi1[t_]:= {{1, t, t^2/2}, {0, 1, t}, {0, 0, 1}}

Phi2[mu1_, t_]:= mu1{t^3/6, t^2/2, t}

M={{0,0,-1}, {0, 1, 0}, {-1, 0, 0}}

L[s_]:= { a*s, y0,  c* s}

LINE[s_, t_]:= Phi1[t].L[s] + Phi2[mu, t]

LINE[s, t]

(*This gives a section at x= x0*)

Solve[a s+(1/2) c s (t^2)+((mu (t^3))/6)+t y0==x0, s]

Simplify[LINE[((-mu (t^3)+6 x0-6 t y0)/(3 (2 a+c (t^2)))), t]]

(* need condition y0 < mu a/c From the paper*)

Animate[ParametricPlot[{((mu (t^2))/2)+y0-((c t (mu (t^3)-6 x0+6 t y0))/(6 a+3 c (t^2))),mu t-((c (mu (t^3)-6 x0+6 t y0))/(6 a+3 c (t^2)))}/.{y0->1, a->1, c-> 0.1, mu->1}, {t, -10, 10}], {x0, -10, 10}]

(* We draw the ruled surface using the sections   *)

ParametricPlot3D[{x0,((mu (t^2))/2)+y0-((c t (mu (t^3)-6 x0+6 t y0))/(6 a+3 c (t^2))),mu t-((c (mu (t^3)-6 x0+6 t y0))/(6 a+3 c (t^2)))}/.{y0->1, a->1, c-> 0.1, mu->1},{x0, -50, 50}, {t, -10, 10}]

(* We draw the ruled surface using the sections   *)

ParametricPlot3D[{x0,((mu (t^2))/2)+y0-((c t (mu (t^3)-6 x0+6 t y0))/(6 a+3 c (t^2))),mu t-((c (mu (t^3)-6 x0+6 t y0))/(6 a+3 c (t^2)))}/.{y0->1, a->1, c-> 0.2, mu->1},{x0, -50, 50}, {t, -10, 10}]

Simplify[{a s+(1/2) c s (t^2)+((mu (t^3))/6)+t y0,c s t+((mu (t^2))/2)+y0,c s+mu t}.{1,C3,C4}]

Simplify[{k1,k2,k3}.{1, C3, C4}]

k1+C3 k2+C4 k3

(* Orthogonal basis (1, C3, C4), (1, -1/C3, 0) , (1, -C3, -(((1+(C3^2)))/C4))*)

Solve[k1+C3 k2+C4 k3==0, k2]

Simplify[{kk1, kk2, kk3}.{1, -1/C3, 0}] (* This is Euclidean orthogonality*)

Solve[{k1+C3 k2+C4 k3==0, k1 - (1/C3) k2==0}, {k1, k2, k3}]

Solve[{a s+C4 mu t+(1/2) C3 mu (t^2)+((mu (t^3))/6)+(1/2) c s (2 C4+2 C3 t+(t^2))+C3 y0+t y0 == 0}, s]

{a s+(1/2) c s (t^2)+((mu (t^3))/6)+t y0,c s t+((mu (t^2))/2)+y0,c s+mu t}/.{s->((-6 C4 mu t-3 C3 mu (t^2)-mu (t^3)-6 C3 y0-6 t y0)/(3 (2 a+2 c C4+2 c C3 t+c (t^2))))}

Y2:= {((mu (t^3))/6)+t y0+((a (-6 C4 mu t-3 C3 mu (t^2)-mu (t^3)-6 C3 y0-6 t y0))/(3 (2 a+2 c C4+2 c C3 t+c (t^2))))+((c (t^2) (-6 C4 mu t-3 C3 mu (t^2)-mu (t^3)-6 C3 y0-6 t y0))/(6 (2 a+2 c C4+2 c C3 t+c (t^2)))),((mu (t^2))/2)+y0+((c t (-6 C4 mu t-3 C3 mu (t^2)-mu (t^3)-6 C3 y0-6 t y0))/(3 (2 a+2 c C4+2 c C3 t+c (t^2)))),mu t+((c (-6 C4 mu t-3 C3 mu (t^2)-mu (t^3)-6 C3 y0-6 t y0))/(3 (2 a+2 c C4+2 c C3 t+c (t^2))))}.{1, -1/C3, 0}

Simplify[Y2]

Y3:= {((mu (t^3))/6)+t y0+((a (-6 C4 mu t-3 C3 mu (t^2)-mu (t^3)-6 C3 y0-6 t y0))/(3 (2 a+2 c C4+2 c C3 t+c (t^2))))+((c (t^2) (-6 C4 mu t-3 C3 mu (t^2)-mu (t^3)-6 C3 y0-6 t y0))/(6 (2 a+2 c C4+2 c C3 t+c (t^2)))),((mu (t^2))/2)+y0+((c t (-6 C4 mu t-3 C3 mu (t^2)-mu (t^3)-6 C3 y0-6 t y0))/(3 (2 a+2 c C4+2 c C3 t+c (t^2)))),mu t+((c (-6 C4 mu t-3 C3 mu (t^2)-mu (t^3)-6 C3 y0-6 t y0))/(3 (2 a+2 c C4+2 c C3 t+c (t^2))))}. {1, -C3, -(((1+(C3^2)))/C4)}

Simplify[Y3]

ParametricPlot[{-((6 a (2 C3 C4 mu t+mu (t^2)+2 y0+(C3^2) (mu (t^2)+2 y0))+c ((1+(C3^2)) (t^2) (mu (t^2)-6 y0)+2 C4 (mu (t^2) (-3+2 C3 t)-6 (-1+C3 t) y0)))/(6 C3 (2 a+c (2 C4+t (2 C3+t))))),(1/(3 C4 (2 a+c (2 C4+t (2 C3+t)))))(-6 a (mu t (1+(C3^2)+(C4^2)+C3 C4 t)+2 C3 C4 y0)+c (-2 (1+(C4^2)) t (mu (t^2)-3 y0)+(C3^3) (-3 mu (t^2)+6 y0)+(C3^2) (-2 mu (t^3)+6 t y0)+C3 (-mu (t^2) (3-3 (C4^2)+C4 (t^2))+6 (1-(C4^2)+C4 (t^2)) y0)))}/.{y0->1, a->1, c-> 0.1, mu->1, C3-> 3, C4->6}, {t, -10, 10}]

CoorNorm[{x_, y_, z_}]:= {x/Sqrt[(1+Norm[{x, y, z}]^2)], y/Sqrt[(1+Norm[{x, y, z}]^2)],  z/Sqrt[(1+Norm[{x, y, z}]^2)]}

(*stereographic projection of the ruled surface   *)

ParametricPlot3D[CoorNorm[{x0,((mu (t^2))/2)+y0-((c t (mu (t^3)-6 x0+6 t y0))/(6 a+3 c (t^2))),mu t-((c (mu (t^3)-6 x0+6 t y0))/(6 a+3 c (t^2)))}]/.{y0->1, a->1, c-> 0.1, mu->1},{x0, -30, 30}, {t, -20, 20}]

Animate[ParametricPlot[{((mu (t^2))/2)+y0-((c t (mu (t^3)-6 x0+6 t y0))/(6 a+3 c (t^2))),mu t-((c (mu (t^3)-6 x0+6 t y0))/(6 a+3 c (t^2)))}/.{y0->1, a->1, c-> 0.1, mu->1}, {t, -10, 10}], {x0, -20, 20}]