Walking on a torus Everyone knows that when you walk on a sphere along a straight line, you eventually get back to the point you started from.
I'm wondering about the same question for the torus. Obviously there are some directions which will bring you back from where you started.
By unfolding the torus as a rectangle, it seems that, for any starting point, some directions will generate closed trajectories and that others won't.
Are there results about what these 2 types of trajectories might look like ? (specially the "infinite" one)
 A: There is a nice web page by Mark Irons on geodesics on the torus: link.
Here is one image from that page, showing a period-2 geodesic that crosses itself three times:
            

A: The parametric equation of the torus is:
$$
\sigma(u, v) = \left((R + r \cos u) \cos v, (R + r \cos u) \sin v, r \sin u\right)
$$
Where $R > r$ and $u$, $v$ change in $[0, 2\pi)$.
To get the parametric equation of a curve on the torus starting at $(x_0, y_0)$ and initially moving in the direction of $a\sigma_u + b\sigma_v$. Plug the following into the torus parametric equation:
$$
u = at + x_0 \\
v = bt + y_0
$$
Thus, the parametric equation of the curve becomes:
$$
\gamma(t) = \left((R + r \cos(at+x_0)) \cos(bt+y_0), (R + r \cos(at+x_0)) \sin(bt+y_0), r \sin(at+x_0)\right)
$$
If $b \neq 0$ and $\dfrac{a}{b}$ is rational, the parameterization above is periodic and the curve is closed. If it's irrational, the curve never closes and is a dense subset of the torus. If $b = 0$, the curve is closed.
You can experiment with the above using WolframAlpha or any plotting software capable of plotting 3D parametric equations.


*

*Here is a closed curve on the torus.

*And here is a dense one. Increase the upper limit of $t$ to see how it covers more of the torus.


EDIT: In this answer, I have a formal proof that the curve is dense if $\dfrac{a}{b}$ ($\lambda$ in the answer) is irrational.
A: Every trajectory that corresponds to an oblique direction on the rectangle yields a path that wraps around the torus in a spiral fashion; consecutive loops are spaced equally around the ring. Either it closes after a finite number of loops, or it never closes, and the loops cover the surface of the torus more and more densely. The path as a whole is a dense subset of the torus.
