Core 1.0
TurbulenceWormNoise Class Reference

Turbulent worm noise. More...

#include <wormnoise.h>

Inheritance diagram for TurbulenceWormNoise:
WormNoise AnalyticScalarField2

Public Member Functions

 TurbulenceWormNoise (double, double, double, int)
 Create a turbulent noise.
 
double Value (const Vector2 &) const
 Compute value.
 
- Public Member Functions inherited from WormNoise
 WormNoise (double, const Vector2 &)
 Create worm noise.
 
Vector Noise (const Vector2 &) const
 Compute worm noise value.
 
double Value (const Vector2 &) const
 Compute worm noise value.
 
- Public Member Functions inherited from AnalyticScalarField2
 AnalyticScalarField2 (bool=true)
 Constructor.
 
virtual Vector2 Gradient (const Vector2 &) const
 Compute the gradient of the field.
 
virtual Matrix2 Hessian (const Vector2 &) const
 Compute the hessian at a given point.
 
virtual ScalarField2 Sample (const Array2 &) const
 Create a discrete scalar field by sampling a given domain.
 
bool Inside (const double &) const
 Check if the value is considered as inside or outside.
 
void Curvature (const Vector2 &, double &, double &) const
 Compute the gaussian and mean curvatures.
 
virtual Box2 GetBox () const
 Return the bounding box.
 

Protected Attributes

double alpha = 0.5
 Amplitude attenuation coefficient.
 
double lambda = 0.5
 Wavelength amplification coefficient.
 
int octaves = 8
 Number of octaves.
 
- Protected Attributes inherited from AnalyticScalarField2
bool sign = true
 Sign convention, used for normal computation.
 
Box2 box = Box2::Infinity
 Domain, set as infinite for base class.
 

Additional Inherited Members

- Protected Member Functions inherited from WormNoise
Vector2 Hash (const Vector2 &) const
 Hash function for worm noise.
 
- Protected Member Functions inherited from AnalyticScalarField2
Matrix Local (const Vector2 &) const
 Compute the local neighborhood in the one-ring aroung a point.
 
- Static Protected Attributes inherited from AnalyticScalarField2
static const double epsilon = 1e-6
 \epsilon; value for partial derivatives
 

Detailed Description

Turbulent worm noise.

Author
Hugo Schott

Constructor & Destructor Documentation

◆ TurbulenceWormNoise()

TurbulenceWormNoise::TurbulenceWormNoise ( double t,
double alpha,
double lambda,
int octaves )

Create a turbulent noise.

Parameters
tThickness.
alphaAmplitude attenuation factor (~0.5, should be less than 1.0).
lambdaWavelength attenuation factor (~0.5, should be less than 1.0).
octavesNumber of octaves.

Member Function Documentation

◆ Value()

double TurbulenceWormNoise::Value ( const Vector2 & p) const
virtual

Compute value.

Parameters
pPoint.

Reimplemented from AnalyticScalarField2.