# Work out center of a partial circle

If I have a small section of a circle, inside a square. I know the height and the width of the square and therefore the width and height of the arc, what would be the quickest (not necessarily the most accurate) way of approximating the circles centre?

In my head it seems sensible to take plot points along the circle of a defined unit. work out the vector between the 2 plot points, then another for the next 2, work out the angle using the dot product. And then "complete the circle" using this information, this would give us an approx circumference which we can use to calculate center point...

trouble is a.) im not sure if this is right b.) I don't actually know half the maths to do it.

Any help or better solutions is much appreciated!  Very easy.

You take one unit of length that can fit two times in the area inside the box.

You make two segments (easy with compass).

You then build the line that goes through the middle of each segment (straightforward with a compass as well).

The two lines will intersect at the center of the circle.

• Useful to note that this is basically finding the circumcenter (intersection of perpendicular bisectors) of the triangle formed by the two segments. – Hao Ye Aug 8 '14 at 15:13
• @HaoYe, thank you for the word, I am doing this in computer code so the formulas are more useful to me :) Martigan, sorry I could't translate your answer into code, I should have been more specific in my question – chrispepper1989 Aug 13 '14 at 20:28
• Ok so i'm goint to be really dumb here and ask, what is meant by "segment", a point or a vector? If I look here: mathworld.wolfram.com/Circumcenter.html, if i set A, B, C to uniform points on my arc, would that not give me an incorrect circumcentre? – chrispepper1989 Aug 13 '14 at 20:33
• You can take any three points on your arc and try to find the circumcenter of the triangle thus formed. Since the three point are on the same arc, the circumcenter will be the center of the circle that fits with the arc. My method was a geometrical way of constructing the center. It may also be easier to compute, since the length of AB and BC are the same, but perhaps not... – Martigan Aug 14 '14 at 13:20