外接球算法

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值