Core 1.0
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
AnalyticScalarField2 Class Reference

A core analytic two-dimensional scalar field. More...

#include <scalarfield.h>

Inheritance diagram for AnalyticScalarField2:
GaborNoise Noise2 Phasor SimplexNoise2 WormNoise NoiseTurbulence2 ExponentialSimplexNoise SimplexTurbulence2

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
 

Detailed Description

A core analytic two-dimensional scalar field.

Member Function Documentation

◆ Curvature()

void AnalyticScalarField2::Curvature ( const Vector2 p,
double &  gaussian,
double &  mean 
) const

Compute the gaussian and mean curvatures.

Parameters
pPoint.
gaussianReturned gaussian curvature.
meanReturned mean curvature.

◆ Gradient()

Vector2 AnalyticScalarField2::Gradient ( const Vector2 p) const
virtual

Compute the gradient of the field.

Parameters
pPoint.

◆ Hessian()

Matrix2 AnalyticScalarField2::Hessian ( const Vector2 p) const
virtual

Compute the hessian at a given point.

Parameters
pPoint.

◆ Local()

Matrix AnalyticScalarField2::Local ( const Vector2 p) const
protected

Compute the local neighborhood in the one-ring aroung a point.

Parameters
pPoint.

◆ Sample()

ScalarField2 AnalyticScalarField2::Sample ( const Array2 a) const
virtual

Create a discrete scalar field by sampling a given domain.

Parameters
aDomain.

Reimplemented in NoiseTurbulence2, and SimplexTurbulence2.

◆ Value()

double AnalyticScalarField2::Value ( const Vector2 p) const
virtual

Compute the value of the field.

Parameters
pPoint.

Reimplemented in GaborNoise, Noise2, SimplexNoise2, NoiseTurbulence2, SimplexTurbulence2, WormNoise, and Phasor.