Helper function for binning points and densities
Run Dieckmann and Dobeli 1999

Should basically go now, but much tidying to do.