Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32.Noise.Simplex🞂TSimplexNoise🞂NoiseMethod

TSimplexNoise.Noise

Evaluates smooth continuous Simplex Noise at 2D, 3D, or 4D coordinates.

Declarations ​

pascal
function Noise(const x, y: Double): Double; overload;
function Noise(const x, y, z: Double): Double; overload;
function Noise(const x, y, z, w: Double): Double; overload;
Overload Details

Overload 1 ​

pascal
function Noise(const x, y: Double): Double; overload;

Evaluates 2D Simplex Noise at spatial coordinates (x, y).

ParameterTypeDescription
xDoubleX spatial coordinate in Euclidean space.
yDoubleY spatial coordinate in Euclidean space.
TypeDescription
DoubleContinuous scalar noise value in range [-1.0, 1.0].

Overload 2 ​

pascal
function Noise(const x, y, z: Double): Double; overload;

Evaluates 3D Simplex Noise at spatial coordinates (x, y, z).

ParameterTypeDescription
xDoubleX spatial coordinate.
yDoubleY spatial coordinate.
zDoubleZ spatial coordinate (or temporal dimension).
TypeDescription
DoubleContinuous scalar noise value in range [-1.0, 1.0].

Overload 3 ​

pascal
function Noise(const x, y, z, w: Double): Double; overload;

Evaluates 4D Simplex Noise at coordinates (x, y, z, w).

ParameterTypeDescription
xDoubleX coordinate.
yDoubleY coordinate.
zDoubleZ coordinate.
wDoubleW coordinate (e.g. time or extra parameter).
TypeDescription
DoubleContinuous scalar noise value in range [-1.0, 1.0].

Description ​

The Noise method samples continuous gradient noise at the specified coordinates:

  1. 2D Noise Noise(x, y): Partitions 2D Euclidean space into equilateral triangles. Useful for planar texture generation, heightfield maps, and 2D particle drift.
  2. 3D Noise Noise(x, y, z): Partitions 3D space into tetrahedrons. Ideal for volumetric textures (such as 3D fog, marble, or cloud density) or animating 2D textures smoothly over time (z=time).
  3. 4D Noise Noise(x, y, z, w): Partitions 4D space into 5-cell hyper-simplices. Useful for animating 3D volumes over time, 4D vector fields, or multi-parameter procedural synthesis.

All variants return smooth C2 continuous scalar values normalized approximately within [−1.0,1.0].

Example ​

pascal
var
  Simplex: TSimplexNoise;
  Time: Double;
  Vx, Vy: Double;
begin
  Simplex := TSimplexNoise.Create;
  try
    Time := 1.5; // Seconds elapsed

    // Animate 2D flow field over time using 3D Simplex noise
    Vx := Simplex.Noise(10.0, 20.0, Time);
    Vy := Simplex.Noise(10.0 + 100.0, 20.0 + 100.0, Time);
  finally
    Simplex.Free;
  end;
end;