Skip to content
Snippets Groups Projects
Commit 6bbdb5de authored by Davis, Duane T's avatar Davis, Duane T
Browse files

Merge remote-tracking branch 'origin/master'

parents 00b9a48f b8a9d0eb
No related branches found
No related tags found
No related merge requests found
......@@ -561,19 +561,19 @@ def compute_circle(pt1, pt2, pt3):
x3y3Sqr = pt3[0] * pt3[0] + pt3[1] * pt3[1]
try:
centerX = determinant3x3(x1y1Sqr, pt1[1], 1.0, \
x2y2Sqr, pt2[1], 1.0, \
x3y3Sqr, pt3[1], 1.0) / \
(2.0 * determinant3x3(pt1[0], pt1[1], 1.0, \
pt2[1], pt2[1], 1.0, \
pt3[1], pt3[1], 1.0))
centerY = determinant3x3(pt1[0], x1y1Sqr, 1.0, \
pt2[0], x2y2Sqr, 1.0, \
pt3[0], x3y3Sqr, 1.0) / \
(2.0 * determinant3x3(pt1[0], pt1[1], 1.0, \
pt2[0], pt2[1], 1.0, \
pt3[0], pt3[1], 1.0))
radius = distance((centerX, centerY), pt1)
centerX = determinant3x3(((x1y1Sqr, pt1[1], 1.0), \
(x2y2Sqr, pt2[1], 1.0), \
(x3y3Sqr, pt3[1], 1.0))) / \
(2.0 * determinant3x3(((pt1[0], pt1[1], 1.0), \
(pt2[1], pt2[1], 1.0), \
(pt3[1], pt3[1], 1.0))))
centerY = determinant3x3(((pt1[0], x1y1Sqr, 1.0), \
(pt2[0], x2y2Sqr, 1.0), \
(pt3[0], x3y3Sqr, 1.0))) / \
(2.0 * determinant3x3(((pt1[0], pt1[1], 1.0), \
(pt2[0], pt2[1], 1.0), \
(pt3[0], pt3[1], 1.0))))
radius = cartesian_distance((centerX, centerY), pt1)
return ( ( centerX, centerY ), radius )
except: # probably division by zero--means the points are colinear
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment