An implementation of Ken Perlin's noise algorithm intended for procedural texture generation.
This project consists of an implementation of the Perlin Noise algorithm as well as some utilities to save the generated textures as images. Specifically the noise generated here is 3 dimensional, although modifying the code to account for more dimensions is fairly straightforward.
The core of the project is the PerlinNoise class where methods that can map a point (in either 2D or 3D) space to a noise value (real number between -1 and 1) can be found. Furthermore a PpmImage class is also provided to create, manipulate and store PPM images. Last but not least, in the Main class of this project examples can be found as to how that noise can then be used to create a single texture or even a sequence of frames that can be then stiched to create an animated texture.
Please feel free to improve this project. If you decide that you want to contribute here is a few things to keep in mind:
- Add JavaDoc to your methods.
- Write JUnit tests for every method that it is possible (aim for a high branch coverage/parts of code that depend on randomness can be ignored).
- Pull requests should have a short description explaining what you added/changed and why.
In any case thank you for checking out this short project :).
- The (excellent) Scratch a Pixel Blog posts about noise, in general, and Perlin Noise specifically.
- Understanding Perlin Noise by adrian's soapbox.
- The Wikipedia page on Perlin noise.
- The One Lone Coder video on "Perlin-Like" noise.
- The Coding Train series on Perlin Noise.