data(BPoirier)
BP <- BPoirier
plot(BP$poly1$x, BP$poly1$y)
# a single polygon triangulation
tri1 <- triangulate(BP$poly1)
plot(swin(BP$rect, tri1))
# a single polygon with a hole
tri2 <- triangulate(c(-10,-10,120,100), BP$poly1)
plot(swin(c(-10,-10,120,100), tri2))
Run the code above in your browser using DataLab