arc_length — 3D curve op

• 数据种类:points → measurement

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

• 经台账调用的返回值: fullseye.ledger.arc_length(...) 只返回声明的 out 类型 measurement 的值(底层函数还会返回辅助信息)。需要被丢弃的部分时,使用 fullseye.ledger.arc_length.raw(...),或直接调用 curve3d.arc_length。

• 底层返回: (cumulative, total) → 全長 float

用法

曲线的累积弧长与总长。→ (cumulative (N,), total float)。

将有序点列 curve (N,3) 按 index 顺序视为折线,对相邻点间的欧几里得距离进行累加。cumulative[0]=0,cumulative[i] = 从开头到第 i 个点的折线长度, total = cumulative[-1]。单位与坐标相同。

• 输入仅转换为 float,没有形状校验(列数不是 3 时计算也会通过)。

• N=1 时 cumulative=[0.0]、total=0.0。即使是闭曲线也不计算终点→起点的区间(需要闭合时,先把首点复制到末尾再传入)。

• 重复点(距离为 0 的区间)直接按 0 累加,因此 cumulative 单调不减但不是严格递增。

resample_uniform 以该累积弧长为参数进行线性插值。曲率的弧长积分等与 curvature_torsion 组合时所用的 ds 取自这些差分。

参考(示例数据、文献)

• 示例数据目录(下载 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

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

vol_gaussian_psf · fuse_to_voxel · fresnel_reflectance · snell_angle

同类别(curve)

curvature_torsion · frenet_frame · resample_uniform · fit_spline_curve


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

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