# 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)

-
How do you define "straight line" on a sphere/torus? –  DonAntonio Sep 19 '12 at 9:51
@DonAntonio I think Tos is referring to geodesics on a sphere/torus. –  Amitesh Datta Sep 19 '12 at 10:29
Correct ! I did think about writing "straight" with quotation marks, though. –  Tos Sep 19 '12 at 11:27
It should be noted that what you call "straight" probably means straight in the parametrisation of the torus by $\mathbf R^2/\mathbf Z^2$, which is not a very natural notion in the geometry of embedded torus (into $\mathbf R^3$); in any case these are not geodesics for the induced metric structure (whereas great circles are for the sphere). –  Marc van Leeuwen Sep 19 '12 at 11:48

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.

1. Here is a closed curve on the torus.
2. 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.

-
I want first to thank all those who have answered, each adding useful informations. Ayman Hourieh's answer is nice and complete. I find that infinity is even more fascinating when it fits in a small box. –  Tos Sep 20 '12 at 14:53
@Tos You're welcome. Glad to know that you found the answers helpful. –  Ayman Hourieh Sep 20 '12 at 15:51