Bitmap/Bézier curves/Cubic: Difference between revisions

Mispelled some variable names in R code
(Added R code)
(Mispelled some variable names in R code)
Line 318:
for (t in seq(0, 1, length.out=n))
{
b <- bez(hullxx, hullyy, t)
outx[i] <- b$x
outy[i] <- b$y
Line 332:
outx <- 0
outy <- 0
n <- length(hullxx)-1
for (i in 0:n)
{
outx <- outx + choose(n, i)*((1-t)^(n-i))*t^i*hullxx[i+1]
outy <- outy + choose(n, i)*((1-t)^(n-i))*t^i*hullyy[i+1]
}
 
Anonymous user