a <- psp(runif(10), runif(10), runif(10), runif(10), window=owin())
b <- psp(runif(10), runif(10), runif(10), runif(10), window=owin())
plot(a, col="green", main="crossing.psp")
plot(b, add=TRUE, col="blue")
P <- crossing.psp(a,b)
plot(P, add=TRUE, col="red")
Run the code above in your browser using DataLab