3

I am going to draw a balance with a pivot (the triangle) and two pans (the T bars), as shown in the figure below. However, I was only able to draw the triangle, following this post.

How to draw the slope line with a certain angle?
How to draw the pans and the texts above them in right angles?

\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}

balance

4

Quick and dirty:

output of code

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.