Class ThomasPointProcess

java.lang.Object
micycle.pgs.commons.ThomasPointProcess

public class ThomasPointProcess extends Object
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

    Constructors
    Constructor
    Description
    Initalise with a random seed.
    ThomasPointProcess(long seed)
    Initialise with a known seed.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.