# Calculating circumference from 2d coords

I'm trying to calculate the circumference of a circle given say three reference points from a 2d coordinates that would form an arc.

The problem is the reference points may be slightly inaccurate so i'm using three to hopefully get an exact arc.

Once I have my 3 reference points how can I calculate the circumference?

I'm attaching an image so you may better understand what I'm trying to do.

http://i47.tinypic.com/2j2vpzq.jpg

 Also, the reason I'm doing it this way is that the image is a scan and top or side of the circle may be chopped off so getting the diameter may not always be possible and the size of the circle differs from time to time.

Thanks,

Craig

-

## 2 Answers

It is very easy. You have 3 points $A, B, C$. The center of circle is a point, which has the same distance from these 3 points (it is an intersection of normals (axes) of $AB$ and $BC$). Once you have a center, the radius is distance between center and $A$, $B$ or $C$. When you have a radius, you can calculate the circumference $=2\pi r$.

In other words, you must find a circumcenter of triangle - http://blog.ivank.net/basic-geometry-functions.html

-

Cool, that's exactly what I was looking for on the link. Thank you. – Craig Stewart Sep 6 '12 at 9:17

Basically you're trying to calculate the radius of the circle circumscribed about the triangle $ABC$. Given all the coordinates of those points, you can calculate the length of each side $a,b,c$ of the triangle and its surface $S$ (by the Heron's formula for instance) and then use the $R = \dfrac{abc}{4S}$ identity.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 11, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9220086336135864, "perplexity_flag": "head"}