fit_sphere_3d — 3D geometry op

• 데이터 종류: points → primitive

• 호출: import fullseye as fs; fs.ledger.fit_sphere_3d(points)(구현을 직접 호출하려면 import match3d; match3d.fit_sphere_3d(points), 원장에서 가져오려면 ops3d.get("fit_sphere_3d"))

사용법

점군 → 최소제곱 구(대수 적합). 반환값 (center, radius). 배관/볼 계측용.

|p|² = 2c·p + (r² − |c|²)를 [2p, 1]의 선형 최소제곱(lstsq)으로 푸는 대수적 피팅(기하 거리의 최소화가 아니므로, 구의 일부만 보이거나 잡음이 크면 반지름이 치우친다). (N,3)에서 4점 미만은 ValueError. radius는 sqrt(max(s + |c|², 0))이며 음수는 0으로 clamp. 점이 동일 평면상이거나 공선이면 lstsq의 최소 노름 해가 조용히 반환된다(검증은 없다. 잔차도 반환하지 않으므로 |p − c| − r로 확인한다). 기하 거리로 다듬으려면 이 op의 결과를 초깃값으로 하여 비선형 최소제곱, 이상값에는 ransac_sphere. voxel로부터의 검출은 hough_sphere_3d.

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

• geometry_metrology — py -3.11 examples_3d/geometry_metrology.py

타입이 이어지는 다음 연산자(primitive 를 입력으로 받는 것)

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

같은 카테고리(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 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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