Jack Ritter, "An Efficient Bounding Sphere" in Graphic Gems (1990)
1. 在三維點集S中找到較遠的兩點,構成一個初始包圍球估計B0。該球可以如是求:遍歷S,求出其中x坐標最大/最小、y最大/最小及z最大/最小的3對點,然后取其中距離最大的一對,以其二點連線中點為球心C0,距離的一半為初始半徑R0
2. 然后再次遍歷S,逐一測試S中其他點是否處于B中;
3. 如果點Pk處于Bk中,則繼續測試下一個點Pk+1
4. 如果Pk不處于Bk中,則:作Bk的球心Ck與Pk的連線矢量(Ck,Pk),并反向延長至與Bk相交,交點為Qk,以連線(Qk,Pk)的中點為新的球心Ck+1,其距離的一半為新的球半徑Rk+1,構成新的包圍球Bk+1,不難發現,Bk與Bk+1相切于Qk處
5. 上述過程迭代至所有S中的P點遍歷完為止。以上近似算法可擴展到n維空間。
6. 該算法特點:快速,且包圍球幾乎最小,雖不能保證絕對最小,但絕對優于基于包圍盒算出來的解
According to Jack Ritter a near-optimal sphere can be created by:
1) Finding the minimal and maximal vertices along each axis (x,y,z).
2) For those three pairs chose the one pair which has the largest distance.
3) The center of the sphere is the midpoint between those two vertices and its radius is half the distance between them.
4) Go through all vertices again, if you find a vertex whose distance (d) is greater than the radius (r), move the sphere towards this vertex by (d-r)/2 and then set the new sphere radius to (d+r)/2.