# problem with “crop circles” in tikz knot library

Using the knots library for tikz, I get very thin outlines of the circumferences of the clipping circles. How do I make them disappear? Here is a MWE:

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

\newcommand*\anglei{68}

\newcommand*\angleii{37}

\begin{document}
\begin{tikzpicture}
\begin{knot}%
[%
draft mode=off,%
flip crossing/.list={4,5,8,9},%
clip width=0,%
line width=1pt,%
background color=white,%
only when rendering/.style={%
draw=black,%
double distance=12pt,%
}%
]%
\end{knot}%
\end{tikzpicture}
\end{document}


-
I don't see them with SumatraPDF, but I do with Acrobat and Chrome. These are likely minor viewer artifacts; in other words, nothing to worry about. –  Paul Gessler Jul 7 '14 at 21:31
Welcome to TeX.SX. A small hint: Usage of class minimal is discouraged, please see tex.stackexchange.com/questions/42114/… –  Christian Hupfer Jul 7 '14 at 21:53

The problem is due to anti-aliasing when viewing the PDF.

There is an interaction between how one draws this particular style of knot and how the knots package flips intersections. The flipping is achieved by redrawing the upper strand but clipped to a small circle about the intersection point. The doubling effect is achieved by drawing the same line twice with different line thicknesses. So when redrawing the upper strand, it is drawn twice but clipped to the circle. However, when anti-aliasing is turned on then this clipping is not sharp but slightly blurred. This means that at the edge, the new part is made slightly transparent and blended with what is already there. Thus when the upper path is drawn, near the edge it is blurred and blended with the lower path. The blending causes the artefacts that you see.

Anti-aliasing is only used when viewing a PDF. It is not used when the PDF is printed. Therefore, these artefacts will go away when the PDF is printed.

Nevertheless, they are a bit annoying. There's an update to the knots library which is available at the TeX-SX Launchpad Page which is designed to get round this problem (tex spath3.dtx to generate the library). It's not quite perfect (partly due to the variation in the desired size of the clipping circles in your diagram), but it does get rid of the crop circles.

\documentclass{article}
%\url{http://tex.stackexchange.com/q/188447/86}
\usepackage{tikz}
\usetikzlibrary{knots}

\newcommand*\anglei{68}

\newcommand*\angleii{37}

\tikzset{
basic strand/.style={
line width=1pt,
draw=red,
double distance=12pt,
},
crossing strand/.style={
line width=1pt,
double distance=12pt,
only when rendering/.style={%
draw=\pgfinnerstrokecolor,%
line width=12pt,
double=none,
}
}
}

\begin{document}
\begin{tikzpicture}
\begin{knot}%
[%
draft mode=off,%
flip crossing/.list={4,5,8,9},%
clip width=1,%
line width=1pt,%
background colour=red,%
only when rendering/.style={%
basic strand
},%
every intersection/.style={
crossing strand
},
]%