|
Core 1.0
|
Turbulence computed from a modified noise function. More...
#include <turbulence.h>
Public Member Functions | |
| NoiseTurbulence2 (const double &=0.0, const double &=1.0, const double &=1.0, const double &=0.5, const double &=0.5, int=5, const Vector &=Vector::Null) | |
| Creates a turbulence field. | |
| ~NoiseTurbulence2 () | |
| Destroys a turbulence instance. | |
| double | Value (const Vector2 &) const |
| Compute the turbulence value at a given point. | |
| double | Omega () const |
| Return the amplitude dampening coefficient. | |
| double | Lambda () const |
| Return the wavelength dampening coefficient. | |
| int | Octaves () const |
| Number of octaves. | |
| double | K () const |
| Return the global Lipschitz constant. | |
| double | Maximum () const |
| Computes the maximum of the turbulence. | |
| virtual ScalarField2 | Sample (const Array2 &) const |
| Create a discrete scalar field by sampling a given domain. | |
Public Member Functions inherited from Noise2 | |
| Noise2 (bool=false) | |
| Create a noise function. | |
| ~Noise2 () | |
| Empty. | |
| double | K () const |
| Return the global Lipschitz constant of the noise. | |
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. | |
| 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 | v0 = 0.0 |
| Base value. | |
| double | a0 = 1.0 |
| Base amplitude. | |
| double | l0 = 1.0 |
| Wavelength. | |
| double | alpha = 0.5 |
| Amplitude attenuation coefficient. | |
| double | lambda = 0.5 |
| Wavelength amplification coefficient. | |
| int | octaves = 8 |
| Number of octaves. | |
| Vector | t = Vector::Null |
| Translation. | |
Protected Attributes inherited from Noise2 | |
| bool | quintic = false |
| Flag defining interpolation type: either cubic (false) or quintic (true). | |
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. | |
Static Protected Attributes | |
| static const Matrix2 | R2 = Matrix2::Rotation(4.0 * Math::Pi / 19.0) |
| Random incremental rotation in the plane. | |
Static Protected Attributes inherited from Noise2 | |
| static double | rtable [267] |
| Random double table. | |
| static const short | hashTable [4096] |
| Hash table. | |
Static Protected Attributes inherited from AnalyticScalarField2 | |
| static const double | epsilon = 1e-6 |
| \epsilon; value for partial derivatives | |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const NoiseTurbulence2 &noise) |
| Overloaded. | |
Additional Inherited Members | |
Protected Member Functions inherited from AnalyticScalarField2 | |
| Matrix | Local (const Vector2 &) const |
| Compute the local neighborhood in the one-ring aroung a point. | |
Turbulence computed from a modified noise function.
A turbulence field is characterized by the number of octaves, the attenuation of the amplitude of the noise summed at every step, and by the amplification of the wavelength.
|
explicit |
Creates a turbulence field.
| v,a,l | Base value, amplitude and wavelength. |
| alpha,lambda | Amplitude and wavelength attenuation (should be less than 1.0 in general). |
| octaves | Number of octaves. |
| t | Offset vector. |
| double NoiseTurbulence2::K | ( | ) | const |
Return the global Lipschitz constant.
| double NoiseTurbulence2::Maximum | ( | ) | const |
Computes the maximum of the turbulence.
Sums the maximum of the terms of the series of scaled noise.
|
virtual |
Create a discrete scalar field by sampling a given domain.
| a | Domain. |
Reimplemented from AnalyticScalarField2.
|
virtual |
Compute the turbulence value at a given point.
Sums a series of scaled noise functions.
| p | Point. |
Reimplemented from Noise2.
|
friend |
Overloaded.
| s | Stream. |
| noise | The noise. |