kastin 发表于 2019-5-20 15:59:54

按照论文中的算法,还可以用matlab计算高维空间n个点的最小包围球。
比如100个高斯分布的4维点:
randn('seed',0)   % 冻结随机
X=randn(100,4);% 每行为点的坐标
算出结果为球心坐标:
[-0.204135020376063   0.182882581036639   0.737148630026378-0.357547446084886]
球半径:3.692630302448822
相对精度:4.23391e-016

markfang2050 发表于 2019-5-20 16:12:50

本帖最后由 markfang2050 于 2019-5-20 16:58 编辑

mathe 发表于 2019-5-19 20:23
3个点是很简单的。由于3点必然共面,我们只要先在这个平面上求出包含三点的最小的圆,然后以圆心为球心,圆 ...

三点不一定共球面,可以在球内。

wayne 发表于 2019-5-20 17:35:01

kastin 发表于 2019-5-20 15:59
按照论文中的算法,还可以用matlab计算高维空间n个点的最小包围球。
比如100个高斯分布的4维点:
randn(' ...

100个四维点,Mathematica也可以
pts = RandomReal;
ans = BoundingRegion

除此之外,bounding的图形除了最小的球,还可以是其他很多种类型,这个MATLAB有么,:D :
Possible form specifications in 1D:
        "MinInterval"        min length interval
Possible form specifications in 2D:
        "MinRectangle"        min area axis-aligned rectangle
        "MinOrientedRectangle"        min area oriented rectangle
        "MinConvexPolygon"        min area convex polygon
        "MinDisk"        min area disk
        "FastOrientedRectangle"        fast bounding oriented rectangle
        "FastDisk"        fast bounding disk
        "FastEllipse"        fast bounding ellipse
        "FastStadium"        fast bounding stadium
Possible form specifications in 3D:
        "MinCuboid"        min volume axis-aligned cuboid
        "MinOrientedCuboid"        min volume oriented cuboid
        "MinConvexPolyhedron"        min volume convex polyhedron
        "MinBall"        min volume ball
        "FastOrientedCuboid"        fast oriented cuboid
        "FastBall"        fast ball
        "FastEllipsoid"        fast ellipsoid
        "FastCylinder"        fast cylinder
        "FastCapsule"        fast capsule
Possible form specifications in nD:
        "MinCuboid"        min measure axis-aligned cuboid
        "MinBall"        min measure ball
        "FastOrientedCuboid"        fast oriented cuboid
        "FastBall"        fast ball
        "FastEllipsoid"        fast ellipsoid
页: 1 [2]
查看完整版本: 包覆三点的最小球体体积与表面积