ノットパッケージ:交差点が再び失われる

ノットパッケージ:交差点が再び失われる

基本的に私は質問の他の人と同じ問題を抱えていますTikZ を使用して描画された小さな結び目に交差が表示されない

結び目を小さくして、線を太く(太い、または非常に太い)したいと思いました。結果は画像の左側に表示されています。右側では交差は問題なく、正しい状態です。 と を試してみましたend tolerance=1ptignore endpoint intersections=false、今のところうまくいきません。

\documentclass[12pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,decorations.shapes,decorations.markings,knots}
\begin{document}
\begin{tikzpicture}
\path (-1.2,-2.2)--(1.7,2.2);
\begin{knot}[
scale=0.8,
draft mode=crossings,
consider self intersections=true,
clip  width=1,
flip crossing=6,
flip crossing=4,
flip crossing=7,
flip crossing=2,
line width=2pt,
onlywhenrendering/.style={
    draw=white,
    double=black,
    doubledistance=6pt,
    linecap=round,
},
]
\strand
(-1,0) to[out=90,in=180,looseness=1]
(0,0.5) to[out=0,in=90,looseness=1]
(1.5,-0.5) to[out=-90,in=0,looseness=1] 
(1,-1) --
(-1,-1) to [out=180,in=180,looseness=1]
(-1,1.5) to [out=0,in=90,looseness=1]
(0.5,0.5) --(0.5,-1) to[out=-90,in=-90,looseness=2.9]
(-0.5,-1)--(-0.5,0.5) to[out=90,in=180,looseness=1]
(1,1.5)to[out=0,in=90,looseness=1]
(1.5,0.5)to[out=-90,in=0,looseness=1]
(0,-0.5) to[out=180,in=-90,looseness=1]
(-1,0)
;
\end{knot}
\draw (0,-2.4) node{$8_{17}$};
\begin{scope}[xshift=4cm]
\begin{knot}[
consider self intersections=true,
clip  width=2,
flip crossing=1,
flip crossing=3,
flip crossing=5,
flip crossing=8,
]
\strand
(-1,0) to[out=90,in=180,looseness=1]
(0,0.5) to[out=0,in=90,looseness=1]
(1.5,-0.5) to[out=-90,in=0,looseness=1] 
(1,-1.5) --
(-1,-1.5) to [out=180,in=180,looseness=1]
(-1,2) to [out=0,in=90,looseness=1]
(0.5,1) --(0.5,-1) to[out=-90,in=-90,looseness=2.9]
(-0.5,-1)--(-0.5,1) to[out=90,in=180,looseness=1]
(1,2)to[out=0,in=90,looseness=1]
(1.5,0.5)to[out=-90,in=0,looseness=1]
(0,-0.5) to[out=180,in=-90,looseness=1]
(-1,0)
;
\end{knot}
\draw (0,-2.4) node{Mirror image of $8_{17}$};
\end{scope}
\end{tikzpicture}


\end{document}

答え1

これがまだ関連性のある質問かどうかはわかりませんが、とにかく答えを述べます。以前この質問に気づかなかったことをお詫びします (以前ほどここでは活動的ではありません)。

とにかく、あなたのコードにはいくつか問題があります。1 つはスペースを無視していることです。スペースは非常に重要です。そのため、修正しました。

それから がありますline cap=round。これは結び目の開始点と終了点で奇妙な動作をしていました。これもなくなりました。

重要なのは、すべての交差点がストランドのセグメントの終点に非常に近いことです。そのため、 が必要でしたignore endpoint intersections=falseend toleranceキーは画像では違いを生まないように見えますが、交差点が非常に近いため、クリップの半径とクリップの幅を慎重に設定する必要があります。

数字を少しいじってみた結果、次のようになりました。

\documentclass[12pt]{standalone}
%\url{http://tex.stackexchange.com/q/241258/86}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,decorations.shapes,decorations.markings,knots}

\begin{document}
\begin{tikzpicture}
\path (-1.2,-2.2)--(1.7,2.2);
\begin{knot}[
scale=0.8,
%draft mode=crossings,
  consider self intersections=true,
  ignore endpoint intersections=false,
%end tolerance=1pt,
clip radius=8pt,
clip width=1,
flip crossing=6,
flip crossing=4,
flip crossing=7,
flip crossing=2,
line width=2pt,
only when rendering/.style={
  white,
  double=black,
  double distance=6pt,
},
]
\strand
(-1,0) to[out=90,in=180,looseness=1]
(0,0.5) to[out=0,in=90,looseness=1]
(1.5,-0.5) to[out=-90,in=0,looseness=1] 
(1,-1) --
(-1,-1) to [out=180,in=180,looseness=1]
(-1,1.5) to [out=0,in=90,looseness=1]
(0.5,0.5) --(0.5,-1) to[out=-90,in=-90,looseness=2.9]
(-0.5,-1)--(-0.5,0.5) to[out=90,in=180,looseness=1]
(1,1.5)to[out=0,in=90,looseness=1]
(1.5,0.5)to[out=-90,in=0,looseness=1]
(0,-0.5) to[out=180,in=-90,looseness=1]
(-1,0)
;
\end{knot}
\draw (0,-2.4) node{$8_{17}$};
\begin{scope}[xshift=4cm]
\begin{knot}[
consider self intersections=true,
clip width=2,
flip crossing=1,
flip crossing=3,
flip crossing=5,
flip crossing=8,
]
\strand
(-1,0) to[out=90,in=180,looseness=1]
(0,0.5) to[out=0,in=90,looseness=1]
(1.5,-0.5) to[out=-90,in=0,looseness=1] 
(1,-1.5) --
(-1,-1.5) to [out=180,in=180,looseness=1]
(-1,2) to [out=0,in=90,looseness=1]
(0.5,1) --(0.5,-1) to[out=-90,in=-90,looseness=2.9]
(-0.5,-1)--(-0.5,1) to[out=90,in=180,looseness=1]
(1,2)to[out=0,in=90,looseness=1]
(1.5,0.5)to[out=-90,in=0,looseness=1]
(0,-0.5) to[out=180,in=-90,looseness=1]
(-1,0)
;
\end{knot}
\draw (0,-2.4) node{Mirror image of $8_{17}$};
\end{scope}
\end{tikzpicture}


\end{document}

結び目

関連情報