/* sdnoise1234, Simplex noise with true analytic
* derivative in 1D to 4D.
*
* Copyright © 2003-2011, Stefan Gustavson
*
* Contact: stefan.gustavson@gmail.com
*
* This library is public domain software, released by the author
* into the public domain in February 2011. You may do anything
* you like with it. You may even remove all attributions,
* but of course I'd appreciate it if you kept my name somewhere.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
/** \file
\brief C header file for Perlin simplex noise with analytic
derivative over 1, 2, 3 and 4 dimensions.
\author Stefan Gustavson (stefan.gustavson@gmail.com)
*/
/*
* This is an implementation of Perlin "simplex noise" over one
* dimension (x), two dimensions (x,y), three dimensions (x,y,z)
* and four dimensions (x,y,z,w). The analytic derivative is
* returned, to make it possible to do lots of fun stuff like
* flow animations, curl noise, analytic antialiasing and such.
*
* Visually, this noise is exactly the same as the plain version of
* simplex noise provided in the file "snoise1234.c". It just returns
* all partial derivatives in addition to the scalar noise value.
*
*/
#include
/** 1D simplex noise with derivative.
* If the last argument is not null, the analytic derivative
* is also calculated.
*/
float sdnoise1( float x, float *dnoise_dx);
/** 2D simplex noise with derivatives.
* If the last two arguments are not null, the analytic derivative
* (the 2D gradient of the scalar noise field) is also calculated.
*/
float sdnoise2( float x, float y, float *dnoise_dx, float *dnoise_dy );
/** 3D simplex noise with derivatives.
* If the last tthree arguments are not null, the analytic derivative
* (the 3D gradient of the scalar noise field) is also calculated.
*/
float sdnoise3( float x, float y, float z,
float *dnoise_dx, float *dnoise_dy, float *dnoise_dz );
/** 4D simplex noise with derivatives.
* If the last four arguments are not null, the analytic derivative
* (the 4D gradient of the scalar noise field) is also calculated.
*/
float sdnoise4( float x, float y, float z, float w,
float *dnoise_dx, float *dnoise_dy,
float *dnoise_dz, float *dnoise_dw);