  We consider a random variable expressed as the Euclidean distance between an
arbitrary point and a random variable uniformly distributed in a closed and
bounded set of a three-dimensional Euclidean space. Four cases are considered
for this set: a union of disjoint disks, a union of disjoint balls, a union of
disjoint line segments, and the boundary of a polyhedron. In the first three
cases, we provide closed-form expressions of the cumulative distribution
function and the density. In the last case, we propose an algorithm with
complexity O(n ln n), n being the number of edges of the polyhedron, that
computes exactly the cumulative distribution function. An application of these
results to probabilistic seismic hazard analysis and extensions are discussed.
