Can anyone suggest me a way of drawing a 3-dimensional Poisson Point Process (PPP) with intensity $\lambda$ in Mathematica. The points are located only in a half sphere. The 3-dimensional ball of radius $r$ is located in the origin. Let the radius $r$ be equal to 1.
2 Answers
Mathematica has RandomPoint
for picking a uniformly distributed point inside the specified region. As the average number of points for a uniform PPP in a bound region is proportional to it's volume, we have to variate PoissonDistribution
with a given parameter and obtain this number of random points. All that is left is to draw it all together.
R = ImplicitRegion[
x^2 + y^2 + z^2 <= 1,
{{x, 0, ∞}, y, z}
];
λ = 50;
pts = RandomPoint[
R,
RandomVariate[
PoissonDistribution[λ*Integrate[1, {x, y, z} ∈ R]]
]
];
Show[{
RegionPlot3D[
R,
PlotStyle -> Opacity[0.2]
],
Graphics3D[
Point[pts]
]
}]
This code will produce the next picture:
-
$\begingroup$ What about the location (x, y, z of these points? Can I know that too?) $\endgroup$– AdilCommented Apr 9, 2018 at 12:41
-
$\begingroup$ @Adil Those are stored in
pts
(check the documentation for RandomPoint). $\endgroup$ Commented Apr 9, 2018 at 14:38
Mathematica 12.2 or later
PoissonPointProcess
function is introduced in 2020 version (12.2)
SeedRandom[138];
\[Mu] = 1000;
dimension = 3;
pts = RandomPointConfiguration[PoissonPointProcess[\[Mu], dimension],
Ball[]]
Show[Graphics3D[{Opacity[0.2], pts["ObservationRegion"]}],
ListPointPlot3D@pts]