chickadee » srfi-27 » random-solid-sphere!

(make-random-solid-sphere [mu: (MU 0.0)] [sigma: (SIGMA 1.0)] [randoms: (RANDOMS (random-real/current))]) -> (procedure (integer) vector)procedure
(random-solid-sphere! VECTOR% [mu: (MU 0.0)] [sigma: (SIGMA 1.0)] [randoms: (RANDOMS (random-real/current))]) -> vector%procedure

Fills VECTOR% with inexact real random numbers the sum of whose squares are less than 1.0.

Thinking of VECTOR% as coordinates in space of dimension N = (vector%-length VECTOR%), the coordinates are uniformly distributed within the unit n-sphere.

(From Gambit)