Section: Visualization Toolkit Filtering Classes
The amplitude and frequency of the noise pattern are adjustable. This implementation of Perlin noise is derived closely from Greg Ward's version in Graphics Gems II.
To create an instance of class vtkPerlinNoise, simply invoke its constructor as follows
obj = vtkPerlinNoise
obj
is an instance of the vtkPerlinNoise class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkPerlinNoise = obj.NewInstance ()
vtkPerlinNoise = obj.SafeDownCast (vtkObject o)
double = obj.EvaluateFunction (double x[3])
- Evaluate PerlinNoise function.
double = obj.EvaluateFunction (double x, double y, double z)
- Evaluate PerlinNoise function.
obj.EvaluateGradient (double x[3], double n[3])
- Evaluate PerlinNoise gradient. Currently, the method returns a 0
gradient.
obj.SetFrequency (double , double , double )
- Set/get the frequency, or physical scale, of the noise function
(higher is finer scale). The frequency can be adjusted per axis, or
the same for all axes.
obj.SetFrequency (double a[3])
- Set/get the frequency, or physical scale, of the noise function
(higher is finer scale). The frequency can be adjusted per axis, or
the same for all axes.
double = obj. GetFrequency ()
- Set/get the frequency, or physical scale, of the noise function
(higher is finer scale). The frequency can be adjusted per axis, or
the same for all axes.
obj.SetPhase (double , double , double )
- Set/get the phase of the noise function. This parameter can be used to
shift the noise function within space (perhaps to avoid a beat with a
noise pattern at another scale). Phase tends to repeat about every
unit, so a phase of 0.5 is a half-cycle shift.
obj.SetPhase (double a[3])
- Set/get the phase of the noise function. This parameter can be used to
shift the noise function within space (perhaps to avoid a beat with a
noise pattern at another scale). Phase tends to repeat about every
unit, so a phase of 0.5 is a half-cycle shift.
double = obj. GetPhase ()
- Set/get the phase of the noise function. This parameter can be used to
shift the noise function within space (perhaps to avoid a beat with a
noise pattern at another scale). Phase tends to repeat about every
unit, so a phase of 0.5 is a half-cycle shift.
obj.SetAmplitude (double )
- Set/get the amplitude of the noise function. Amplitude can be negative.
The noise function varies randomly between -|Amplitude| and |Amplitude|.
Therefore the range of values is 2*|Amplitude| large.
The initial amplitude is 1.
double = obj.GetAmplitude ()
- Set/get the amplitude of the noise function. Amplitude can be negative.
The noise function varies randomly between -|Amplitude| and |Amplitude|.
Therefore the range of values is 2*|Amplitude| large.
The initial amplitude is 1.