Code:
function coords2grid($coords, $radius = 5, $shrink) {
$grid = newgrid();
$points = newgrid();
for ($c = 0; $c < count($coords); $c++) {
$cx = round($coords[$c]['x']);
$cy = round($coords[$c]['y']);
if ($points[$cx][$cy] == 1) { continue; }
$points[$cx][$cy] = 1;
$rx = $radius;
$ry = 0;
$rerr = $radius;
...
After testing i see that cords must be 2 points after digit becouse they will not show on map in the right place. So rounding them like that puts them on the map in bad spot. Also result coords MUST be 2 points after digit (2 points precision must be used everywere). Atl77 can u make changes to your script?
Another thing is that after calculation every point has height = 1, but height must be calculated also becouse the result is like this: