@@ -18,58 +18,28 @@ parent point and returns a geometry or domain for the offspring process.
1818## Examples
1919
2020```julia
21- import CairoMakie
22- using Meshes, MeshViz
23- using PointPatterns
24-
2521# Matern cluster process
26- d = Box((0,0), (5,5))
2722p = ClusterProcess(
2823 PoissonProcess(1),
2924 PoissonProcess(1000),
3025 parent -> Ball(parent, 0.2)
3126)
32- ps = rand(p, d)
33-
34- fig = viz(d, alpha = 0.5; axis = (;title = "Matern cluster process"))
35- viz!(ps, color = :black, pointsize = 5)
36-
3727# Inhomogenegeous parent process with fixed number of offsprings
38-
39- d = Box((-2.5,-2.5), (2.5,2.5))
4028p = ClusterProcess(
4129 PoissonProcess(s -> 1 * sum(coordinates(s) .^ 2)),
4230 BinomialProcess(100),
4331 parent -> Ball(parent, 0.2)
4432)
45- ps = rand(p, d)
46-
47- fig = viz(d, alpha = 0.5; axis = (;title = "Inhomogeneneous with fixed number of offsprings"))
48- viz!(ps, color = :black, pointsize = 5)
49-
5033# Inhomogenegeous parent process and inhomogeneneous offspring process
51-
52- d = Box((0,0), (5,5))
5334p = ClusterProcess(
5435 PoissonProcess(s -> 0.1 * sum(coordinates(s) .^ 2)),
5536 parent -> rand(PoissonProcess(x -> 5000 * sum((x - parent).^2)), Ball(parent, 0.5))
5637)
57- ps = rand(p, d)
58-
59- fig = viz(d, alpha = 0.5; axis = (;title = "Inhomogenegeous parent and inhomogeneneous offspring"))
60- viz!(ps, color = :black, pointsize = 5)
61-
6238# Inhomogenegeous parent process and regularsampling
63-
64- d = Box((0,0), (5,5))
6539p = ClusterProcess(
6640 PoissonProcess(s -> 0.2 * sum(coordinates(s) .^ 2)),
6741 parent -> PointSet(sample(Sphere(parent, 0.1), RegularSampling(10)))
6842)
69- ps = rand(p, d)
70-
71- fig = viz(d, alpha = 0.5; axis = (;title = "Inhomogenegeous parent and regular sampling"))
72- viz!(ps, color = :black, pointsize = 5)
7343```
7444"""
7545struct ClusterProcess{P<: PointProcess ,F<: Function } <: PointProcess
0 commit comments