Simplex Noise Library
Templated CPU implementation of simplex noise
view on
github

About

A C++11 implementation of simplex noise on the CPU, created for the purposes of learning and expanding.

Download

The source for this library comes in 3 separate files: a header, a implementation file for templated functions, and an implementation file for non-templated functions.

Features

Documentation

The following functions are available in the SimplexNoise API. Note that many of the noise functions are very similar, usually just adding an additional point component to the argument list, additional derivative output, or an octaves parameter.

The extended descriptions are minimized by default for ease of locating functions by name. Click the +/ or the function name to expand/shrink the description. (expand all | shrink all)

SimplexNoise class

The SimplexNoise class is the primary noise generation class. Once instantiated, it can have its noise functions called to generate noise.

Executables

Source codes and binarys for 3 executables are included in this project. They are used for testing various functions and brute-force solving noise function minimum/maximums.

test.exe

test.exe is an application to test the 1 through 4 dimensional noise functions, writing the output to a .pgm image. It has the following command line syntax:

test.exe filename width height scale dimensions octaves derivative

demo.exe

demo.exe is an application to test the generic noise_n function, writing the output to a .pgm image. It has the following command line syntax:

demo.exe filename mode norm_mode x y width height scale max_radius power dimensions octaves [x y z w ...]

solver.exe

solver.exe is an application to brute-force compute the maximum/minimum values of a noise function. It does this by selecting permutations of gradients and iterating over the points of a simplex, computing the noise function at each point.

This takes very long for the 4d case, but the minimum/maximum values will converge to a good approximation in a reasonable amount of time. Therefore, the execution can be interrupted to get a good approximate value.

solver.exe show_every threads dimensions sample_points sample_points_large