This is a method for the generic function distmap
.
It computes the distance map of the point pattern X
as a pixel image on the network.
At a pixel \(u\), the greyscale value
equals the distance from \(u\) to the
nearest point of the pattern X
(or the \(k\)-th nearest point
of X
).