## ------------------------------------------------
## Method `Edge2$new`
## ------------------------------------------------
edge <- Edge2$new(c(1, 1), c(2, 3))
edge
edge$A
edge$A <- c(1, 0)
edge
## ------------------------------------------------
## Method `Edge2$print`
## ------------------------------------------------
Edge2$new(c(2, 0), c(3, -1))
## ------------------------------------------------
## Method `Edge2$plot`
## ------------------------------------------------
library(tessellation)
centricSquare <- rbind(
c(-1, 1), c(1, 1), c(1, -1), c(-1, -1), c(0, 0)
)
d <- delaunay(centricSquare)
v <- voronoi(d)
cell5 <- v[[5]] # the cell of the point (0, 0), at the center
isBoundedCell(cell5) # TRUE
plot(centricSquare, type = "n")
invisible(lapply(cell5[["cell"]], function(edge) edge$plot()))
Run the code above in your browser using DataLab