[Tex/LaTex] How to draw an equilateral triangle with TikZ

tikz-pgf

I'm trying to draw a little picture with TikZ. It should show an equilateral triangle with length 1 and circles with radius 1/2 on each corner of the triangle. Next, the intersections of the circles should be highlighted with a dot. This is what I tried so far:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{intersections}

\begin{document}
    \begin{tikzpicture}[scale=1.5]
    \coordinate (a) at (0,0);
    \coordinate (b) at (1,0);
    \coordinate (c) at (0.5,0.866);

    \draw[dashed] (a)--(b)--(c)--(a);
    \draw[name path=circleA] (a) circle (0.5);
    \draw[name path=circleB] (b) circle (0.5);
    \draw[name path=circleC] (c) circle (0.5);

    \fill (0.5,0) circle (1pt);
    \path [name intersections={of=circleA and circleC,name=AC}];
    \fill (AC-1) circle (1pt);
    \path[name intersections={of=circleB and circleC,name=BC}];
    \fill (BC-1) circle (1pt);
    \end{tikzpicture}
\end{document}

enter image description here

As one can see, the intersections aren't placed exactly where they should be, because the triangle isn't perfectly equilateral. How can I do that?

Best Answer

Intersection computations rely on numerically sensitive mechanisms and it does not always give you the precision you are looking for especially if tangents are in question (they get very close and might trigger and early/late true signal). But since the problem is relatively easy geometrically you can get away with many options. Here is another one

\documentclass[tikz]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
  \draw[dashed](0,0) coordinate (a)--+(1,0) coordinate (b)--+(60:1) coordinate (c) --cycle;
  \foreach\x[remember=\x as \lastx (initially c)] in{a,b,c}{
    \node[fill,circle,inner sep=1pt] at($(\x)!0.5!(\lastx)$)  (\x-\lastx) {};
    \draw (\x)circle (0.5);
  }
\end{tikzpicture}
\end{document}

enter image description here