Last chance! 50% off unlimited learning
Sale ends in
w <- owin()
w <- owin(c(0,1), c(0,1))
# the unit square
w <- owin(c(0,1), c(0,2))
plot(w)
# plots edges of a box 1 unit x 2 units
v <- locator()
# click on points in the plot window
# to be the vertices of a polygon
# traversed in anticlockwise order
u <- owin(c(0,1), c(0,2), poly=v)
plot(u)
# plots polygonal boundary using polygon()
plot(as.mask(u, eps=0.02))
# plots discrete pixel approximation to polygon
Run the code above in your browser using DataLab