Question:

How to find circular curve that contains all cordinates?

by  |  earlier

0 LIKES UnLike

I have few coordinates (x,y - cartesian coordinates). I have to get x,y and radius of circle that include all those coordinates with lowest possible radius of that circle. Is there some ready algoritms?

 Tags:

   Report

1 ANSWERS


  1. Here is an idea, but it's more or less visual.  First of all, how many coordinates do you have?  If you have two points, then there are many possible circles, but it should be obvious that the circle whose center is the midpoint of the line connecting the two points is the smallest possible circle.  Draw it and you'll see why.

    If you have three points, there should only be one possible circle that fits, and more than three, there is not necessarily a fitting circle (if there is, you can throw one out for your analysis). To find the circle for three points, think about this rule: if you draw a circle with a diameter line, then draw lines from each end of the diameter to any single point on the rest of the circle to form a triangle, then the angle where the lines meet will always be 90 degrees.  It's one of the circle theoroms.  hard to explain in words but easy to draw.  So if you have three points  along a circle, imagine that one of them is at the end of the diameter line, and the other two are somewhere on the circle, one on one half of the circle, and the other on the other half.  All we need to do is find the diameter line, right?  Well, draw a line from one point to another and construct another line perpendicular at that point.  That has to intercept the other endpoint of the diameter line according to that theorom, right?  Then draw a line from the same initial point to the third point and draw its perpendicular at that point as well.  That has to also intercept the diagonal line.  Where the two perpendicular lines intercept, that is the other endpoint of the diameter line extending from the first point.  Now that you have both endpoints of the diameter line, you can find its midpoint and length and radius.  

    Also, it seems like there was some theorem about the perpendicular bisectors of a triangle meet at the center of the circle the triangle is inscribed in?  Same thing as above, you can find the circle center that way if my memory of that rule is correct.

    To do that mathematically rather than graphically, you will have to "construct" those lines using the point slope formulas, and find the intercept of the lines by combining the two line equations to find when they are equal.  Would that be the algorithm you are looking for?

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.