Question: An ordered set of three points uniquely defines a circular arc, and I'd like to be able to draw that arc in TikZ. I know about the `arc` drawing command, which does the job given a radius, two angles, and one endpoint, but in order to do that I would have to calculate the radius and the angles from the other two points on the arc. I suppose I could whip up some code to do that automatically using the PGF math library, but is there a better way? Or has anyone else already made this into a package/library I could reuse?

Answer: 
Keep in mind that I don't actually know TikZ. I did what you said: I used pgf math to work out the values for the angles and the radius and then packaged it up into a simple macro.

```
\documentclass[border=10]{standalone}
\usepackage{tikz}
\def\drawcirculararc(#1,#2)(#3,#4)(#5,#6){%
        \pgfmathsetmacro\cA{(#1*#1+#2*#2-#3*#3-#4*#4)/2}%
        \pgfmathsetmacro\cB{(#1*#1+#2*#2-#5*#5-#6*#6)/2}%
        \pgfmathsetmacro\cy{(\cB*(#1-#3)-\cA*(#1-#5))/%
                            ((#2-#6)*(#1-#3)-(#2-#4)*(#1-#5))}%
        \pgfmathsetmacro\cx{(\cA-\cy*(#2-#4))/(#1-#3)}%
        \pgfmathsetmacro\cr{sqrt((#1-\cx)*(#1-\cx)+(#2-\cy)*(#2-\cy))}%
        \pgfmathsetmacro\cA{atan2(#1-\cx,#2-\cy)}%
        \pgfmathsetmacro\cB{atan2(#5-\cx,#6-\cy)}%
        \pgfmathparse{\cB<\cA}%
        \ifnum\pgfmathresult=1
                \pgfmathsetmacro\cB{\cB+360}%
        \fi
        \draw (#1,#2) arc (\cA:\cB:\cr);%
}
\begin{document}
\begin{tikzpicture}
\drawcirculararc(0,0)(1,0)(1,1);
\end{tikzpicture}
\end{document}

```

It isn't terribly hard to work out the origin and the radius using  

*r*2 = (*x**i* - *x*)2 + (*y**i* - y)2  

for *i* in {1,2,3}.

The macro assumes that the points are entered counterclockwise. It probably fails in some cases, since I didn't test it very extensively.

I guess I should point out that that the computation of the center of the circle, (`\cx`,`\cy`) depends on some quantities not being zero. One can write down three linear equations relating `\cx` and `\cy`. Any two of them suffice for solving (of course) the system so there are three possible choices. I didn't check, but I believe it's impossible for the relevant quantities to all be zero (unless your points are colinear, but then you don't have a circle).

If one were so inclined, one could generalize the computation of `\cx` and `\cy` depending on which two equations are used and then just pick one for which the denominators are not zero. Since there's a better solution, I didn't bother, but I guess I could if someone actually cares.

[![enter image description here](https://i.stack.imgur.com/TNf9Ss.png)](https://i.stack.imgur.com/TNf9Ss.png)
Here a code with the last version 4.25. I don't completely agree with Qrrbrbirlbel's statement: With

> 
> tkz-euclide or similar solutions that uses a separated path (which
> makes it impossible to use the arc as part of a path;
> 
> 
> 

This is only partially true. There is nothing to prevent you from using `tkz-euclide` in order to get the center of the arc, to calculate the radius OA and the start and end angles. Then you can draw what you want with `TikZ` if necessary!

```
\documentclass{standalone}
\usepackage{tkz-euclide}

\begin{document}
\begin{tikzpicture}
\tkzDefPoint(1,2){A}\tkzDefPoint(3,4){B} \tkzDefPoint(2,4){C}
\tkzDefTriangleCenter[circum](A,B,C)   \tkzGetPoint{O}
\tkzDrawArc[delta=0](O,A)(C)
\tkzFillSector[green!10](O,A)(C)
\tkzDrawSector(O,A)(C)
\tkzDrawPoints(O,A,B,C)
\end{tikzpicture}
\begin{tikzpicture}
\tkzDefPoint(1,2){A}\tkzDefPoint(3,4){B} \tkzDefPoint(2,4){C}
\tkzDefTriangleCenter[circum](A,B,C)   \tkzGetPoint{O}
\tkzDrawArc[delta=0](O,C)(A)
\tkzFillSector[red!10](O,C)(A)
\tkzDrawSector(O,C)(A)
\tkzDrawPoints(O,A,B,C)
\end{tikzpicture}
\end{document}

```

[![enter image description here](https://i.stack.imgur.com/OAILh.png)](https://i.stack.imgur.com/OAILh.png)