Package micycle.pgs.commons
Class ThomasPointProcess
java.lang.Object
micycle.pgs.commons.ThomasPointProcess
Implements the Thomas Point Process, a stochastic process used for simulating
clusters of points around parent locations in spatial analysis. Each cluster
consists of child points normally distributed around a parent point.
This Java implementation is a port of the simple Python implementation available here, wherein parent points are seeded uniformly.
- Author:
- Michael Carleton
-
Constructor Summary
ConstructorsConstructorDescriptionInitalise with a random seed.ThomasPointProcess
(long seed) Initialise with a known seed. -
Method Summary
-
Constructor Details
-
ThomasPointProcess
public ThomasPointProcess()Initalise with a random seed. -
ThomasPointProcess
public ThomasPointProcess(long seed) Initialise with a known seed.- Parameters:
seed
-
-
-
Method Details
-
sample
public List<processing.core.PVector> sample(double xMin, double yMin, double xMax, double yMax, double parentsDensity, double meanChildPoints, double childSpread) Generates a list of sample points within a specified rectangular boundary with clustering behavior. The method simulates a clustering pattern where each 'parent' point can spawn multiple 'child' points.- Parameters:
xMin
- the minimum x-coordinate of the boundary.yMin
- the minimum y-coordinate of the boundary.xMax
- the maximum x-coordinate of the boundary.yMax
- the maximum y-coordinate of the boundary.parentsDensity
- the density of parent points per unit area (scaled by a factor of 75x75 units).meanChildPoints
- the average number of child points generated per parent point.childSpread
- the first standard deviation of the distance between each parent point and its children.- Returns:
- a list of PVector objects representing the generated points within the boundary.
-