This function modifies the point pattern X by converting its
observation window Window(X) to a binary pixel image (a window
of type "mask"). It ensures that no points of X are
deleted by the discretisation.
If move.points=TRUE, the point coordinates are also discretised.
The window is first discretised using as.mask.
Next,
If move.points=TRUE, each point of X
is moved to the centre of the nearest pixel inside the
discretised window.
If move.points=FALSE (the default),
the point coordinates are unchanged.
It can happen that points of X that were inside the original
window may fall outside the new mask.
The discretise function corrects this by augmenting the mask
(so that the mask includes any pixel that contains a point of the
pattern).
The arguments eps, dimyx, xy and rule.eps
control the fineness of the pixel array. They are passed to
as.mask.
If eps, dimyx and xy are all absent or
NULL, and if the window of X is of type "mask"
to start with, then discretise(X) returns X unchanged.
See as.mask for further details
about the arguments eps, dimyx,
xy and rule.eps, and the process of converting
a window to one of type mask.