Replace randoms with coordinate hashes when working with buffers

With random the output will vary with buffer sizes, this make sure the
results are the same for every point no matter what.
Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>