[R] [Correction] random uniform sample of points on an ellipsoid (e.g. WG

(Ted Harding) ted.harding at nessie.mcc.ac.uk
Thu Feb 22 15:52:43 CET 2007


[OOPS! A necessary correction to the method I suggested previously]

[preceding content deleted]
The outline strategy I had in mind (I haven't worked out details)
is based on the following.

Consider a point X0 on the sphere, at radial distance r0 from
the centre of the sphere (same as the centre of the ellipsoid).
Let the radius through that point meet the ellipsoid at a point
X1, at radial distance R1.

Let dS0 be an element of area at X0 on the sphere, which projects
radially onto an element of area dS1 on the ellipsoid. You want
all elements dS1 of equal size to be equally likely to receive
a random point.

Let the angle between the tangent plane to the ellipsoid at X1,
and the tangent plane to the sphere at X0, be phi.

The the ratio of areas dS1/dS0 is R(X0), say, where

  R(X0) = dS1/dS0 = r1^2/(r0^2 * cos(phi))

and the smaller this ratio, the less likely you want a point
u.d. on the sphere to give rise to a point on the ellipsoid.

[XXX: Now define a rejection probability P(X0) by :XXX]
Now define an acceptance probability P(X0) by

  P(X0) = R(X0)/sup[R(X)]

taking the supremum over X on the sphere. Then sample points X0
unformly on the sphere, [XXX: rejecting :XXX] accepting each one
with probability P(X0), and continue sampling until you have the
number of points that you need.

Maybe someone has a better idea ... (or code for the above!)

Ted.



More information about the R-help mailing list