resampleCurve {Morpho} | R Documentation |
Resample a curve equidistantly
Description
Resample a curve equidistantly (optionally with smoothing)
Usage
resampleCurve(x, n, smooth = FALSE, smoothn = n, open = TRUE)
Arguments
x |
matrix containing coordinates |
n |
number of resulting points on the resampled curve |
smooth |
logical: if TRUE, the resulting curve will be smoothed by using bezier curves. |
smoothn |
integer: define the refinement of the bezier curve. The higher this value, the closer the final curve will be to the original. |
open |
logical: define whether it is a closed curve or not. |
Value
returns a matrix containing the resampled curve
Examples
data(nose)
x <- shortnose.lm[c(304:323),]
xsample <- resampleCurve(x,n=50)
[Package Morpho version 2.12 Index]