3

I'm looking for the best way (meaning simplest) to draw an arc for the interior angle of a triangle (or any other regular polygon). I'm using a triangle presently. Here's my minimal working example:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
\node[draw, minimum size=3cm,regular polygon,regular polygon sides=3] (a) {};
\draw (a.corner 1) arc  (240:300:0.5cm)node[below]{$\alpha = 120\degree$};
%\draw (a.corner 1) -- node[right]{$h$} (a.south) node[below]{$b$};
\draw (0,0) circle (1.5cm);
\end{tikzpicture}
\caption{Regular Triangle; arcs inscribed}
\label{fgr:inscribedtri}
\end{figure}
\end{document}

This is what it produces This is what it produces

This is a bit closer to what I'm looking for. This is closer to what I want

As a neophyte of tikz (and little more in LaTeX) I'm really in need of assistance). Of course, I don't what the alpha there and alpha isn't equal to 120 degrees (that is a remnant of some past stuff that isn't what I wanted). I want that arc that is terribly drawn in the top of the triangle with GIMP. I want a node below it reading "alpha = 60 degrees".

As I mentioned, my attempt is above. Is it simpler to place a vertex of the triangle at the origin and work it from there? I don't really care. Thanks.

  • If you have TikZ > v3.0.0 search for angles library in the manual – percusse Oct 30 '16 at 9:07
4

You need to define right starting point for arc.

Edit: Starting point of arc lie on line (a.corner 1) -- (a.corner 2), which cross a.corner 1 with angle of 240 degree. In this direction on distance of 1.2 cm is starting point of arc. This is calculated in ($(a.corner 1)+(240:1.2)$):

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{angles, calc, quotes, shapes.geometric}
\usepackage{siunitx}

\begin{document}
    \begin{figure}
\centering
\begin{tikzpicture}
\node[draw, minimum size=3cm,regular polygon,regular polygon sides=3] (a) {};
\draw (0,0) circle (1.5cm);
%
\draw ($(a.corner 1)+(240:1.2)$) % arc start point
      arc (240:300:1.2)
      node[midway,below] {$\alpha = \SI{120}{\degree}$};
\end{tikzpicture}
  \hfil
\begin{tikzpicture}[% with library angles
   angle radius = 12mm,
my angle/.style = {draw,
                   angle eccentricity=1.3,
                   font=\large} % angle label position!
                        ]
\node (a) [draw, minimum size=3cm,
           regular polygon, regular polygon sides=3] {};
\draw (0,0) circle (1.5cm);
%
\coordinate (A) at (a.corner 1);
\coordinate (B) at (a.corner 2);
\coordinate (C) at (a.corner 3);
%
\path   pic [my angle, "$\alpha = \SI{120}{\degree}$"] {angle = B--A--C};

\end{tikzpicture}
\caption{Regular Triangle; arcs inscribed}
\label{fgr:inscribedtri}
    \end{figure}
\end{document}

enter image description here

Edit: image on the right side is drawn by help of tikz library angles and quotes.

  • Thank you much. Can you explain to me why, for the left triangle, the beginning coordinates for the arc are enclosed in '$' \draw ($(a.corner 1)+(240:1.2)$)? – Andrew Falanga Oct 31 '16 at 1:24
  • As I said, you need to define starting point of arc it lie on line (a.corner 1) -- (a.corner 2), which cross a.corner 1` at angle 240 degree. In this direction on distance 1.2 cm is starting point of starting point. This is calculated in ($(a.corner 1)+(240:1.2)$). – Zarko Oct 31 '16 at 1:30
  • You need to pint @AndrewFalanga if the conversation involves more than one person other than the answerer. So I got pinged but AF won't have. – cfr Oct 31 '16 at 2:56
  • Good to know. For future. – Zarko Oct 31 '16 at 9:51
  • @AndrewFalanga, for the case if you not notice my last comment: starting point of arc lie on line (a.corner 1) -- (a.corner 2), which cross a.corner 1 with angle of 240 degree. In this direction on distance 1.2 cm is starting point of arc. This is calculated in ($(a.corner 1)+(240:1.2)$). I will add this to the answer. – Zarko Oct 31 '16 at 9:56

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.