Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(bezier)
- ## BEZIER CURVES ##
- ## SPECIFY PARAMETRIC VALUES FROM 0 TO 1 FOR SAMLPING A BEZIER CURVE
- t <- seq(0, 1, length=100)
- ## BEZIER CONTROL POINTS
- p <- matrix(c(0,0,0, 1,4,3, 2,2,0, 3,0,2, 5,5,0), nrow=5, ncol=3, byrow=TRUE)
- bezier_points <- bezier(t=t, p=p[1:3, 1:2])
- plot(bezier_points, type = "l")
- > p[1:3, 1:2]
- [,1] [,2]
- [1,] 0 0
- [2,] 1 4
- [3,] 2 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement