1

On page 49 of these notes appears the following diagram of a triangulation of a torus:

enter image description here

Noting I work in LyX,

  1. Can anyone give code to reproduce this beautiful diagram?
  2. Where can I learn how to make such diagrams?

Added:

I would also much like code that would generate the following diagrams: enter image description here

Exterior
  • 293
  • 1
    Somehow related: http://tex.stackexchange.com/q/9116 and http://tex.stackexchange.com/q/15779. This post appears a bit off topic, as it is not clear, what you want to have, where your problems are and what you have tried. There is no research effort in this 'question' and btw most of these graphs are already around this place. Please use the search-field in the upper right. – LaRiFaRi Dec 12 '14 at 11:52
  • 1
    I'd start with the TikZ manual. You may also want to visit TeXample for inspiration. –  Dec 12 '14 at 13:19
  • You could also use Asymptote or Metapost, or any tool that generates output in a form that can be included in LaTeX - which is more or less anything. Both Asymptote and Metapost have good introductions. – Thruston Dec 13 '14 at 12:53

1 Answers1

4

Here's a starter in Metapost, showing you one way to organize a drawing with related sub-elements.

enter image description here

prologues := 3;
outputtemplate := "%j%c.eps";

beginfig(1);

picture t[], c;

z0 = origin;
z1 = 55 right rotated -5;
z2 = 60 right rotated 60;
z3 = 65 right rotated 20;

c = image(fill fullcircle scaled 3 withcolor background; draw fullcircle scaled 3;);
t1 = image(draw c shifted z1;);
t2 = image(
  draw z1--z2; 
  draw c shifted z1; 
  draw c shifted z2;
);
t3 = image(
  fill z0--z1--z2--cycle withcolor .9[red,white];
  draw z0--z1--z2--cycle;
  draw c shifted z0; 
  draw c shifted z1; 
  draw c shifted z2;
);
t4 = image(
  fill z0--z1--z2--cycle withcolor .9[red,white];
  fill z3--z1--z2--cycle withcolor .7[red,white];
  draw z0--z3 dashed withdots scaled .3 withcolor .7 white;
  draw z0--z1--z2--cycle; draw z1--z3--z2;
  draw c shifted z0; 
  draw c shifted z1; 
  draw c shifted z2;
  draw c shifted z3;
  );

for i=1 upto 4:
  draw t[i] shifted(80i-80,0);
endfor

endfig;
end.
Thruston
  • 42,268