+
This program illustrates the fundamental group of the torus, by depicting elements of the free homotopy class of loops labeled by a pair of integers $(p,q)\in\mathbb{Z}\oplus\mathbb{Z}$.
If $T$ is the torus of revolution depicted here, we denote by $\lambda$ the loop encircling the rotation axis, and $\mu$ the orthogonal loop, which when rotated traces out the torus. Then the integer pair $(p,q)\in\mathbb{Z}\oplus\mathbb{Z}$ represents the free homotopy class of the loop $p\lambda +q\mu$.
(We can work with the free homotopy classes here instead of pointed homotopy classes as the fundamental group of the torus is abelian.)