solvegeo[x_, {u0_, v0_}, b_, m_] :=
Module[{su, e, so},
christoff2[x][u, v];
su = {u -> u[s], v -> v[s], p -> u'[s], q -> v'[s]};
e[j_] := e[j] = G[j, 1, 1]p^2 + 2G[j, 1, 2]p q + G[j, 2, 2]q^2 /. su;
eqic := {u''[s] + e[1] == 0, e[2] + v''[s] == 0,
u[0] == u0, v[0] == v0, u'[0] == Cos[Theta], v'[0] == Sin[Theta]};
so := NDSolve[eqic, {u, v}, {s, 0, b}];
Flatten[Table[so, {Theta, 2 Pi/m, 2 pi, 2 pi/m}], 1]
]
Ok so this is function that computes the geodesics i hope. I'm new user of Mathematica. previously i used Scilab for numerical computations. So now i have function that computes the geodesics. Last step is defining the objects like sphere or thorus.
to := torus[3, 1, 1]
But now the question is, if i want to run the whole code together should i order it in the same notebook? First should be the function solvegeo, then defining the torus and last my first code posted here?
Frank: I know that the easiest way how to define this curve is to use the arc length parametrization, but many times is not so easy to find that parametrization e.g. rotation ellipsoid.