Improved Perlin Noise Generation algorithm as designed by Ken Perlin is implemented here.
Perlin Noise function can be defined for any number of dimensions.
However, in this implementation, the max dimension in which the noise value can be generated is 3-dimensions.
To go through the algorithm to generate noise values for any given input co-ordinate, refer the ALGODETAILS.md
file.
The cpp-test/
directory contains the code to test the Perlin Noise algorithm. It uses SFML library to generate a "Noise Map" where the color of individual pixels is determined by the noise
function which is implemented in C.
Here's the result:
The Python visualisation is in the terminal itself.
It dynamically renders the characters based on the noise value at that point in the terminal.
Now thats good!
It is evident from the above generated "Noise Maps" that Perlin Noise generates "smooth" random values.
- To run the above cpp-test, make sure that
SFML
is installed locally on your machine
$ cd cpp-test
$ make all
With this, the PerlinNoise
binary will be generated in bin/
$ cd bin/
$ ./PerlinNoise
- To run the Terminal visualisation in C++
$ cd cpp-test/
$ g++ pn_test_terminal.cpp -o PerlinTerm
$ ./PerlinTerm