3
$\begingroup$

I have to do some homework questions that require me to draw graphs on a torus. My drawing skills suck, so I wondered if there is a program which allows you to do something like this easily?

$\endgroup$
2
  • 1
    $\begingroup$ Are you familiar with the torus as a quotient of a square? It might be harder to interpret, but lacking such software, something you might fall back on. $\endgroup$
    – pjs36
    Commented Jan 24, 2017 at 3:56
  • $\begingroup$ @pjs36 nope, I am not :( $\endgroup$
    – bzm3r
    Commented Jan 24, 2017 at 3:57

2 Answers 2

9
$\begingroup$

Some tips:

  • Instead of drawing on a torus, it's enough to draw on a topologically equivalent shape (e.g. a surface of a regular 3D object with a hole, like a mug where the hole is between the mug and its handle).

    a mug is a torus

  • To help your imagination, just cut out a piece of paper and make (cut out) a hole in it, and draw your graph on it (and be aware you can go over the edge to the other side).

    two sides of a disk with a hole

  • You could try to draw your graph on a plane with a bridge (like a regular real-life bridge): there are two places where the bridge starts and ends and you can go over the bridge without crossing the edges underneath it.

    bridge

  • You could try to draw your graph on a simplified net of a torus, in particular two disks with holes (remember the outer and inner edges of the disks will be glued together).

    simplified net

  • The best approach in my opinion would be to use just a normal rectangle with edges glued together (you glue together the horizontal edges and then also the vertical edges), it is a special case of simplified net of a torus. It means, that when you go over the edge, you come back from the other side (although mind your orientations, on the other side you "reappear" exactly at the same position you reached the first side).

    rectangle glued

All the above pictures were created with Inkscape. You can find sources here (download raw and open in Inkscape): 1, 2, 3, 4, 5.

I hope this helps $\ddot\smile$

$\endgroup$
2
$\begingroup$

Draw your graph in a unit square, then map it to a torus. For example, in Maple:

with(plots):
tmap:= (x,y) -> [cos(x)*(2.5+cos(y)),sin(x)*(2.5+cos(y)), sin(y)]:
Torus:=plot3d(tmap(x,y),x=0..2*Pi,y=0..2*Pi,style=patchnogrid):
Pts:= [seq([cos(2*Pi*i/5),1/2+sin(2*Pi*i/5)],i=0..4)]:
display(Torus, spacecurve(
  [seq(seq(tmap(Pts[i][1]*(1-t)+Pts[j][1]*t, 
    Pts[i][2]*(1-t)+Pts[j][2]*t),i=1..j-11),j=2..5)],
  t=0..1,colour=black),scaling=constrained,axes=none);

enter image description here

EDIT: Here's one way to draw the complete graph on 5 vertices without crossing on the torus (it can't be done in the plane). I'll do it step by step. Note that my "tmap" function maps the plane to the torus with period $2\pi$ in the $x$ and $y$ directions. First, here are the vertices.

Pts:= [[2*Pi/3,5*Pi/3],[2*Pi/2,5*Pi/3],[4*Pi/3,5*Pi/3],[2*Pi/2,4*Pi/2],[2*Pi/2,7*Pi/3]];

The edges joining all pairs except points $1$ and $3$ and points $2$ and $5$ go by straight lines in the plane. The edge from $1$ to $3$ and the edge from $2$ to $5$ will "wrap around", horizontally and vertically respectively. In the representation on the plane that means we go from $1$ to a version of $3$ displaced to the left by $2\pi$, and from $2$ to a version of $5$ displaced down by $2\pi$.

Pairs:= [seq(seq([Pts[i],
   piecewise(i=1 and j=3, Pts[j]-[2*Pi,0],
             i=2 and j=5, Pts[j]-[0,2*Pi], Pts[j])],
        i=1..j-1),j=2..5)];

And now we plot the curves together with a torus. I'll revolve the viewpoint to show the whole thing.

display(Torus, spacecurve([seq(tmap(P[1][1]*(1-t)+P[2][1]*t,
 P[1][2]*(1-t)+P[2[2]*t),P=Pairs)],t=0..1,
colour=black),scaling=constrained,axes=none,
lightmodel=light3, viewpoint = circleleft);

enter image description here

$\endgroup$
1
  • $\begingroup$ Ah, but I specifically have to draw graphs without crossing! So, some of these graphs might not be able to be drawn on the plane without crossing, but can be drawn on a torus with crossing. Thus, is it a simple question of mapping 2D graphs onto a torus? $\endgroup$
    – bzm3r
    Commented Jan 24, 2017 at 4:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .