frenet_frame — 3D curve op

• 数据种类:points → frame

• 调用: import fullseye as fs; fs.ledger.frenet_frame(curve)(要直接调用实现,import curve3d; curve3d.frenet_frame(curve);从台账取用则 ops3d.get("frenet_frame"))

用法

各点的 Frenet 标架(切线 T,主法线 N,副法线 B)。→ (T, N, B),各为 (Npts,3) 单位向量。

将有序点列 (N,3) 以 index 参数用 np.gradient(内部为中心差分,两端为单侧差分)求导得到 r', r'',

• T = r' / ‖r'‖

• N = (r'' − (r''·T) T) / ‖…‖(r'' 的 T 正交分量 = 指向曲率中心的方向)

• B = T × N

在各点计算上述量。r'' 的 T 正交分量的方向对重新参数化不变,因此只要点间距平滑变化,用 index 参数也能得到正确方向。

• 分母只加上绝对值 1e-12,无法完全归一化的位置不会成为单位长度。在直线区间(r'' ∥ T 或 0)中 N、B 几乎为零向量,在拐点前后 N 的方向会反转。"单位向量"的保证在那里不成立。

• N<2 的点列会由 np.gradient 抛出 ValueError。除此之外没有形状校验。

• 两端 2 点为单侧差分,精度下降。先进行等间距化(resample_uniform)或平滑(fit_spline_curve)会更稳定。

曲率、挠率的数值本身用 curvature_torsion,弧长用 arc_length。

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

可运行的示例(实际调用该算子并已验证的样例)

• space_curve — py -3.11 examples_3d/space_curve.py

• torus_knot_curve — py -3.11 examples_3d/torus_knot_curve.py

类型可衔接的下一个算子(可接受 frame 作为输入)

fuse_to_voxel

同类别(curve)

curvature_torsion · arc_length · resample_uniform · fit_spline_curve


*Provenance: curve3d.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

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