frenet_frame — 3D curve op

• Data kinds: points → frame

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

Usage

The Frenet frame (tangent T, principal normal N, binormal B) at each point. → (T, N, B), each (Npts,3) unit vectors.

Differentiates the ordered point sequence (N,3) with np.gradient over the index parameter (internally central differences, one-sided differences at both ends) to get r', r'', and

• T = r' / ‖r'‖

• N = (r'' − (r''·T) T) / ‖…‖ (the component of r'' orthogonal to T = the direction pointing toward the centre of curvature)

• B = T × N

is computed at each point. The direction of the T-orthogonal component of r'' is invariant to reparameterisation, so as long as the point spacing changes smoothly the index parameter yields the correct direction.

• The denominator only gets an absolute 1e-12 added, so places that cannot be normalised do not come out unit length. On straight segments (r'' ∥ T or 0), N and B become almost zero vectors, and the direction of N flips across an inflection point. The "unit vector" guarantee does not hold there.

• For a sequence with N<2, np.gradient raises ValueError. There is no other shape validation.

• The 2 points at both ends use one-sided differences, so accuracy drops. Applying equal spacing (resample_uniform) or smoothing (fit_spline_curve) first makes it stable.

For the curvature and torsion values themselves use curvature_torsion; for arc length, 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_curve — py -3.11 examples_3d/space_curve.py

• torus_knot_curve — py -3.11 examples_3d/torus_knot_curve.py

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

fuse_to_voxel

Same category (curve)

curvature_torsion · 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.