UVa 190

From Algorithmist
Jump to navigation Jump to search

190 - Circle Through Three Points[edit]

Summary[edit]

Given three non-colinear points, determine the equation of the circle that passes through all three points.

Implementations[edit]

See also UVa 438.

Input[edit]

7.0 -5.0 -1.0 1.0 0.0 -6.0
1.0 7.0 8.0 6.0 7.0 -2.0

Output[edit]

(x - 3.000)^2 + (y + 2.000)^2 = 5.000^2
x^2 + y^2 - 6.000x + 4.000y - 12.000 = 0

(x - 3.921)^2 + (y - 2.447)^2 = 5.409^2
x^2 + y^2 - 7.842x - 4.895y - 7.895 = 0

Solutions[edit]