center

write a c++ program to find the centre of a circle passing through 3 given points

Ex.
Input:
(0,1),(0,-1),(1,0)

OUTPUT:
(0,0)
Last edited on
Why?
Maybe you would be satisfied with that an equation of a circle passing through points (x1,y1), (x2,y2), (x3,y3) is
1
2
3
4
| x^2 + y^2   x    y    1 |
| x1^2+y1^2   x1   y1   1 | = 0
| x2^2+y2^2   x2   y2   1 |
| x3^2+y3^2   x3   y3   1 |
Topic archived. No new replies allowed.