What is best way or an algorithm for generating a random 3d point [x,y,z] inside the volume of the circular cylinder if radius r and height h of the cylinder are given?
The z axis is easy: -0.5 * h <= z <= 0.5 * h
The x and y are equal to a circle will be: x^2 + y^2 <= r^2
Buth math is long ago for me :-)