curvature_torsion — 3D curve op

Data kinds: pointspairs

Call: import fullseye as fs; fs.ledger.curvature_torsion(curve) (to call the implementation directly, import curve3d; curve3d.curvature_torsion(curve); from the registry, ops3d.get("curvature_torsion"))

Return value through the ledger: fullseye.ledger.curvature_torsion(...) returns **only the declared out type pairs** (the underlying function also returns auxiliary values). When you need what was dropped, use fullseye.ledger.curvature_torsion.raw(...) or call curve3d.curvature_torsion directly.

• Underlying return: (kappa,tau) → (N,2) pairs

Usage

The curvature κ and torsion τ at each point (a reparameterisation-invariant closed form). → (kappa (N,), tau (N,)).

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

座標の一様スケール s に対し κ→κ/s, τ→τ/s と正しくスケールする。0 割り防止の epsilon は

相対化する: 絶対 1e-12 は cross_norm²(~s⁴)・r1_norm³(~s³)を小座標スケールで支配し、

κ/τ を破壊するため、代表スケール L=median‖r'‖(座標スケール s に線形)で各分母と同次元に

正規化した相対 eps を使う。これは曲線を L で正規化してから計算し 1/L で戻すのと厳密に等価。

計算は順序付き点列 (N,3) を index パラメータで `np.gradient` 3 回(中心差分、両端は

片側差分)した r', r'', r''' から

• κ = ‖r'×r''‖ / ‖r'‖³

• τ = (r'×r'')·r''' / ‖r'×r''‖²

で求める。単位は κ・τ とも 1/座標単位。τ の符号は右手系の螺旋

(a cosθ, a sinθ, bθ), b>0 で正。直線区間(‖r'×r''‖≈0)では κ≈0、τ は分母が eps だけに

なるため値は信頼できない。

• `ValueError`: 全点が重なり median‖r'‖ が 0 または非有限のとき。

• 点間隔が急に変わる箇所は数値微分が乱れるので、先に `resample_uniform` で等間隔化

するか `fit_spline_curve` で平滑化してから渡す。両端 2 点は片側差分で精度が落ちる。

• N<2 は `np.gradientValueError`。形状 (N,3) の検証はしていない。

標構(T,N,B)が要るなら `frenet_frame、弧長 ds は arc_length` から取る。

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)

space_curvepy -3.11 examples_3d/space_curve.py

torus_knot_curvepy -3.11 examples_3d/torus_knot_curve.py

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

fuse_to_voxel

Same category (curve)

frenet_frame · arc_length · resample_uniform · fit_spline_curve


*Provenance: curve3d.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.