外接圆半径r,圆心(x,y)
x=((y2-y1)*(y3*y3-y1*y1+x3*x3-x1*x1)-(y3-y1)*(y2*y2-y1*y1+x2*x2-x1*x1))/(2*(x3-x1)*(y2-y1)-2*((x2-x1)*(y3-y1)));
y=((x2-x1)*(x3*x3-x1*x1+y3*y3-y1*y1)-(x3-x1)*(x2*x2-x1*x1+y2*y2-y1*y1))/(2*(y3-y1)*(x2-x1)-2*((y2-y1)*(x3-x1)));
求半径可以根据正弦定理:2r=a/sinA=b/sinB=c/sinC
AC*AB = cosA*|AC|*|AB| sinA=sqrt(1-cosA*cosA) AC*AB = (x3-x1)*(x2-x1)+(y3-y1)*(y2-y1)
或
r=sqrt((x-x1)*(x-x1)+(y-y1)*(y-y1));