# NOT RUN {
# create a grid
g <- trigrid(8, sp=TRUE)
# create random points
randPoints <- rpsphere(100,output="polar")
# the facelayer occupied by these points
randomLayer <- occupied(g, randPoints)
plot(randomLayer)
points(randPoints, col="blue", pch="+")
# }
Run the code above in your browser using DataLab