框架结 - 黑板框架 - 丝带

框架结 - 黑板框架 - 丝带

我正在使用 Tikz 绘制结。我想知道是否有某种方法可以绘制框架结,即当您将结想象成由丝带制成时,I 型 Reidermeister 移动会在其上引起扭曲。

编辑:这是我所拥有的。我想对丝带做同样的事情,这样你就能看到由于扭曲,绳子的厚度减小了。

\begin{tikzpicture}[use Hobby shortcut]
        \begin{knot}[
                consider self intersections=true,
                %  draft mode=crossings,
                ignore endpoint intersections=false,
                only when rendering/.style={
                %  show curve endpoints
                }
         ]
            \strand (2,0) 
                .. (2.2,1.5)
                .. (2.5,1.8)
                .. (3,1.5)
                .. (2.5,1.2)
                .. (2.2,1.5)
                .. (2,3);
        \end{knot}
    \end{tikzpicture}

答案1

尽可能多地展示一下我认为你想要的东西,并展示一种实现它的方法。这根本不是自动化的,你可以看到线条连接处的缺陷。我不确定一个人能把这个做得有多自动化,特别是如果你想要填满丝带的话。我认为我最好的建议是使用knots封装大部分图表,然后使用与下面类似的方法拼接扭曲。下面的代码也可以通过使用样式进行相当大的整理。

\documentclass{article}
%\url{https://tex.stackexchange.com/q/427160/86}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\draw[double=red,double distance=.5cm,line width=.1cm] (0,0) -- (5,0);
\begin{scope}[xshift=6cm]
\draw[double=red,double distance=.5cm,line width=.1cm] (0,-.5) .. controls +(0,2) and +(-2,0) .. (3,0) --  (5,0);
\end{scope}
\begin{scope}[yshift=-3cm]
\draw[double=red,double distance=.5cm,line width=.1cm] (2,-.5) .. controls +(0,-1) and +(0,-1) .. (0,0) .. controls +(0,2) and +(-1,0) .. (3,0) --  (5,0);
\end{scope}
\begin{scope}[yshift=-3cm,xshift=7cm]
\draw[double=red,double distance=.5cm,line width=.1cm] (-1,0) .. controls +(1,0) and +(0,.5) .. (2,-.5) .. controls +(0,-1) and +(0,-1) .. (0,0);
\draw[double=red,double distance=.5cm,line width=.1cm] (2,-.5) .. controls +(0,-1) and +(0,-1) .. (0,0) .. controls +(0,2) and +(-1,0) .. (3,0) --  (4,0);
\end{scope}
\begin{scope}[yshift=-6cm,xshift=1cm]
\draw[double=red,double distance=.5cm,line width=.1cm] (0,0) -- (2,0) arc[radius=1,start angle=90,delta angle=-270] coordinate (a);
\draw[double=red,double distance=.5cm,line width=.1cm] (a) arc[radius=1,start angle=180,delta angle=-90] -- +(3,0) arc[radius=1,start angle=90,delta angle=-270] coordinate (b);
\draw[double=red,double distance=.5cm,line width=.1cm] (b) arc[radius=1,start angle=180,delta angle=-90] -- +(3,0);
\begin{scope}[yshift=-4cm]
\draw[double=red,double distance=.5cm,line width=.1cm] (0,0) -- (2,0) arc[radius=1,start angle=90,delta angle=-180] -- +(-2,0) coordinate (a);
\draw[double=red,double distance=.5cm,line width=.1cm] (a) arc[radius=1.5,start angle=270,delta angle=-180] .. controls +(1,0) and +(-1,0) .. +(5,-1) arc[radius=1,start angle=90,delta angle=-270] coordinate (b);
\draw[double=red,double distance=.5cm,line width=.1cm] (b) arc[radius=1,start angle=180,delta angle=-90] -- +(3,0);
\begin{scope}[yshift=-3cm,]
\path[double=red,double distance=.5cm,line width=.1cm] (0,0) -- (2,0) arc[radius=1,start angle=90,delta angle=-270] coordinate (a);
\draw[double=red,double distance=.5cm,line width=.1cm] (a) arc[radius=1,start angle=180,delta angle=-90] -- +(3,0) arc[radius=1,start angle=90,delta angle=-270] coordinate (b);
\draw[double=red,double distance=.5cm,line width=.1cm] (0,0) -- (2,0) arc[radius=1,start angle=90,delta angle=-270] coordinate (a);
\draw[double=red,double distance=.5cm,line width=.1cm] (b) arc[radius=1,start angle=180,delta angle=-90] -- +(3,0);
\begin{scope}[yshift=-3cm]
\fill[red] (0,.25) -- ++(2,0) .. controls +(1,0) and +(-1,0) .. ++(2,-.5) .. controls +(1,0) and +(-1,0) .. ++(2,.5) -- ++(2,0) -- ++(0,-.5) -- ++(-2,0) .. controls +(-1,0) and +(1,0) .. ++(-2,.5) .. controls +(-1,0) and +(1,0) .. ++(-2,-.5) -- ++(-2,0);
\draw[line width=.1cm] (0,.25) -- ++(2,0) .. controls +(1,0) and +(-1,0) .. ++(2,-.5) .. controls +(1,0) and +(-1,0) .. ++(2,.5) -- ++(2,0);
\fill[white] (3,0) circle[radius=.15] (5,0) circle[radius=.15];
\draw[line width=.1cm] (0,-.25) -- ++(2,0) .. controls +(1,0) and +(-1,0) .. ++(2,.5) .. controls +(1,0) and +(-1,0) .. ++(2,-.5) -- ++(2,0);
\end{scope}
\end{scope}
\end{scope}
\end{scope}
\end{tikzpicture}
\end{document}

丝带结

(这是我碰巧手头有的一张图,我用了它在一篇关于四元数的文章中

相关内容