Make a spatial region composed of discs with given centres and radii.
discs(centres, radii = marks(centres)/2, ...,
separate = FALSE, mask = FALSE, trim = TRUE,
delta = NULL, npoly=NULL)
If separate=FALSE
, a window (object of class "owin"
).
If separate=TRUE
, a list of windows.
This command is typically applied to a marked point pattern
dataset X
in which the marks represent the sizes of objects.
The result is a spatial region representing the space occupied by
the objects.
If the marks of X
represent the diameters of circular objects,
then the result of discs(X)
is a spatial region constructed by taking discs, of the specified
diameters, centred at the points of X
, and forming the union
of these discs. If the marks of X
represent the areas of
objects, one could take discs(X, sqrt(marks(X)/pi))
to produce discs of equivalent area.
A fast algorithm is used to compute the result as a binary mask, when
mask=TRUE
. This option is recommended unless polygons are
really necessary.
If mask=FALSE
, the discs will be constructed as polygons
by the function disc
. To avoid computational problems,
by default, the discs will all be constructed using
the same physical tolerance value delta
passed to disc
. The default is such that the smallest
disc will be approximated by a 16-sided polygon.
(The argument npoly
should not normally be used, to avoid
computational problems arising with small radii.)
disc
,
union.owin
plot(discs(anemones, mask=TRUE, eps=0.5))
Run the code above in your browser using DataLab