已知平面三点坐标A(x1, y1).B(x2, y2).C(x3, y3),三点定圆也就是三角形的中垂线交点, //平面三点定位算法 function locate(x1, y1, x2, y2, x3, y3) { var a, b; a = (y2 - y1) / (x2 - x1); b = y1 - a * x1; var xMiddle = (x1 + x2) / 2; var yMiddle = (y1 + y2) / 2; var c, lastX, lastY; if (a !=…