[Tex/LaTex] What’s the easiest way to draw the arc defined by three points in TikZ

tikz-pgf

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?

Best Answer

Use the following code to draw the arc corresponding to the circle through (1,2), (3,4) and (2,4) and going anticlockwise from (1,2) to (2,4).

\documentclass[a4paper]{article}
\usepackage{tkz-euclide}
\usetkzobj{all} 
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(1,2){A}\tkzDefPoint(3,4){B}\tkzDefPoint(2,4){C}
\tkzCircumCenter(A,B,C)\tkzGetPoint{O}
\tkzDrawArc(O,A)(C)
\end{tikzpicture}
\end{document}