结包:过境又迷路

结包:过境又迷路

基本上我和问题中的其他人有同样的问题使用 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

我不知道这是否仍然是一个相关的问题,但无论如何我还是要回答一下。很抱歉我之前没有发现这个问题(我在这里不像以前那么活跃了)。

无论如何,您的代码存在一些问题。一个是忽略了空格!这很重要。所以我已经修复了它们。

然后就是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}

结

相关内容