Simplified/optimized and commentend 1D code
Add the 2D simplex noise method