bezier: Bezier curves

Description Usage Arguments Details Value See Also Examples

Description

Find the quadratic and cubic Bezier curve for the given points

Usage

1
2
3
qbezier(x, y, t)

cbezier(x, y, t)

Arguments

x

a vector of x values

y

a vector of y values

t

a vector of t values for which the curve will be computed

Details

qbezier finds the quadratic Bezier curve for the given three points and cbezier finds the cubic Bezier curve for the given four points. The curve will be computed at all values in the vector t and a list of x and y values returned.

Value

a list composed of an x-vector and a y-vector

See Also

Other interp: bilinear, cubicspline, linterp, nn, polyinterp, pwiselinterp

Examples

1
2
3
4
5
6
7
x <- c(1, 2, 3)
y <- c(2, 3, 5)
f <- qbezier(x, y, seq(0, 1, 1/100))

x <- c(-1, 1, 0, -2)
y <- c(-2, 2, -1, -1)
f <- cbezier(x, y, seq(0, 1, 1/100))


Search within the cmna package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.