resample_uniform — 3D curve op

• 資料種類:points → points

• 呼叫: import fullseye as fs; fs.ledger.resample_uniform(curve, n)(要直接呼叫實作,import curve3d; curve3d.resample_uniform(curve, n);從台帳取用則 ops3d.get("resample_uniform"))

用法

按弧長等間隔重取樣為 n 點(線性插值)。→ (n,3)。

以 arc_length 的累積弧長為參數,取 np.linspace(0, total, n) 的位置並用 np.interp 對 x、y、z 獨立線性內插。輸出為 float64 的 (n,3)。起點和終點與輸入的首尾一致,中間點落在折線上(不一定經過原始點)。

• n:輸出點數。1 時僅起點 1 點,0 時為空的 (0,3)。多於輸入也不會增加資訊, 只是把折線切得更細。

• 總長小於 1e-12(全部點重合)時,將首點複製 n 次回傳。

• 輸出行數固定為 3,輸入不是 (N,3) 時會因行數不足而失敗,或多餘的行被捨棄。沒有形狀檢驗。

• 封閉曲線不會封閉(終點→起點的區間不在內插範圍內)。即使有重複點 np.interp 也能通過,但該區間以長度 0 處理。

curvature_torsion / frenet_frame 是 index 參數的差分,因此間距不均勻的點列用本 op 等間距化後再傳入,數值微分會更穩定。需要平滑內插時用 fit_spline_curve。

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• bspline_freeform — py -3.11 examples_3d/bspline_freeform.py

型別可銜接的下一個運算子(可接受 points 作為輸入)

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

同類別(curve)

curvature_torsion · frenet_frame · arc_length · fit_spline_curve


*Provenance: curve3d.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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