Open Qmin
0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
|
a class that implements the Bridson fast sampling algorithm, in a periodic domain More...
#include <poissonDiskSampling.h>
Public Member Functions | |
poissonDiskSampling (int desiredNumberOfPoints, scalar radius, vector< dVec > &sample, noiseSource &noise, shared_ptr< periodicBoundaryConditions > &Box, int max_sample_attempts=30) | |
int | nDimArrayIndex (const iVec &dimensions, const iVec &x) |
int | nDimArrayIndex (const iVec &dimensions, const dVec &x) |
void | sample_annulus_point (scalar radius, const dVec ¢er, dVec &answer, noiseSource &noise) |
a class that implements the Bridson fast sampling algorithm, in a periodic domain
Robert Bridson, "Fast Poisson Disk Sampling in Arbitrary Dimensions" SIGGRAPH sketches (2007)
poissonDiskSampling::poissonDiskSampling | ( | int | pts, |
scalar | radius, | ||
vector< dVec > & | sample, | ||
noiseSource & | noise, | ||
shared_ptr< periodicBoundaryConditions > & | Box, | ||
int | max_sample_attempts = 30 |
||
) |
the consructor also does all of the work
References noiseSource::getInt(), noiseSource::getRealUniform(), iVecIterate(), nDimArrayIndex(), norm(), sample_annulus_point(), scalar, and iVec::x.
simple 1D indexing of a hypercubic cell structure
References iVec::x.
Referenced by poissonDiskSampling().
int poissonDiskSampling::nDimArrayIndex | ( | const iVec & | dimensions, |
const dVec & | x | ||
) |
simple 1D indexing of a hypercubic cell structure
References iVec::x.
void poissonDiskSampling::sample_annulus_point | ( | scalar | radius, |
const dVec & | center, | ||
dVec & | answer, | ||
noiseSource & | noise | ||
) |
Sample and reject to get a point in an anulus
References dot(), noiseSource::getRealUniform(), and scalar.
Referenced by poissonDiskSampling().