TOPICS
Search

Cylinder Point Picking


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 R>0 and height h>0 whose axis is the z-axis and whose end disks, called caps, lie at z=0 and z=h. Let U, V, and W be independent random variables, each with a uniform distribution on [0,1], and put theta=2piU. Uniform sampling on the lateral surface is given by

 (x,y,z)=(Rcostheta,Rsintheta,hV).
(1)

The lateral area element is dA=Rdthetadz, so independent choices of theta and z 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 z from a uniform distribution on [0,h] to obtain

 (x,y,z)=(Rsqrt(V)costheta,Rsqrt(V)sintheta,hW).
(2)

The same sampled value of V must be used in both x and y. In cylindrical coordinates, the volume element is dV=rdrdthetadz. Substituting r=Rsqrt(V) makes rdr=(R^2/2)dV, 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 2piRh and piR^2 for each cap, respectively, use

p_(lateral)=h/(h+R)
(3)
p_(lower)=R/(2(h+R))
(4)
p_(upper)=R/(2(h+R)).
(5)

Choose this component independently of the random variables used to sample a point within it. For a cap, use disk point picking with (x,y)=(Rsqrt(V)costheta,Rsqrt(V)sintheta) and set z to 0 or h as appropriate. For example, when h=R, the lateral surface has probability 1/2 and each cap has probability 1/4.


See also

Cap, Cylinder, Cylindrical Coordinates, Disk Point Picking, Point Picking, Right Circular Cylinder, Uniform Sampling

Explore with Wolfram|Alpha

Cite this as:

Weisstein, Eric W. "Cylinder Point Picking." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/CylinderPointPicking.html

Subject classifications