Learn R Programming

Momocs (version 1.2.9)

bezier: Calculates Bezier coefficients from a shape

Description

Calculates Bezier coefficients from a shape

Usage

bezier(coo, n)

Arguments

coo

a matrix or a list of (x; y) coordinates

n

the degree, by default the number of coordinates.

Value

a list with components:

  • $J matrix of Bezier coefficients

  • $B matrix of Bezier vertices.

References

Claude, J. (2008) Morphometrics with R, Use R! series, Springer 316 pp.

See Also

Other bezier functions: bezier_i

Examples

Run this code
# NOT RUN {
set.seed(34)
x <- coo_sample(efourier_shape(), 5)
plot(x, ylim=c(-3, 3), asp=1, type='b', pch=20)
b <- bezier(x)
bi <- bezier_i(b$B)
lines(bi, col='red')
# }

Run the code above in your browser using DataLab