# Construct circle with increasing accuracy and of different spatial classes
disc1 <- discpoly(c(0,0), 5, npoly=4, class = "gpc.poly")
disc2 <- discpoly(c(0,0), 5, npoly=16, class = "owin")
disc3 <- discpoly(c(0,0), 5, npoly=64, class = "Polygon")
print(disc1)
plot(disc1)
library("spatstat")
print(disc2)
plot(disc2, add=TRUE, border=2)
print(disc3)
lines(disc3, col=3)
# if one only wants to draw a circle one could just use
symbols(0,0, circles=5, inches=FALSE, add=TRUE, fg=4)
Run the code above in your browser using DataLab