Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

random points on surface of n-ellipse

44 views
Skip to first unread message

Mark

unread,
Jul 23, 2001, 6:57:22 AM7/23/01
to

I'm looking for an algorithm for choosing a random
point on the surface of an n-ellipse. (With uniform
distribution, of course--that's the hard part.)

Now, I know how to do this if the n-ellipse is an n-sphere:
you choose a vector in n-space where each coordinate is
an independent random variable with normal distribution,
mean 0, and variance 1; this gives (am I right?) a
random vector with rotation-invariant distribution,
which you can then normalize to unit length for the
final result.

But for a non-spherical n-ellipsoid...? Anyone? If
it helps you can assume n is even.

Herman Rubin

unread,
Jul 23, 2001, 1:40:27 PM7/23/01
to
In article <Xns90E72854266E1...@209.128.88.94>,
Mark <ma...@purplezone.no.spam.dot.com> wrote:

The easiest method to use in such situations is what
is called acceptance-rejection. If f is the desired
density, and g is a density for which one knows how
to generate a random variable, and f <= cg, then the
procedure is to generate a random variable X, and to
accept X with probability f(X)/(cg(X)). One can see
that knowing these densities to within constants of
proportionality is enough.

There are several similar methods which can be used
in the general case. In rectangular coordinates, the
equation of the ellipsoid is

\sum (z_i^2/a_i^2) = 1.

The local surface area is

(a_n^2/z_n)*sqrt(\sum (z_i^2/a_i^4)) dz_1 ... dz_{n-1},

the sum going from 1 to n.

ONE way of doing this is to use the previous solution.
Suppose the smallest a_i is 1. Now for the unit sphere,
the local surface area is (1/z_n) dz_1 ... dz_{n-1}.
So if we let Y_1, ..., Y_n be a random point on the
surface of the unit sphere, and let X_i = a_i*Y_i,
one should accept with probability sqrt(\sum (Y_i/a_i)^2).
This can easily be done by accepting if \sum (Y_i/a_i)^2
exceeds the square of a uniform (0,1) random variable.

One will have to work harder if the a's are widely
different to get an efficient algorithm, but the
above always works,


--
This address is for information only. I do not claim that these views
are those of the Statistics Department or of Purdue University.
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
hru...@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558

0 new messages