Re: random sampling on a sphere
- From: Peter Boettcher <boettcher@xxxxxxxxxx>
- Date: Thu, 31 Aug 2006 13:10:55 -0400
"Mike Edwards" <mricad@xxxxxxxxx> writes:
how to randomly sample (x_1, x_2,...,x_N) such that
sum_i{(x_i)^2}=100?
it's basically sampling from the surface of a super-ball.
The solution I like is to generate a normal (gaussian) RV with randn,
then normalize. This works because the normal distribution is
radially symmetric: For a fully white multivariate gaussian, the
argument is of the form x_1^2 + x_2^2 + ... + x_N^2. A uniform RV
will not work, since the corners will be more dense.
--
Peter Boettcher <boettcher@xxxxxxxxxx>
MIT Lincoln Laboratory
MATLAB FAQ: http://www.mit.edu/~pwb/cssm/
.
- References:
- random sampling on a sphere
- From: Mike Edwards
- random sampling on a sphere
- Prev by Date: Please Help
- Next by Date: Re: isBetween function
- Previous by thread: Re: random sampling on a sphere
- Next by thread: surface to volume
- Index(es):