stroke_resample_closed — PRINTPATH stroke op

• 数据种类:pairs → pairs

• 调用: import fullseye as fs; fs.ledger.stroke_resample_closed(points, n_points, allow_shortening=False)(要直接调用实现,import printpath; printpath.stroke_resample_closed(points, n_points, allow_shortening=False);从台账取用则 opsprintpath.get("stroke_resample_closed"))

用法

把闭合的线按等弧长重新采样。→ pairs

传给傅里叶之前的一段。★参数化方式不同,系数就会改变(实测最大 47 倍),所以这里明确规定为按弧长等间隔。弧长间隔在机器精度内恒定(实测 cv 1e-14)。

★但重新采样会使线变短:连接样本与样本的是弦,所以在折点处会把角切掉。实测(300 个顶点的巡回路径):样本 4000 时长度 99.1 %,1024 时 96.9 %, 300(与顶点数相同)时 89.3 %,100 时 72.8 %,50 时 57.7 %。长度一变, 浓淡的再现也会被破坏,所以少于输入顶点数的样本默认拒绝 (若是有意为之则 allow_shortening=True)。

详细使用指南

• printpath 族使用指南

参考(示例数据、文献)

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

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

• 算法的正典(作者、年份)与用途见上面的族使用指南。

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

• poc_one_stroke_epicycles — py -3.11 examples/poc_one_stroke_epicycles.py

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

stipple_energy · stroke_tour_closed · mst_length · stroke_tone_error · mosaic_tiles_render

同类别(stroke)

stipple_points_from_image · stipple_energy · stroke_tour_closed · mst_length · stroke_tone_error


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

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