# simulate Boolean Model with R

I am complete Newbie on programming with R, especially with the library spatstat. And so i hope that anyone can help me.

I want to simulate a Boolean Model. In my case, this is a Poisson-Pointprocess with closed circles with radius r around the points of the point process.

With X = rpoispp (100) I can already simulate the point process. But I have no idea how to generate the circles around the dots.

my google research was unfortunately not successful.

Thanks for help, Perry

• answered 2018-11-08 13:36

Googleing 'Boolean model spatstat' gave me this helpfile as one of the first hits. In the examples section there is an example of a Boolean model in the unit square with disc radius 0.2:

``````library(spatstat)
X <- discs(runifpoint(15) %mark% 0.2, npoly=16)
plot(X, main = "", col = "gray")
``````

Is this what you need?

Above `X` is a polygonal approximation of the union of discs. Alternatively the Boolean model is often represented simply as a marked point pattern with the disc radius as the mark. What is more convenient depends on the context.

FYI: There are several equivalent ways of attaching a (vector) of marks `m` to a point pattern `X`: `marks(X) <- m` and `X %mark% m`. Created on 2018-11-08 by the reprex package (v0.2.1)