5

How can I use LaTex (p.s. I use Mac OS 10.5.8 with TexShop 2.47) to draw strings with linking numbers or no linking numbers?

If any experts know any examples below, please feel free to comment. The answer needs not to completely solve everything.

Here are the three examples:

Fig. 1. No Link:

enter image description here

Fig. 2. Link = 1:

enter image description here

Fig. 3. Link = 2:

enter image description here

Fig. 4. Borromean Ring:

enter image description here

wonderich
  • 2,387

1 Answers1

9

Here is an example of using the knots library as per Gonzalo Medina's suggestion:

enter image description here

If you comment out the draft mode=crossings you can see how the crossings are numbered, and then you use flip crossing=<num> to toggle each of the intersections.

Procedure:

For the other drawing it is just a matter of first \drawing the lines (which is independent of using the knots library. Then

  1. Move the code into the knot environment,
  2. Change the \draw to a \strand,
  3. Add the option draft mode=crossings to get the crossings numbered,
  4. Use flip crossing as desired to get the crossing at the appropriate "level", and
  5. Remove the draft mode=crossings.

Note that I used a circle shape but any arbitrary shape should work.

Code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{knots}

\begin{document} \centering \begin{tikzpicture} \begin{knot}[ %draft mode=crossings , clip width=3, flip crossing=1, flip crossing=2, ] \strand [ultra thick, red ] (0,0) circle (1.0cm); \strand [ultra thick, black] (1,0) circle (1.0cm); \end{knot} \end{tikzpicture} \hspace*{0.5cm} \begin{tikzpicture} \begin{knot}[ %draft mode=crossings , clip width=3, flip crossing={2}, ] \strand [ultra thick, red ] (0,0) circle (1.0cm); \strand [ultra thick, black] (1,0) circle (1.0cm); \end{knot} \end{tikzpicture}

\begin{tikzpicture} \begin{knot}[ %draft mode=crossings , clip width=4, ] \strand [ultra thick, blue ] (0,0) circle (1.0cm); \strand [ultra thick, red ] (1,0) circle (1.0cm); \strand [ultra thick, green] (0.5,1) circle (1.0cm); \flipcrossings{1, 2, 5, 6} \end{knot} \end{tikzpicture} \end{document}

Peter Grill
  • 223,288