I have found a function (kudos to Barry Rowlingson) on this mailing list that makes a circle. I have modified it to fit my needs. You can convert the points into a polygon. You should be able to clip your rectangle with that.
circle <- function(x = x, y = y, r = radius, n = n.faces){ t <- seq(from = 0, to = 2 * pi, length = n + 1)[-1] t <- cbind(x = x + r * sin(t), y = y+ r * cos(t)) t <- rbind(t, t[1,]) return(t) } HTH, Roman On Thu, May 27, 2010 at 12:00 PM, Quets Jan <jan.qu...@ua.ac.be> wrote: > > Hi, > > I want to make a rectangular window with circular holes within. > I have tried and searched but not found a solution yet. > > Can anybody help? > > > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-Geo mailing list > R-sig-Geo@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-geo > -- In God we trust, all others bring data. [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo