Computes 2-Dimensional Simplex noise.
One can use this to generate Minecraft-like terrain, for example.
323334353637383940
return 3 * t2 - 2 * t2 * t; } }; final Random rand = new Random(); SimplexNoise2 noise = new SimplexNoise2(width, height, 6, rand, interp); Noise2PngGenerator.gen(noise, width, height); }
float t2 = t * t; return 3 * t2 - 2 * t2 * t; } }; SimplexNoiseLazy2 noise = new SimplexNoiseLazy2(new FastRand().randLong(), 6, 4, interp); Noise2PngGenerator.gen(noise, width, height); }