public class SpiralSampling extends Object
| Constructor and Description |
|---|
SpiralSampling(long seed)
Create a new instance of
SpiralSampling and initialize the random number generator with the given seed. |
| Modifier and Type | Method and Description |
|---|---|
void |
createEquiAngle(float radius,
int numRotations,
int numSamples,
Callback2d callback)
Create
numSamples number of samples on a spiral with maximum radius radius around the center using numRotations number of rotations
along the spiral, and call the given callback for each sample generated. |
void |
createEquiAngle(float radius,
int numRotations,
int numSamples,
float jitter,
Callback2d callback)
Create
numSamples number of samples on a spiral with maximum radius radius around the center using numRotations number of rotations
along the spiral, and call the given callback for each sample generated. |
public SpiralSampling(long seed)
SpiralSampling and initialize the random number generator with the given seed.seed - the seed to initialize the random number generator withpublic void createEquiAngle(float radius,
int numRotations,
int numSamples,
Callback2d callback)
numSamples number of samples on a spiral with maximum radius radius around the center using numRotations number of rotations
along the spiral, and call the given callback for each sample generated.
The generated sample points are distributed with equal angle differences around the spiral, so they concentrate towards the center.
radius - the maximum radius of the spiralnumRotations - the number of rotations of the spiralnumSamples - the number of samples to generatecallback - will be called for each sample generatedpublic void createEquiAngle(float radius,
int numRotations,
int numSamples,
float jitter,
Callback2d callback)
numSamples number of samples on a spiral with maximum radius radius around the center using numRotations number of rotations
along the spiral, and call the given callback for each sample generated.
The generated sample points are distributed with equal angle differences around the spiral, so they concentrate towards the center.
Additionally, the radius of each sample point is jittered by the given jitter factor.
radius - the maximum radius of the spiralnumRotations - the number of rotations of the spiralnumSamples - the number of samples to generatejitter - the factor by which the radius of each sample point is jittered. Possible values are [0..1]callback - will be called for each sample generatedCopyright © 2015–2019 JOML. All rights reserved.