min_enclosing_sphere — 3D bounds op

Data kinds: pointsprimitive

Call: import fullseye as fs; fs.ledger.min_enclosing_sphere(points, refine_iters: 'int' = 1000) -> 'Dict[str, object]' (to call the implementation directly, import hull3d; hull3d.min_enclosing_sphere(points, refine_iters: 'int' = 1000) -> 'Dict[str, object]'; from the registry, ops3d.get("min_enclosing_sphere"))

Usage

Point set (N,3) → the (approximate) minimum enclosing sphere containing every point, {center(3), radius}.

> The detailed description below is the original text — the summary and the headings are translated.

`fit_sphere_3d(球面フィット)や ransac_sphere / hough_sphere_3d`(球検出)とは

異なり、全点を内包する最小の球(minimum enclosing ball, MEB)を解く。2 段構成で

「全点内包」を厳守しつつ半径を詰める:

1. Ritter (1990) 初期化 — 最遠の点対を粗く取り初期球にし、各点を走査して球外の点が

あれば「その点と既存球の両方を含む」最小の球へ 1 回膨らませる(膨張式

`new_r=(r+d)/2 / 中心を点方向へ (d-r)/(2d)` 進める)。新球が旧球を完全に含むため、

1 パスで全点内包を保証する。

2. Bădoiu–Clarkson (2003) core-set 反復による精緻化 — 反復 `i で最遠点 q` へ

中心を `1/(i+2)` だけ寄せる。真の最小包含球へ単調収束する(半径過大な Ritter の

ドリフトを詰める)。最後に半径を「中心からの最大距離」で確定するので、精緻化後も

必ず全点を内包(近似ゆえ半径が過小になり点が漏れることはない、安全側)。

精緻化した中心が Ritter より外接半径を縮められたときのみ採用する(常に Ritter 以下)。

真の最小球(厳密解は Welzl の乱択線形時間法)ではなく高速な (1+ε) 近似。

Parameters

----------

points : array_like (N,3)

入力点群(>= 1 点)。

refine_iters : int

Bădoiu–Clarkson 精緻化の反復数(既定 1000)。0 で Ritter のみ。

Returns

-------

dict

• `center`: (3,) float64 — 球中心(世界座標)。

• `radius`: float — 半径(全点を内包)。

Raises

------

ValueError

形状不正・非有限・点数 0、または `refine_iters` が負のとき(fail-closed)。

Background guides (the physics and conventions behind this op)

blender_interop — Blender との併用 — 形を作って fullseye で測る(軸・単位・正解データの罠)

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

Runnable examples (verified samples that actually call this op)

hull_boundspy -3.11 examples_3d/hull_bounds.py

Ops the type connects to (they accept primitive as input)

fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment

Same category (bounds)

convex_hull · aabb · obb


*Provenance: hull3d.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.