# How do I map the torus to a plane?

A bit of background. Imagine a solid texture, like an actual block of sky and cloud. If you "cut a sheet" of sky and display it as an image, you'd get something like this:

Now you want that "sheet of sky" to be repeatable, so you cut the sheet of sky by using a torus:

I'm trying to remove the distortion that appears in the resulting image:

Because clearly the portion from the inner side of the donut is "thinner" than the outer side of the donut.

So I need to map the surface of a torus to a unit square. I'm not sure how to say this correctly but the mapping must be such that each tiny square $dS$ on the unit square must map to something non-square on the surface of the torus.

For a start, I looked at trying a mapping from u, v to spherical coordinates..

$$\theta = 2 \cos^{-1} \sqrt{1-\zeta_x} \\ \phi = 2\pi\zeta_y$$

But that didn't seem to lead to a solution.

-
Why so complicated? As given in the top-rated answer to the linked question, you can embed a torus in 4D space with no distortion at all. Is there some reason that you want 3D space specifically? –  Lopsy Feb 10 '12 at 23:58
Because I'm interested in the problem –  bobobobo Feb 11 '12 at 1:24