Duplicated points in the point pattern X
are identified.
Each group of duplicated points is then ‘exploded’ by
randomly displacing the point locations to form a circular arrangement
around the original position.
This function is an alternative to rjitter.ppp
.
Whereas rjitter.ppp
applies independent random displacements to each data point,
rexplode.ppp
applies displacements only to the points
that are duplicated, and the displacements are mutually dependent
within each group of duplicates, to ensure that the displaced points
are visually separated from each other.
First the code ensures that the displacement radius for each
data point is less than or equal to the distance to the boundary
of the window. Then each group of duplicated points (or data points
with the same location but possibly different mark values) is
taken in turn. The first element of the group is randomly displaced
by a vector uniformly distributed in a circle of radius radius
.
The remaining elements of the group are then positioned around the
original location, at the same distance from the orginal location,
with equal angular spacing from the first point.
The result is that each group of duplicated points becomes
a circular pattern centred around the original location.