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... | |
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.
|
inlineexplicit |
Create a new von Mises-Fisher distribution with the given concentration parameter.
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
Evaluate the distribution for a given value of cos(theta)
Compute an appropriate concentration parameter so that the associated vMF distribution has the mean cosine g
.
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]
Compute an appropriate concentration parameter so that the associated vMF distribution takes on the value x
at its peak.
|
inline |
Return the concentration parameter kappa.
Float mitsuba::VonMisesFisherDistr::getMeanCosine | ( | ) | const |
Return the mean cosine of the distribution.
Generate a sample from this distribution.
sample | A uniformly distributed point on [0,1]^2 |
|
inline |
Return the concentration parameter kappa.
std::string mitsuba::VonMisesFisherDistr::toString | ( | ) | const |
Return a string representation.