# class RED::Noise

Noise functions class. More...

``#include <REDNoise.h>``

## Public static functions:

 static void Perlin2d ( double & oNoise, const double iPos[2] ) static void Perlin2dD ( double & oNoise, double oD[2], const double iPos[2] ) static RED_RC Perlin2dP ( double & oNoise, const double iPos[2], const int iPeriod[2] ) static void Perlin3d ( double & oNoise, const double iPos[3] ) static void Perlin3dD ( double & oNoise, double oD[3], const double iPos[3] ) static RED_RC Perlin3dP ( double & oNoise, const double iPos[3], const int iPeriod[3] ) static void Worley2d ( double & oNoise, const double iPos[2] ) static void Worley2dD ( double & oNoise, double oD[2], const double iPos[2] ) static void Worley3d ( double & oNoise, const double iPos[3] ) static void Worley3dD ( double & oNoise, double oD[3], const double iPos[3] )

## Detailed description:

Noise functions class.

This class introduces useful functions to produce 2d/3d noise.

## Functions documentation

 public static void RED::Noise::Perlin2d ( double & oNoise, const double iPos[2] )

Computes Perlin noise at the given 2d position.

Parameters:

 oNoise returned Perlin 2d noise in [-1, 1]. iPos 2d position.
 public static void RED::Noise::Perlin2dD ( double & oNoise, double oD[2], const double iPos[2] )

Computes Perlin noise at the given 2d position including derivatives.

Parameters:

 oNoise returned Perlin 2d noise in [-1, 1]. oD derivatives in x and y. iPos 2d position.
 public static RED_RC RED::Noise::Perlin2dP ( double & oNoise, const double iPos[2], const int iPeriod[2] )

Computes Perlin noise at the given 2d position and wraps the gradients around the given period.

Parameters:

 oNoise returned Perlin 2d noise in [-1, 1]. iPos 2d position. iPeriod values above this threshold will be wrapped, must be greater than 0.

Returns:

RED_OK on success, RED_BAD_PARAM if period is not greater than 0.
 public static void RED::Noise::Perlin3d ( double & oNoise, const double iPos[3] )

Computes Perlin noise at the given 3d position.

Parameters:

 oNoise returned Perlin 3d noise in [-1, 1]. iPos 3d position.
 public static void RED::Noise::Perlin3dD ( double & oNoise, double oD[3], const double iPos[3] )

Computes Perlin noise at the given 3d position including derivatives.

Parameters:

 oNoise returned Perlin 3d noise in [-1, 1]. oD derivatives in x, y and z. iPos 3d position.
 public static RED_RC RED::Noise::Perlin3dP ( double & oNoise, const double iPos[3], const int iPeriod[3] )

Computes Perlin noise at the given 3d position and wraps the gradients around the given period.

Parameters:

 oNoise returned Perlin 3d noise in [-1, 1]. iPos 3d position. iPeriod iPos above this threshold will be wrapped, must be greater than 0.

Returns:

RED_OK on success, RED_BAD_PARAM if period is not greater than 0.
 public static void RED::Noise::Worley2d ( double & oNoise, const double iPos[2] )

Computes Worley noise at the given 2d position.

Parameters:

 oNoise returned Worley 2d noise in [-1, 1]. iPos 2d position.
 public static void RED::Noise::Worley2dD ( double & oNoise, double oD[2], const double iPos[2] )

Computes Worley noise at the given 2d position including derivatives.

Parameters:

 oNoise returned Worley 2d noise in [-1, 1]. oD derivatives in x and y. iPos 2d position.
 public static void RED::Noise::Worley3d ( double & oNoise, const double iPos[3] )

Computes Worley noise at the given 2d position.

Parameters:

 oNoise returned Worley 3d noise in [-1, 1]. iPos 3d position.
 public static void RED::Noise::Worley3dD ( double & oNoise, double oD[3], const double iPos[3] )

Computes Worley noise at the given 3d position including derivatives.

Parameters:

 oNoise returned Worley 3d noise in [-1, 1]. oD derivatives in x, y and z. iPos 3d position.