美文网首页
三点确定圆心半径

三点确定圆心半径

作者: 落炜 | 来源:发表于2018-11-19 20:11 被阅读0次

    有圆上三点为(x1,y1),(x2,y2),(x3,y3)

    示意图
    设圆的公式如下:
    Ax^{2}+Ay^{2}+Bx+Cy+D=0
    系数由如下行列式求得:

    A=\begin{vmatrix} x_{1}& y_{1} & 1\\ x2& y2& 1\\ x3& y3& 1 \end{vmatrix}
    =x_{1}(y2-y3)-y_{1}(x2-x3)+x2x3-x3x2

    B=-\begin{vmatrix} x_{1}^{2}+y_{1}^{2}& y_{1} & 1\\ x_{2}^{2}+y_{2}^{2}& y_{2}& 1\\ x_{3}^{2}+y_{3}^{2}& y_{3}& 1 \end{vmatrix}
    = (x_{1}^{2}+y_{1}^{2})(y_{3}-y_{2})+ (x_{2}^{2}+y_{2}^{2})(y_{1}-y_{3})+(x_{3}^{2}+y_{3}^{2})(y_{2}-y_{1})

    C=\begin{vmatrix} x_{1}^{2}+y_{1}^{2}& x_{1} & 1\\ x_{2}^{2}+y_{2}^{2}& x_{2}& 1\\ x_{3}^{2}+y_{3}^{2}& x_{3}& 1 \end{vmatrix}
    =(x_{1}^{2}+y_{1}^{2})(x_{2}-x_{3})+ (x_{2}^{2}+y_{2}^{2})(x_{3}-x_{1})+(x_{3}^{2}+y_{3}^{2})(x_{1}-x_{2})

    D=-\begin{vmatrix} x_{1}^{2}+y_{1}^{2}& x_{1} & y_{1}\\ x_{2}^{2}+y_{2}^{2}& x_{2}& y_{2}\\ x_{3}^{2}+y_{3}^{2}& x_{3}& y_{3} \end{vmatrix}
    =(x_{1}^{2}+y_{1}^{2})(x_{3}y_{2}-x_{2}y_{3})+ (x_{2}^{2}+y_{2}^{2})(x_{1}y_{3}-x_{3}y_{1})+(x_{3}^{2}+y_{3}^{2})(x_{2}y_{1}-x_{1}y_{2})

    将圆方程化为标准方程:
    (x-(-\frac{B}{2A}))^{2}+(y-(-\frac{C}{2A}))^{2} = (\sqrt{\frac{B^{2}+C^{2}-4AD}{4A^{2}}})^{2}
    将上述系数代入即可解得圆心(x,y)和半径R
    x=-\frac{B}{2A}

    y=-\frac{C}{2A}

    r=\sqrt{\frac{B^{2}+C^{2}-4AD}{4A^{2}}}

    相关文章

      网友评论

          本文标题:三点确定圆心半径

          本文链接:https://www.haomeiwen.com/subject/jabafqtx.html