找回密码
 欢迎注册
楼主: markfang2050

[原创] 包覆三点的最小球体体积与表面积

[复制链接]
发表于 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
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2019-5-20 16:12:50 | 显示全部楼层
本帖最后由 markfang2050 于 2019-5-20 16:58 编辑
mathe 发表于 2019-5-19 20:23
3个点是很简单的。由于3点必然共面,我们只要先在这个平面上求出包含三点的最小的圆,然后以圆心为球心,圆 ...


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

点评

三点确定一个平面  发表于 2019-5-20 16:36
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-5-20 17:35:01 | 显示全部楼层
kastin 发表于 2019-5-20 15:59
按照论文中的算法,还可以用matlab计算高维空间n个点的最小包围球。
比如100个高斯分布的4维点:
randn(' ...


100个四维点,Mathematica也可以
  1. pts = RandomReal[1, {100, 4}];
  2. ans = BoundingRegion[pts, "MinBall"]
复制代码


除此之外,bounding的图形除了最小的球,还可以是其他很多种类型,这个MATLAB有么,
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

点评

enen,说明Mathematica在这方面 已经花了不少时间了~  发表于 2019-5-20 22:14
只要有算法,一样可以实现,只是我暂时没那个需求。  发表于 2019-5-20 20:05
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-4-20 12:12 , Processed in 0.054199 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表