画一个带有枢轴和两个盘子的天平

画一个带有枢轴和两个盘子的天平

我将画一个带有一个枢轴(三角形)和两个盘子(横条T)的天平,如下图所示。然而,我只能画出三角形,然后这个帖子

如何绘制具有一定角度的斜线?
如何以直角绘制平底锅及其上方的文字?

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}

\tikzset{
  pivot/.style={
    draw, 
    regular polygon, 
    regular polygon sides = 3, 
    fill = red, 
    node distance = 1cm, 
    minimum height = 2em
  }
}

\begin{document}
\begin{tikzpicture}
  \node () [pivot] {};
\end{tikzpicture}
\end{document}

平衡

答案1

快速而肮脏:

代码输出

\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}

\tikzset{
  pivot/.style={
    draw, 
    regular polygon, 
    regular polygon sides = 3, 
    fill = red, 
    node distance = 1cm, 
    minimum height = 2em,
    at = {(0,0)}
  }
}

\begin{document}
\begin{tikzpicture}
  \node [pivot] (a) {};

  \begin{scope}[rotate around={5:(a.corner 1)}]
   \draw (a.corner 1) -| ++(-3cm,5mm) node[transform shape,above] (t1) {Text 1};
   \draw (a.corner 1) -| ++(3cm,5mm) node[transform shape,above] (t2) {Text 2};
   \draw (t1.south east) -- (t1.south west);
   \draw (t2.south east) -- (t2.south west);
  \end{scope}
\end{tikzpicture}
\end{document}

相关内容