Blob 1.0
BlendQuartic Class Reference

Quartic polynomial falloff function. More...

#include <blend.h>

Inheritance diagram for BlendQuartic:
BlendCompact

Public Member Functions

 BlendQuartic (const double &, const double &=1.0)
 Creates a quartic polynomial potential function.
 
virtual ~BlendQuartic ()
 Empty.
 
virtual double Eval (const double &) const
 Computes the blending function intensity.
 
virtual double Gradient (const double &) const
 Computes the first derivative of the falloff function.
 
virtual BlendQuarticCopy () const
 Deep copy.
 
double Radius (const double &) const
 Computes the radius of the blend given a threshold value.
 
void Analytic (const Quadric &, Polynomial &) const
 Compute the closed form expression of the field along the ray.
 
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 BlendCompact
 BlendCompact ()
 Empty.
 
 BlendCompact (const double &, const double &)
 Stores the radius of influence and the strength (maximum intensity).
 
virtual ~BlendCompact ()
 Empty.
 
double R () const
 Returns the radius of the blend.
 
double I () const
 Returns the strength (maximum intensity) of the blend.
 
virtual void Scale (const double &)
 Scales the radius if the blending function.
 
virtual void Alpha (const double &)
 Scales the maximum intensity of the blending function.
 
virtual int Memory () const
 Compute the size of a falloff node.
 

Protected Member Functions

Quartic GetPoly () const
 Compute the quartic polynomial.
 

Additional Inherited Members

- Protected Attributes inherited from BlendCompact
double r = 1.0
 Radius.
 
double strength = 1.0
 Strength, i.e., maximum intensity.
 
double k = 1.0
 Lipschitz constant.
 

Detailed Description

Quartic polynomial falloff function.

g(r)=(1-r2)4.

The Lipschitz constants are computed and stored internally.

Constructor & Destructor Documentation

◆ BlendQuartic()

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

Creates a quartic polynomial potential function.

Parameters
rRadius.
sStrength.

Member Function Documentation

◆ Eval()

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

Computes the blending function intensity.

Parameters
uSquared distance.

Implements BlendCompact.

◆ Gradient()

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

Computes the first derivative of the falloff function.

Parameters
uSquared distance.

Implements BlendCompact.

◆ Radius()

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

Computes the radius of the blend given a threshold value.

This function uses the closed form expression of the quadric, cubic or quartic blending function to compute the root of the equation.

Parameters
TThreshold value

Reimplemented from BlendCompact.

◆ Analytic()

void BlendQuartic::Analytic ( const Quadric & e,
Polynomial & p ) const

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
eEquation of the squared distance to the skeleton.
pClosed form expression of the field along the ray.