c++11 implementation of perlin noise algorithm written by ken perlin in java. ref: https://cs.nyu.edu/~perlin/noise/ and some changes from https://solarianprogrammer.com/2012/07/18/perlin-noise-cpp-11/
the algorithm returns the noise value for a given 3D point, so if working in a 2D space just fix one of the 3 coordinates