capsule_sdf — 3D sdf_csg op

데이터 종류: coordgridsdf

호출: import fullseye as fs; fs.ledger.capsule_sdf(grid, a, b, radius)(구현을 직접 호출하려면 import sdf_ops; sdf_ops.capsule_sdf(grid, a, b, radius), 원장에서 가져오려면 ops3d.get("capsule_sdf"))

사용법

> 이 연산자의 설명은 아직 번역이 없습니다. 원문을 그대로 싣습니다.

線分 `ab を半径 radius` で太らせたカプセルの厳密な符号付き距離場。

`sdf(p) = ‖p - (a + clamp(((p-a)·(b-a))/‖b-a‖², 0, 1)·(b-a))‖ - radius`。

線分への最短距離そのものなので全空間で勾配ノルム 1(円柱と違い端が丸いぶん、

角が無く厳密)。リブ・配管・骨・ワイヤ・工具の掃引体積の近似に向く。

引数と検証(`ValueError`):

• `grid: 最終軸が 3 の float 配列 (..., 3)`。

• `a / b: 芯線の端点(要素数 3)。a == b なら球(sphere_sdf` と一致)。

• `radius`: 太さ(負は拒否)。

返り値: `grid.shape[:-1]` の float64。

使いどころ: 工具の到達性を「工具の掃引体積が部品と交わらないか」で見るとき、工具を

カプセルで置いて `sdf_intersect` の最小値が正かを見る。骨梁・血管・繊維の合成にも。

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

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

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

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

procedural_handpy -3.11 examples_3d/procedural_hand.py

sdf_csgpy -3.11 examples_3d/sdf_csg.py

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

sdf_to_occupancy · fuse_to_voxel · integrate · extract_surface_points · query_distance · sdf_union · sdf_intersect · sdf_subtract

같은 카테고리(sdf_csg)

grid_coords · sphere_sdf · box_sdf · plane_sdf · cylinder_sdf · torus_sdf · sdf_union · sdf_intersect


*Provenance: sdf_ops.py — 3D 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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