问题描述
是否可以从表面上的 3 个点找到球心及其半径?
Is it possible to find he center of sphere and its radius from 3 points on the surface ?
我正在为一个分段的大脑结构建立一个模型,如果三个点都在结构内;头部、尾部和中部.
I'm building a model for a segmented brain structure were the three points would be within the structure; head, tail and middle.
谢谢,
推荐答案
表示球心与三个给定点等距并与它们共面(假设三个给定点在一个大圆上).
Express that the center of the sphere is equidistant to the three given points and coplanar with them (assuming that the three given points are on a great circle).
(X - Xa)² + (Y - Ya)² + (Z - Za)² = R²
(X - Xb)² + (Y - Yb)² + (Z - Zb)² = R²
(X - Xc)² + (Y - Yc)² + (Z - Zc)² = R²
|X Y Z 1|
|Xa Ya Za 1|
|Xb Yb Zb 1| = 0
|Xc Yc Zc 1|
从第二个和第三个方程中减去第一个方程,就可以去掉二次项.
Subtracting the first equation from the second and the third, you get rid of the quadratic terms.
(2X - Xb - Xa)(Xb - Xa) + (2Y - Yb - Ya)(Yb - Ya) + (2Z - Zb - Za)(Zb - Za) = 0
(2X - Xc - Xa)(Xc - Xa) + (2Y - Yc - Ya)(Yc - Ya) + (2Z - Zc - Za)(Zc - Za) = 0
现在你有一个简单的线性系统,包含 3 个未知数的 3 个方程.
Now you have an easy linear system of 3 equations in 3 unknowns.
为简洁起见,您可以将三点翻译成Xa=Ya=Za=0
,并且方程简化为
For conciseness you can translate the three points so that Xa=Ya=Za=0
, and the equations simplify as
|X Y Z |
|Xb Yb Zb| = 0
|Xc Yc Zc|
(2X - Xb) Xb + (2Y - Yb) Yb + (2Z - Zb) Zb = 0
(2X - Xc) Xc + (2Y - Yc) Yc + (2Z - Zc) Zc = 0
或
(Yb Zc - Yc Zb) X + (Zb Xc - Zc Xb) Y + (Xb Yc - Xc Yb) Z = 0
2 Xb X + 2 Yb Y + 2 Zb Z = Xb² + Yb² + Zb²
2 Xc X + 2 Yc Y + 2 Zc Z = Xc² + Yc² + Zc²
那么,R² = X² + Y² + Z²
,别忘了翻译回来.
Then, R² = X² + Y² + Z²
, and don't forget to translate back.
这篇关于球体中心点和表面上 3 个点的半径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!