Core 1.0
|
A core analytic two-dimensional scalar field. More...
#include <scalarfield.h>
Public Member Functions | |
AnalyticScalarField2 () | |
Create an analytic scalar field defined over the entire plane. | |
virtual double | Value (const Vector2 &) const |
Compute the value of the field. More... | |
virtual Vector2 | Gradient (const Vector2 &) const |
Compute the gradient of the field. More... | |
virtual Matrix2 | Hessian (const Vector2 &) const |
Compute the hessian at a given point. More... | |
virtual ScalarField2 | Sample (const Array2 &) const |
Create a discrete scalar field by sampling a given domain. More... | |
void | Curvature (const Vector2 &, double &, double &) const |
Compute the gaussian and mean curvatures. More... | |
virtual Box2 | GetBox () const |
Return the bounding box. | |
Protected Member Functions | |
Matrix | Local (const Vector2 &) const |
Compute the local neighborhood in the one-ring aroung a point. More... | |
Protected Attributes | |
Box2 | box = Box2::Infinity |
Domain, set as infinite for base class. | |
Static Protected Attributes | |
static const double | epsilon = 1e-6 |
\epsilon; value for partial derivatives | |
A core analytic two-dimensional scalar field.
void AnalyticScalarField2::Curvature | ( | const Vector2 & | p, |
double & | gaussian, | ||
double & | mean | ||
) | const |
Compute the gaussian and mean curvatures.
p | Point. |
gaussian | Returned gaussian curvature. |
mean | Returned mean curvature. |
Compute the gradient of the field.
p | Point. |
Compute the hessian at a given point.
p | Point. |
Compute the local neighborhood in the one-ring aroung a point.
p | Point. |
|
virtual |
Create a discrete scalar field by sampling a given domain.
a | Domain. |
Reimplemented in NoiseTurbulence2, and SimplexTurbulence2.
|
virtual |
Compute the value of the field.
p | Point. |
Reimplemented in GaborNoise, Noise2, SimplexNoise2, NoiseTurbulence2, SimplexTurbulence2, WormNoise, and Phasor.