关闭

外接球算法

401人阅读 评论(0) 收藏 举报

Circumsphere

DOWNLOAD Mathematica Notebook

A sphere circumscribed in a given solid. Its radius is called the circumradius. By analogy with the equation of the circumcircle, the equation for the circumsphere of the tetrahedron with polygon vertices (x_i,y_i,z_i) for i=1, ..., 4 is

 |x^2+y^2+z^2 x y z 1; x_1^2+y_1^2+z_1^2 x_1 y_1 z_1 1; x_2^2+y_2^2+z_2^2 x_2 y_2 z_2 1; x_3^2+y_3^2+z_3^2 x_3 y_3 z_3 1; x_4^2+y_4^2+z_4^2 x_4 y_4 z_4 1|=0.
(1)

Expanding the determinant,

 a(x^2+y^2+z^2)-(D_xx+D_yy+D_zz)+c=0,
(2)

where

 a=|x_1 y_1 z_1 1; x_2 y_2 z_2 1; x_3 y_3 z_3 1; x_4 y_4 z_4 1|,
(3)

D_x is the determinant obtained from the matrix

 D=[x_1^2+y_1^2+z_1^2 x_1 y_1 z_1 1; x_2^2+y_2^2+z_2^2 x_2 y_2 z_2 1; x_3^2+y_3^2+z_3^2 x_3 y_3 z_3 1; x_4^2+y_4^2+z_4^2 x_4 y_4 z_4 1]
(4)

by discarding the x_i column (and taking a plus sign) and similarly for D_y (this time taking the minus sign) and D_z (again taking the plus sign)

D_x = +|x_1^2+y_1^2+z_1^2 y_1 z_1 1; x_2^2+y_2^2+z_2^2 y_2 z_2 1; x_3^2+y_3^2+z_3^2 y_3 z_3 1; x_4^2+y_4^2+z_4^2 y_4 z_4 1|
(5)
D_y = -|x_1^2+y_1^2+z_1^2 x_1 z_1 1; x_2^2+y_2^2+z_2^2 x_2 z_2 1; x_3^2+y_3^2+z_3^2 x_3 z_3 1; x_4^2+y_4^2+z_4^2 x_4 z_4 1|
(6)
D_z = +|x_1^2+y_1^2+z_1^2 x_1 y_1 1; x_2^2+y_2^2+z_2^2 x_2 y_2 1; x_3^2+y_3^2+z_3^2 x_3 y_3 1; x_4^2+y_4^2+z_4^2 x_4 y_4 1|
(7)

and c is given by

 c=|x_1^2+y_1^2+z_1^2 x_1 y_1 z_1; x_2^2+y_2^2+z_2^2 x_2 y_2 z_2; x_3^2+y_3^2+z_3^2 x_3 y_3 z_3; x_4^2+y_4^2+z_4^2 x_4 y_4 z_4|.
(8)

Completing the square gives

 a(x-(D_x)/(2a))^2+a(y-(D_y)/(2a))^2+a(z-(D_z)/(2a))^2-(D_x^2+D_y^2+D_z^2)/(4a)+c=0
(9)

which is a sphere of the form

 (x-x_0)^2+(y-y_0)^2+(z-z_0)^2=r^2,
(10)

with circumcenter

x_0 = (D_x)/(2a)
(11)
y_0 = (D_y)/(2a)
(12)
z_0 = (D_z)/(2a)
(13)

and circumradius

 r=(sqrt(D_x^2+D_y^2+D_z^2-4ac))/(2|a|).
(14)
Circumsphere
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:14013次
    • 积分:260
    • 等级:
    • 排名:千里之外
    • 原创:11篇
    • 转载:5篇
    • 译文:0篇
    • 评论:9条
    最新评论