Skip to content

Implementation of the Perlin Noise algorithm to generate noise values in the range [0,1].

License

Notifications You must be signed in to change notification settings

Maharshi-Pandya/Perlin-Noise-Implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perlin Noise Implementation

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.

Results


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:

Python

NoiseMapPython

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!


C++

SFML Cpp Perlin HeightMap

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

Various Sources


About

Implementation of the Perlin Noise algorithm to generate noise values in the range [0,1].

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published