滑块机构
用导轨和箭头表示平移。

\documentclass[border=8pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[thick] (0,0)--(5,0) (0,1)--(5,1);\filldraw[fill=teal!20] (1,.1) rectangle (2.5,.9);\draw[->,orange,thick] (2.6,.5)--(4.4,.5);
\end{tikzpicture}
\end{document}