Re: circumcircle
- From: Logan Shaw <lshaw-usenet@xxxxxxxxxxxxx>
- Date: Thu, 31 Jan 2008 01:07:57 -0600
bob@xxxxxxxxxxxxxx wrote:
What is the easiest way to find the circumcircle of a triangle given
the triangle's 3 points?
Well, according to http://mathworld.wolfram.com/Circumcircle.html ,
the three lines that are perpendicular to and which bisect the
triangle's sides all intersect at the center of the circumcircle.
Since you know the three points of the triangle, you can easily
find the mid-points of all the sides. And since you know the
slope of the side, you can easily find the slope of the lines
passing perpendicularly through the side. If a side has a slope
deltaX / deltaY, then the slope of a line perpendicular to it
is -deltaY / deltaX, i.e. it is the negative reciprocal. (Of
course you might choose to never do the division and merely keep
those as separate rise and run numbers.)
From there you can form an equation for each of the three lines.
Now you have a system of three linear equations which you can
solve with linear algebra to find the one point that satisfies
all three equations. Actually, you only need two of the lines,
now that I think about it, huh?
Finally, once you know the center, you can figure out the radius
using the Pythagorean Theorem.
I have no idea whether that is the easiest way, but it seems like
a pretty straightforward one that could be implemented in a fairly
efficient manner.
- Logan
.
- References:
- circumcircle
- From: bob
- circumcircle
- Prev by Date: Re: general algorithm + ackermann question
- Next by Date: Re: circumcircle
- Previous by thread: circumcircle
- Next by thread: Re: circumcircle
- Index(es):
Relevant Pages
|