fit_sphere_3d — 3D geometry op

• Data kinds: points → primitive

• Call: import fullseye as fs; fs.ledger.fit_sphere_3d(points) (implementation को सीधे call करना हो तो import match3d; match3d.fit_sphere_3d(points), registry से लेना हो तो ops3d.get("fit_sphere_3d"))

उपयोग

point cloud → least squares sphere (algebraic fit)। return value (center, radius)। pipe/ball मापन के लिए।

|p|² = 2c·p + (r² − |c|²) को [2p, 1] पर linear least squares (lstsq) से हल करने वाला algebraic fit (यह geometric दूरी को न्यूनतम नहीं करता, इसलिए sphere का केवल एक भाग दिखे या noise अधिक हो तो radius पक्षपाती हो जाता है)। (N,3) में 4 से कम बिंदु हों तो ValueError। radius sqrt(max(s + |c|², 0)) है, ऋणात्मक मान 0 पर clamp होता है। बिंदु एक ही plane में या collinear हों तो lstsq का minimum-norm हल चुपचाप लौटता है (कोई सत्यापन नहीं; residual भी नहीं लौटता, इसलिए |p − c| − r से जाँचें)। geometric दूरी से परिष्कृत करना हो तो इस op के परिणाम को प्रारंभिक मान बनाकर non-linear least squares करें; outlier के लिए ransac_sphere। voxel से detection के लिए hough_sphere_3d।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• geometry_metrology — py -3.11 examples_3d/geometry_metrology.py

वे अगले ops जिनसे type जुड़ता है (primitive को 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

इसी category के (geometry)

line_from_2points · plane_from_3points · angle_3points · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line


*Provenance: match3d.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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