Para1 <- c(0, 0, 0, 10, 6, 0.325, -0.0415)
curveEPE(P=Para1, simpver=1, fig.opt=TRUE)
Para2 <- c(0, 0, pi, 10, 6, -0.325, -0.0415)
curveEPE(P=Para2, simpver=1, fig.opt=TRUE)
Para3 <- c(0, 0, 0, 10, 6, 0.325, -0.0415, 0.2)
curveEPE(P=Para3, simpver=NULL, fig.opt=TRUE)
Para4 <- c(0, 0, pi, 10, 6, -0.325, -0.0415, 0.2)
curveEPE(P=Para4, simpver=NULL, fig.opt=TRUE)
Para5 <- c(0, 0, pi/4, 10, 6, 0.325, -0.0415)
curveEPE(P=Para5, simpver=1,
fig.opt=TRUE, main="A rotated egg shape")
# There is an example that introduces a deformation function in the egg-shape equation
myfun <- function(Par, z){
x <- z[,1]
y <- z[,2]
k1 <- Par[1]
k2 <- Par[2]
y <- y - k1*(y+k2)^2
list(x=x, y=y)
}
deform.op <- curveEPE(P=Para1, np=5000, simpver=1,
fig.opt=TRUE, deform.fun=myfun, Par=c(0.05, 8))
graphics.off()
Run the code above in your browser using DataLab