View source: R/pointsOnOutline.r
resampleCurve | R Documentation |
Resample a curve equidistantly (optionally with smoothing)
resampleCurve(x, n, smooth = FALSE, smoothn = n, open = TRUE)
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. |
returns a matrix containing the resampled curve
data(nose)
x <- shortnose.lm[c(304:323),]
xsample <- resampleCurve(x,n=50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.