Mitsuba Renderer  0.5.0 mitsuba::VonMisesFisherDistr Struct Reference

Von Mises-Fisher distribution on the 2-sphere. More...

#include <mitsuba/core/vmf.h>

## Public Member Functions

VonMisesFisherDistr (Float kappa=0)
Create a new von Mises-Fisher distribution with the given concentration parameter. More...

void setKappa (Float kappa)
Return the concentration parameter kappa. More...

Float getKappa () const
Return the concentration parameter kappa. More...

Float getMeanCosine () const
Return the mean cosine of the distribution. More...

Float eval (Float cosTheta) const
Evaluate the distribution for a given value of cos(theta) More...

Vector sample (const Point2 &sample) const
Generate a sample from this distribution. More...

std::string toString () const
Return a string representation. More...

## Static Public Member Functions

static Float forPeakValue (Float x)
Compute an appropriate concentration parameter so that the associated vMF distribution takes on the value x at its peak. More...

static Float forMeanLength (Float length)
Estimate the vMF concentration parameter based on the length of the mean vector that is produced by simply averaging a set of sampled directions. More...

static Float forMeanCosine (Float g)
Compute an appropriate concentration parameter so that the associated vMF distribution has the mean cosine g. More...

static Float convolve (Float kappa1, Float kappa2)
Compute an concentration parameter that approximately corresponds to the spherical convolution of two vMF distributions. More...

## Detailed Description

Von Mises-Fisher distribution on the 2-sphere.

This is a basic implementation, which assumes that the distribution is centered around the Z-axis. All provided functions are implemented in such a way that they avoid issues with numerical overflow.

## Constructor & Destructor Documentation

 mitsuba::VonMisesFisherDistr::VonMisesFisherDistr ( Float kappa = 0 )
inlineexplicit

Create a new von Mises-Fisher distribution with the given concentration parameter.

## Member Function Documentation

 static Float mitsuba::VonMisesFisherDistr::convolve ( Float kappa1, Float kappa2 )
static

Compute an concentration parameter that approximately corresponds to the spherical convolution of two vMF distributions.

For details, see "Directional Statistics" by Mardia and Jupp, p.44

 Float mitsuba::VonMisesFisherDistr::eval ( Float cosTheta ) const

Evaluate the distribution for a given value of cos(theta)

 static Float mitsuba::VonMisesFisherDistr::forMeanCosine ( Float g )
static

Compute an appropriate concentration parameter so that the associated vMF distribution has the mean cosine g.

 static Float mitsuba::VonMisesFisherDistr::forMeanLength ( Float length )
static

Estimate the vMF concentration parameter based on the length of the mean vector that is produced by simply averaging a set of sampled directions.

This is an unbiased estimator [Banerjee et al. 05]

 static Float mitsuba::VonMisesFisherDistr::forPeakValue ( Float x )
static

Compute an appropriate concentration parameter so that the associated vMF distribution takes on the value x at its peak.

 Float mitsuba::VonMisesFisherDistr::getKappa ( ) const
inline

Return the concentration parameter kappa.

 Float mitsuba::VonMisesFisherDistr::getMeanCosine ( ) const

Return the mean cosine of the distribution.

 Vector mitsuba::VonMisesFisherDistr::sample ( const Point2 & sample ) const

Generate a sample from this distribution.

Parameters
 sample A uniformly distributed point on [0,1]^2
 void mitsuba::VonMisesFisherDistr::setKappa ( Float kappa )
inline

Return the concentration parameter kappa.

 std::string mitsuba::VonMisesFisherDistr::toString ( ) const

Return a string representation.

The documentation for this struct was generated from the following file:
• include/mitsuba/core/vmf.h