Class: PoissonSphere

PoissonSphere

PoissonSphere is a class that allows generating 3D points in a poisson distribution.


new PoissonSphere( [mode] [, initialDistance] [, decayFactor] [, maxTests])

Parameters:
Name Type Argument Description
mode <optional>

Whether the points should be contained in a square (PoissonSphere#BOX) or a circle (PoissonSphere#SPHERICAL). Defaults to spherical.

initialDistance <optional>
decayFactor <optional>
maxTests <optional>
Author:
  • derschmale <http://www.derschmale.com>

Members


<static> BOX

Generates points in a box.


<static> SPHERICAL

Generates points in a sphere.

Methods


generatePoint()

Generates a single point and adds it to the set.


generatePoints(numPoints)

Generates new points and add them to the set. This does not return a set of points.

Parameters:
Name Type Description
numPoints

The amount of points to generate.


reset()

Clears all generated points.