# NOT RUN {
nx<-20; ny<-4; #try also nx<-40; ny<-10 or nx<-1000; ny<-10;
set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny),runif(ny))
oldpar <- par(no.readonly = TRUE)
plotDeltri(Xp,Yp,xlab="",ylab="",main="X points and Delaunay Triangulation of Y points")
P<-c(.6,.4)
plotDeltri(P,Yp,xlab="",ylab="",main="X points and Delaunay Triangulation of Y points")
plotDeltri(Xp,Yp,xlab="",ylab="")
plotDeltri(Xp,Yp[1:3,],xlab="",ylab="")
plotDeltri(Xp,rbind(Yp,Yp),xlab="",ylab="")
dat.fr<-data.frame(a=Xp)
plotDeltri(dat.fr,Yp,xlab="",ylab="")
dat.fr<-data.frame(a=Yp)
plotDeltri(Xp,dat.fr,xlab="",ylab="")
par(oldpar)
# }
Run the code above in your browser using DataLab