# rbdr: Simulation of Boolean Model of Deterministic Rectangles In lacunaritycovariance: Gliding Box Lacunarity and Other Metrics for 2D Random Closed Sets

 rbdr R Documentation

## Simulation of Boolean Model of Deterministic Rectangles

### Description

Functions for simulating a Boolean model with grains that are deterministic rectangles. A Boolean model is a two stage model, first the locations (called germs) of grains are randomly distributed according to a Poisson point process, then a random grain is placed on each germ independently. An introduction can be found in (Chiu et al., 2013). Also described in this help file are functions for calculating the coverage probability and covariance.

### Usage

```rbdr(lambda, grain, win, seed = NULL)

bdrcoverageprob(lambda, grain)

bdrcovar(lambda, grain, xy)
```

### Arguments

 `lambda` Intensity of the germ process (which is a Poisson point process) `grain` Rectangle object specifying the grain `win` The window to simulate in (an `owin` object) `seed` Optional input (default in NULL). Is an integer passed to `set.seed`. Used to reproduce patterns exactly. `xy` A raster object that specifies the pixel coordinates of the desired covariance image. `xy` works in similar fashion to passing an image or pixel mask through the `xy` argument of `as.mask` in spatstat.

### Value

Depends on the function used (see Functions section).

### Functions

• `rbdr`: Returns an `owin` that is a set generated by simulating a Boolean model with a specified intensity and fixed rectangular grain. The window information is not contained in this object. If the simulated set is empty then an empty `owin` object is returned. The point process of germs is generated using spatstat's `rpoispp`.

• `bdrcoverageprob`: Returns the true coverage probability given the intensity and grain.

• `bdrcovar`: Returns an image of the covariance as calculated from disc radius and intensity.

### WARNING

The returned object of `rbdr` is only the foreground of a binary map and thus can have much smaller extent than the simulation window (e.g. when the simulated set is empty).

### References

Chiu, S.N., Stoyan, D., Kendall, W.S. and Mecke, J. (2013) Stochastic Geometry and Its Applications, 3rd ed. Chichester, United Kingdom: John Wiley & Sons.

### Examples

```grain <- owin(xrange = c(-5, 5), yrange = c(-5, 5))
win <- owin(xrange = c(0, 100), c(0, 100))
lambda <- 4.2064E-3
xi <- rbdr(lambda, grain, win)

cp_theoretical <- bdrcoverageprob(lambda, grain)
xy <- as.mask(dilationAny(win, win), eps = c(1, 1))
cvc_theoretical <- bdrcovar(lambda, grain, xy)
```

lacunaritycovariance documentation built on March 18, 2022, 5:20 p.m.