gradientPerturb
Perturbs a position vector in 3D space by applying a gradient noise algorithm.
Return
A new position vector that has been perturbed by the gradient noise algorithm.
Parameters
The seed value used for generating deterministic patterns.
The amplitude of the perturbation, which controls the scale of displacement.
The frequency of the perturbation, which determines the scale of the noise.
The original position vector to be perturbed.
The interpolation function used to smooth the noise transitions, defaulting to the quintic function.
Calculates a perturbed position based on gradient noise.
Return
A 2D vector that represents the new perturbed position.
Parameters
An integer seed value used to initialize the pseudo-random number generator.
A double value that determines the strength of the perturbation applied to the position.
A double value that defines how frequent the perturbation occurs in the space.
A 2D vector specifying the initial position to perturb.
A function used for interpolation between gradient values, defaults to the quintic interpolation function.