resample_uniform — 3D curve op

• Data kinds: points → points

• Call: import fullseye as fs; fs.ledger.resample_uniform(curve, n) (implementation को सीधे call करना हो तो import curve3d; curve3d.resample_uniform(curve, n), registry से लेना हो तो ops3d.get("resample_uniform"))

उपयोग

arc length के अनुसार समान दूरी पर n points में resample करता है (linear interpolation)। → (n,3)।

arc_length की cumulative arc length को parameter बनाकर np.linspace(0, total, n) की positions लेता है, और x, y, z को अलग-अलग np.interp से linear interpolate करता है। output float64 का (n,3) है। शुरुआती और अंतिम point input के पहले और आख़िरी point से मेल खाते हैं, बीच के points polyline पर होते हैं (ज़रूरी नहीं कि मूल points से गुज़रें)।

• n: output points की संख्या। 1 पर केवल शुरुआती 1 point, 0 पर ख़ाली (0,3)। input से ज़्यादा रखने पर भी जानकारी नहीं बढ़ती, polyline बस बारीक टुकड़ों में कटती है।

• कुल लंबाई 1e-12 से कम हो (सभी points एक जैसे) तो पहले point को n बार duplicate करके लौटाता है।

• output columns की संख्या 3 पर तय है; input (N,3) न हो तो columns कम पड़ने से विफल होता है या अतिरिक्त columns छोड़ दिए जाते हैं। कोई shape validation नहीं है।

• closed curve बंद नहीं होता (अंतिम point→पहले point का हिस्सा interpolation से बाहर है)। duplicate points होने पर भी np.interp चल जाता है, पर उस हिस्से को लंबाई 0 माना जाता है।

curvature_torsion / frenet_frame index parameter के differences लेते हैं, इसलिए असमान spacing वाले point sequence को इस op से समान spacing में बदलकर देने पर numerical differentiation स्थिर होता है। smooth interpolation चाहिए तो fit_spline_curve।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• bspline_freeform — py -3.11 examples_3d/bspline_freeform.py

वे अगले ops जिनसे type जुड़ता है (points को input के रूप में लेते हैं)

points_to_voxel · gaussians_to_voxel · estimate_point_normals · to_points · match_points_ncc · match_pca · moment_axes · icp_point2point_3d

इसी category के (curve)

curvature_torsion · frenet_frame · arc_length · fit_spline_curve


*Provenance: curve3d.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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