# Random Point on Edge of Cylinder

How can I get a random point on just the curved edge of a cylinder?

c = Cylinder[{{0, 0, 0}, {0, 0, 2}}, 2];
RandomPoint[RegionBoundary[c], 50]


almost works, but also adds points to the top and bottom.

You could intersect the boundary of an elongated cylinder with a cuboid:

region = RegionIntersection[
Cuboid[{-2,-2,0}, {2,2,2}],
RegionBoundary @ Cylinder[{{0,0,-1},{0,0,3}},2]
];


This creates a region consisting of the curved boundary of a cylinder along the $z$-axis of radius 2 and length 2. Then, use RandomPoint to get your points:

pts = RandomPoint[region, 1000];


Visualization:

Graphics3D[Point[pts]]


You could also intersect the boundary of the desired cylinder with an elongated cylinder:

region = RegionIntersection[
RegionBoundary @ Cylinder[{{0,0,-1}, {0,0,3}}, 2],
RegionBoundary @ Cylinder[{{0,0,0}, {0,0,2}},2]
];

cylinderHeight = 5;

pr[r_, h_] := ParametricRegion[{r Cos[θ], r Sin[θ], z}, {{θ, 0, 2 π}, {z, 0, h}}];