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).
| Parameter | Type | Description |
|---|---|---|
x | Double | X spatial coordinate in Euclidean space. |
y | Double | Y spatial coordinate in Euclidean space. |
| Type | Description |
|---|---|
Double | Continuous 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).
| Parameter | Type | Description |
|---|---|---|
x | Double | X spatial coordinate. |
y | Double | Y spatial coordinate. |
z | Double | Z spatial coordinate (or temporal dimension). |
| Type | Description |
|---|---|
Double | Continuous 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).
| Parameter | Type | Description |
|---|---|---|
x | Double | X coordinate. |
y | Double | Y coordinate. |
z | Double | Z coordinate. |
w | Double | W coordinate (e.g. time or extra parameter). |
| Type | Description |
|---|---|
Double | Continuous scalar noise value in range [-1.0, 1.0]. |
Description ​
The Noise method samples continuous gradient noise at the specified coordinates:
- 2D Noise
Noise(x, y): Partitions 2D Euclidean space into equilateral triangles. Useful for planar texture generation, heightfield maps, and 2D particle drift. - 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 (). - 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
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;