View source: R/core-opn-bezier.R
bezier | R Documentation |
Calculates Bezier coefficients from a shape
bezier(coo, n)
coo |
a matrix or a list of (x; y) coordinates |
n |
the degree, by default the number of coordinates. |
a list with components:
$J
matrix of Bezier coefficients
$B
matrix of Bezier vertices.
Directly borrowed for Claude (2008), and also called bezier
there.
Not implemented for open outlines but may be useful for other purposes.
Claude, J. (2008) Morphometrics with R, Use R! series, Springer 316 pp.
Other bezier functions:
bezier_i()
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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.