Cylinder point picking is uniform sampling of points on the surface or in the interior of a right circular cylinder. On the surface, uniform sampling is with respect to surface area, while in the interior it is with respect to volume.
Consider a cylinder of radius and height
whose axis is the
-axis and whose end disks, called
caps, lie at
and
. Let
,
, and
be independent random variables,
each with a uniform distribution on
, and put
. Uniform sampling
on the lateral surface is given by
|
(1)
|
The lateral area element is , so independent choices of
and
from their respective uniform
distributions give uniform sampling with
respect to surface area.
For uniform sampling in the solid cylinder, combine disk point picking with an independent
choice of
from a uniform distribution on
to obtain
|
(2)
|
The same sampled value of must be used in both
and
. In cylindrical coordinates,
the volume element is
. Substituting
makes
, which explains the square
root in the sampling formula.
For uniform sampling from the complete boundary, choose the lateral surface or one of the two caps with probabilities proportional to their surface
areas. Since these surface areas are and
for each cap, respectively, use
|
(3)
| |||
|
(4)
| |||
|
(5)
|
Choose this component independently of the random variables used to sample a point within it. For a cap,
use disk point picking with and set
to 0 or
as appropriate. For example, when
, the lateral surface has probability
and each cap
has probability
.