resampleCurve: Resample a curve equidistantly

Description Usage Arguments Value Examples

View source: R/pointsOnOutline.r

Description

Resample a curve equidistantly (optionally with smoothing)

Usage

1
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

1
2
3
data(nose)
x <- shortnose.lm[c(304:323),]
xsample <- resampleCurve(x,n=50)

Morpho documentation built on Sept. 9, 2021, 9:07 a.m.