# Complicated curves intertwined in the link figures (II)

This is a more advanced question following an earlier one.

I am struggled to draw these types of figures:

There is a package called the knot library.

So I am going to try the knot library out. But in case there are some useful advices, I am all ears to hear your input!!! Thank you!

So my challenges for you are that: How to draw the above figure in tikz?

• Please show the code you have so far ... – Kurt Dec 18 '18 at 3:52

This is not an attempt to precisely reproduce your picture, but just an alternative to knots. This is a way to have gaps when the left halves of the ellipse intersect with the dashed curves, and no gaps on the right halves. This way is described in the knots manual to some extent.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{decorations.markings}
\begin{document}
\tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {\arrow[arsty]{>}}},postaction={decorate}}}
\tikzset{arsty/.style={}}
\begin{tikzpicture}[>=latex]
\draw[red,very thick,dash pattern=on 1pt off 1pt,
->-/.list={0.0,0.2,0.4}] plot[smooth cycle,tension=2]
coordinates {(0,-0.2) (-1.7,-0.5) (0,-0.5) (1.7,-0.5) };
\draw[blue,very thick,dash pattern=on 1pt off 1pt,
->-/.list={0.42,0.75}] plot[smooth cycle,tension=1.8]
coordinates {(0,0) (2,-0.5) (0,-0.7) (-2,-0.5) };
\foreach \X in {-1.5,0,1.5}
{\draw[line width=1.6pt] (\X,-3.5) arc(-90:90:0.5 and 1.5);}
\draw[rounded corners=1.75cm,double=black,white,double distance=1.6pt,
line width=2.4pt] (-4,-2) rectangle (4,2);
\tikzset{arsty/.style={black,line width=1.6pt}}
\foreach \X in {-1.5,0,1.5}
{\draw[double=black,white,double distance=1.6pt,line width=2.4pt,->-=0.5]
(\X,-0.5) arc(90:270:0.5 and 1.5);}
\end{tikzpicture}
\end{document}