option ignore endpoint intersections
is what you need.
第一版代码:
\documentclass[tikz,border=1cm]{standalone}
\usetikzlibrary{knots}
\begin{document}
\begin{tikzpicture}
\begin{knot}[
consider self intersections,
ignore endpoint intersections=false,
draft mode=crossings,
]
\strand[ultra thick]
(0,0) to[out=45,in=135] (0.707,0)
arc(405:135:1)
to[out=45,in=135] (0,0)
to[out=-45,in=225] (0.707,0)
arc(-45:225:1)
to[out=-45,in=225] (0,0);
\end{knot}
\end{tikzpicture}
\end{document}
但是问题出现在由于起点恰为knots
点,似乎因为识别精度等问题出现了大量重合的交点,难以指定\flipcrossings
的序号。和八省联考题还有差异。
第二版代码(权宜之计):经过近乎痛苦仔细地分辨,我们想要修改的左侧节点对应的的编号应为8,9,10,11
,于是可以不优雅地加上\flipcrossings{8,9,10,11}
\documentclass[tikz,border=1cm]{standalone}
\usetikzlibrary{knots}
\begin{document}
\begin{tikzpicture}
\begin{knot}[
consider self intersections,
ignore endpoint intersections=false,
]
\strand[ultra thick]
(0,0) to[out=45,in=135] (0.707,0)
arc(405:135:1)
to[out=45,in=135] (0,0)
to[out=-45,in=225] (0.707,0)
arc(-45:225:1)
to[out=-45,in=225] (0,0);
\flipcrossings{8,9,10,11}%ugly here
\end{knot}
\end{tikzpicture}
\end{document}
可以得到B选项...
另外你的八省联考卷pdf扫描质量堪忧,补图
Anyway...应该是有更优雅地无需指定是哪几个重叠intersections的方法,蹲一下论坛的其他朋友
问 knots 包纽结画图求助