![两个气缸通过皮带连接](https://linux22.com/image/256793/%E4%B8%A4%E4%B8%AA%E6%B0%94%E7%BC%B8%E9%80%9A%E8%BF%87%E7%9A%AE%E5%B8%A6%E8%BF%9E%E6%8E%A5.png)
我想画两个圆柱体,它们周围有一条公共皮带。因此,我需要两个圆环和两个切线。我知道我的问题有一个通用的解决方案如何在圆圈内绘制一条平滑的切线?,但有两个细节我无法解决:
我希望皮带有另一种厚度(即两个循环的切线和外线)
我想沿着皮带绘制一个特定长度的矢量之间两个周期
有什么办法可以实现这两个目标吗?
答案1
稍微调整一下范围、线条粗细,并将节点放在切线的末端:
代码(灵感来自percusse 的回答)
\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{calc, arrows}
\begin{document}
\begin{tikzpicture}
\node[draw,circle,xshift=2.2cm,minimum size=25mm,outer sep=0] (bigg) {};
\node[draw,circle,minimum size=2mm,outer sep=0] (smalll) {};
\draw[thick] (tangent cs:node=smalll,point={(bigg.south)},solution=2) node (a) {} -- (tangent cs:node=bigg,point={(smalll.south)}) node (b) {};
\draw[thick] (tangent cs:node=smalll,point={(bigg.north)},solution=1) node (c) {} -- (tangent cs:node=bigg,point={(smalll.north)},solution=2) node (d) {};
\begin{scope}
\clip ($(d)+(0,0.25)$) rectangle ($(b)+(2.1,-0.25)$);
\node[draw,circle,minimum size=25mm,outer sep=0,thick] at (bigg) {};
\end{scope}
\begin{scope}
\clip ($(c)+(0,0.1)$) rectangle ($(a)+(-0.2,-0.1)$);
\node[draw,circle,minimum size=2mm,outer sep=0,thick] at (smalll) {};
\end{scope}
\draw[densely dashed, red, -latex] ($(c)!0.3!(d)$) -- ($(c)!0.7!(d)$);
\draw[ultra thick, blue, -stealth] ($(b)!0.45!(a)$) -- ($(b)!0.75!(a)$);
\end{tikzpicture}
\end{document}