16
$\begingroup$

How can I visualize the standard topological "rubber-sheet" construction of a torus, that is, morphing a square into a torus?

How can I start or are there any examples in the Mathematica documentation respectively?

$\endgroup$
  • $\begingroup$ Reminded me of mathematica.stackexchange.com/questions/7545/… $\endgroup$ – Dr. belisarius Feb 18 '14 at 13:42
  • $\begingroup$ "Folding" in the origami sense will only be able to approximate a torus by faces with zero Gaussian curvature... $\endgroup$ – Yves Klett Feb 18 '14 at 14:27
  • $\begingroup$ There is a demonstration of actual folding (though into a paper airplane rather than a torus): demonstrations.wolfram.com/OrigamiPaperPlanes $\endgroup$ – bill s Feb 18 '14 at 15:18
  • $\begingroup$ @holistic since you've not claryfied the question I gave myself a freedom to reformulate it a little bit so it fits SE format and is clear now. If you dissagree feel free to revert it. $\endgroup$ – Kuba Feb 20 '14 at 8:22
38
$\begingroup$

Edit I had some time so I've added full surface torus. Old code in edit history.

  DynamicModule[{x = 2., l = 100., x2 = 2., l2 = 100., grid, fast, slow},
    Grid[{{
    Graphics3D[{
      Dynamic[Map[{Blue, Polygon[#[[{1, 2, 4, 3}]]]} &, 
                  Join @@@ (Join @@ Partition[#, {2, 2}, 1])
                 ]&[
                   ControlActive[fast[l, l2], slow[l, l2]]]
                   ]

                }, PlotRange -> {{-7, 7}, {-7, 7}, {-1, 2}}, ImageSize -> 600, 
                   Axes -> True, BaseStyle -> 18]
    ,
    Column[{
      Slider[Dynamic[x, (l = 10.^#; x = #) &], {.0001, 2.}],
      Slider[Dynamic[x2, (l2 = 10.^#; x2 = #) &], {.0001, 2.}] }]
    }}]
 ,
 Initialization :> (

 grid[l_, l2_, n_, m_] := Outer[Compose,         
   Array[RotationTransform[# Pi/l2, {0, 0, 1.}, {0, -l2, 0}] &, n, {-1, 1}],
   Array[RotationTransform[# Pi/l, {1., 0, 0}, {0, 2, l}][{0, 2, 0}] &, m, {-1, 1}], 
   1];

   fast[l_, l2_] = grid[l, l2, 10, 10];
   slow[l_, l2_] = grid[l, l2, 50, 25];
   )]

enter image description here

For < V.9 please switch Array to Table. This syntax for Array was introduced, silently, in V.9. linespace equivalent in MMA

$\endgroup$
  • 2
    $\begingroup$ This is nice +1. $\endgroup$ – RunnyKine Feb 20 '14 at 0:28
  • $\begingroup$ @RunnyKine Thanks, I've always wanted to do this :P $\endgroup$ – Kuba Feb 20 '14 at 8:18
  • $\begingroup$ @Kuba: Thank you. That's what I imagined :) $\endgroup$ – holistic Feb 20 '14 at 9:24
  • $\begingroup$ Nice animation ++1 $\endgroup$ – Junho Lee Nov 4 '14 at 8:37
  • $\begingroup$ @Kuba yeah nevermind, I found out myself, sorry. Nice stuff! really well done. $\endgroup$ – Phonon Nov 6 '14 at 13:45
6
$\begingroup$

Folding or mapping?

Mapping is simple. Say you have a rectangular piece of paper of width $a$ and height $b$, so that any point $P$ on the paper has the coordinates $(x,y)$ with $0\leq x\leq a$ and $0\leq y\leq b$ then you can simply use the same coordinates on the torus and identify $x=0$ with $x=a$ (and $y=0$ with $y=b$), respectively.

If you are thinking of the surface of a torus in 3D and you want to explicitly map a point on the paper onto the torus, you first need to parametrize the surface of the torus accordingly. If your torus is centered on $O=(0,0,0)$ with the "equatorial plane" in the $x-y$-plane, one possible parametrisation of the surface is given by $( R \cos\Phi + r \cos\Phi\cos\phi, R\sin\Phi - r \sin\Phi\cos\phi, r \sin\phi)$, where $R$ is the radius of the "centerline" and $r$ the radius of "tube".

Here, you can simply map $\Phi \leftrightarrow \frac{2\pi x}{a}$ and $\phi \leftrightarrow \frac{2\pi y}{b}$.

Now, folding (as in: building a paper model) is another story...

$\endgroup$
  • $\begingroup$ I guess I meant both :). I wanted to map any point on the square to a point on the torus because I thought this is necessary to know if I want to fold a square to a torus with mathematica. Just like it is done with a piece of paper by rolling it to a zylinder and then connecting the ends of the zylinder. $\endgroup$ – holistic Feb 18 '14 at 22:34
  • $\begingroup$ Rolling up the paper to make a zylinder is easy. Connecting the ends of the zylinder together is a problem, at least with any kind of paper I know of. Maybe someday such a cooperative material will be available at Amazon. $\endgroup$ – Ralph Dratman Jul 9 '17 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.