Programming Perlin-like Noise (C++)