Blob 1.0
Public Member Functions | Protected Attributes | List of all members
BlendCubic Class Reference

Normalized blending functions (1-r2)3. More...

#include <blend.h>

Inheritance diagram for BlendCubic:
BlendAnalytic BlendCompact BlendWyvill

Public Member Functions

 BlendCubic (const double &, const double &=1.0)
 Creates a cubic polynomial potential function. More...
 
virtual double Eval (const double &) const
 Computes the falloff function value. More...
 
virtual double Gradient (const double &) const
 Computes the first derivative of the falloff function. More...
 
virtual double K (const double &, const double &) const
 Returns the Lipschitz constant of the blend. More...
 
virtual void Scale (const double &)
 Scales the radius if the blending function. More...
 
virtual void Alpha (const double &)
 Scales the maximum intensity of the blending function. More...
 
virtual BlendCubicCopy () const
 Deep copy.
 
double Radius (const double &) const
 Computes the radius of the blend given a threshold value. More...
 
void Analytic (const Quadric &, Polynomial &) const
 Compute the closed form expression of the field along the ray. More...
 
virtual double K () const
 Returns the Lipschitz constant.
 
virtual double K (const double &, const double &) const
 Returns the Lipschitz constant of the blend.
 
- Public Member Functions inherited from BlendAnalytic
 BlendAnalytic ()
 Empty.
 
 BlendAnalytic (const double &, const double &)
 Stores the radius of influence and the strength (maximum intensity). More...
 
virtual ~BlendAnalytic ()
 Empty.
 
- Public Member Functions inherited from BlendCompact
 BlendCompact ()
 Empty.
 
 BlendCompact (const double &, const double &)
 Stores the radius of influence and the strength (maximum intensity). More...
 
virtual ~BlendCompact ()
 Empty.
 
double R () const
 Returns the radius of the blend.
 
double I () const
 Returns the strength (maximum intensity) of the blend.
 
virtual int Memory () const
 Compute the size of a falloff node.
 

Protected Attributes

Cubic blend
 Cubic polynomial blending function.
 
- Protected Attributes inherited from BlendCompact
double r [2] = { 1.0,1.0 }
 Radius and squared radius.
 
double strength = 1.0
 Strength, i.e., maximum intensity.
 
double k = 1.0
 Lipschitz constant.
 

Detailed Description

Normalized blending functions (1-r2)3.

The Lipschitz constant is computed and stored.

The implementation of the cubic uses a specific optimized technique. The cubic polynomial function may be computed using Horner's scheme, which involves 3 adds and 3 multiplies.

Constructor & Destructor Documentation

◆ BlendCubic()

BlendCubic::BlendCubic ( const double &  r,
const double &  s = 1.0 
)
explicit

Creates a cubic polynomial potential function.

Parameters
rRadius.
sStrength.

Member Function Documentation

◆ Alpha()

void BlendCubic::Alpha ( const double &  t)
virtual

Scales the maximum intensity of the blending function.

This function scales the internal strength parameter of the blending function radius, as well as the Lipschitz constant.

Reimplemented from BlendAnalytic.

◆ Analytic()

void BlendCubic::Analytic ( const Quadric r,
Polynomial p 
) const
virtual

Compute the closed form expression of the field along the ray.

Simply plug-in the quadric equation of the distance along the ray into the equation of the blending function.

Parameters
rEquation of the squared distance to the skeleton.
pClosed form expression of the field along the ray.

Implements BlendAnalytic.

◆ Eval()

double BlendCubic::Eval ( const double &  u) const
virtual

Computes the falloff function value.

Parameters
uSquared distance.

Implements BlendCompact.

◆ Gradient()

double BlendCubic::Gradient ( const double &  u) const
virtual

Computes the first derivative of the falloff function.

Parameters
uInput squared distance.

Implements BlendCompact.

◆ K()

double BlendCubic::K ( const double &  a,
const double &  b 
) const
virtual

Returns the Lipschitz constant of the blend.

Parameters
a,bInterval.

Reimplemented from BlendCompact.

◆ Radius()

double BlendCubic::Radius ( const double &  T) const
virtual

Computes the radius of the blend given a threshold value.

Parameters
TThreshold value.

Reimplemented from BlendCompact.

◆ Scale()

void BlendCubic::Scale ( const double &  t)
virtual

Scales the radius if the blending function.

This function scales the internal radius, as well as the Lipschitz constant.

Parameters
tScaling factor.

Reimplemented from BlendAnalytic.