Can these be organized in a grid? Given your X values are multiples of 80, I'm thinking yes, but I don't know about the Ys. If you can think of this as a grid, then things become easier, as you can easily check if a grid position is already taken, and not pick that one. This is easier than arbitrarily checking pixel positions.