News for hackers. Stuff that matters.
Re:Random Points on a Sphere by ggchappell on Monday April 27, 2015 @01:55AM (#9444551)
FTA:

> One solution is to pick λ ∈ [-180°, 180°) as before and then set φ = cos^(-1)(2x - 1), where x is uniformly distributed and x ∈ [0, 1).

There is a fascinating fact hidden in the above sentence: if a point (x,y,z) is uniformly distributed on the surface of a sphere -- say, of radius 1, centered at (0,0,0) -- then each of x, y, and z is uniformly distributed over the interval [-1, 1].

Honestly, that's amazing.

Re:Random Points on a Sphere by fsloth on Monday April 27, 2015 @02:07AM (#9444580)
Are you sure? If z is distributed over the surface of the sphere there is far less surface at the extremums -1 and 1. Doesn't z being uniform in the range (-1,1) lead to points being actually more densly concentrated near the poles? Or did I misunderstand what you meant?
Re:Random Points on a Sphere by kasdkashdkas on Monday April 27, 2015 @02:37AM (#9444658)
Near the poles the surface becomes very flat and therefore there is as much surface area in a slice of constant height than anywhere else. Archimedes was a clever fella :-)
Re:Random Points on a Sphere by fsloth on Monday April 27, 2015 @04:20AM (#9444961)
Oh, I was totally confused, of course the numbers in every dimension are evenly distributed, silly me - I was thinking of great circles. Thanks :)
Re:Random Points on a Sphere by fizbin on Monday April 27, 2015 @09:39AM (#9446156)
Yes, it is a really weird property of 2-spheres that that holds.

One consequence is that yet another way to pick a point uniformly on the sphere is to choose z ∈ [-1, 1] uniformly, then choose λ ∈ [-180°, 180°) uniformly and use the point

  (cos(λ)*sqrt(1-z*z), sin(λ)*sqrt(1-z*z), z)
Re:Random Points on a Sphere by ampqoi on Monday April 27, 2015 @12:36PM (#9447378)
I believe that this is due to a theorem of Archimedes:

http://en.wikipedia.org/wiki/On_the_Sphere_and_Cylinder

Re:Random Points on a Sphere by semaphoreP on Monday April 27, 2015 @03:22AM (#9444802)
I think that's a consequence of spherical symmetry. I'm not sure I have the entire logic worked out, but because it's isotropic, then the distributions need to be uniform I think.
Re:Random Points on a Sphere by kasdkashdkas on Monday April 27, 2015 @03:59AM (#9444887)
It's a bit more subtle (the corresponding statement for circles is not correct).
Re:Random Points on a Sphere by fizbin on Monday April 27, 2015 @09:35AM (#9446143)
Nor for 3-spheres (i.e. the 3-dimensional surface defined as all the points in 4-d space at distance 1 from the origin). Nor for higher dimensions than that.

It's peculiar to the 2-sphere ("ordinary" spheres).

Re:Random Points on a Sphere by ggchappell on Monday April 27, 2015 @10:42AM (#9446597)
Ah, I didn't know that.

I imagine there is a trend where, in higher dimensions, coordinates have a greater tendency to be near zero?

In a 0-sphere, x is either -1 or +1. In a 1-sphere, each of x, y, is (informally speaking) more likely to be near +/- 1 than near 0. A 2-sphere gives us uniform distribution for each coordinate. So I suppose that the coordinates of a 3-sphere are more likely to be near 0 than near +/- 1, and this tendency is more pronounced, the higher the dimension gets. (?)

n-spheres are funny things. Intuition about them is often misleading. (See, for example, the comments expressing skepticism about my original uniform-distribution observation.)

----

EDIT. Ooo, some interesting questions here. What is the limiting behavior of the distribution of x on the n-sphere, as n -> +infinity? I imagine the graph looks like a narrower & narrower spike at x = 0.

Now, suppose we scale the graph of the distribution horizontally by some appropriate function of n. That is, let f_n be the probability distribution of x on the n-sphere. Is there some function g:Z -> R so that the function x -> f_n(x / g(n)) has a limit as n -> +infinity? Does it approach (wild guess) a normal distribution? If so, is this fact (even wilder guess) a special case of some kind of central-limit-theorem-ish statement that holds for geometrical objects?

Re:Random Points on a Sphere by madcaptenor on Monday April 27, 2015 @11:37AM (#9446965)
Informally, the results of "Asymptotic distribution of coordinates on high-dimensional spheres" by M. C. Spruill (http://www.emis.ams.org/journals/EJP-ECP/_ejpecp/ECP/include...) is that as n gets large, the distribution of x approaches a normal distribution with mean 0 and standard deviation 1/sqrt(n). That paper contains what might be some interesting references to the literature.
Re:Random Points on a Sphere by ggchappell on Monday April 27, 2015 @12:31PM (#9447334)
Hey, I guessed right! :-)

Thanks for the paper link.

Re:Random Points on a Sphere by darkmighty on Monday April 27, 2015 @10:08PM (#9450244)
Interesting statement about geometrical objects. Note that the unit hypercube (surface) aligned with the axis will not converge to a normal (regardless of orientation?), it stays uniform instead.

In fact the simplex seems to be the worst case for convex objects, in terms of concentration of distribution near the center. And the best case should be the sphere. Which plays out nicely since the simplex seems to be the most "concavey" convex shape of a given 'diameter' is the sphere is the most "convexey" convex shape of a given 'diameter', no?

Re:Random Points on a Sphere by asdkashdkjashd on Monday April 27, 2015 @01:11PM (#9447646)
The correct higher-dimensional analogue replaces S^2 by the complex projective space CP^n and the height function by the corresponding moment map.
Re:Random Points on a Sphere by xtacy on Monday April 27, 2015 @02:34AM (#9444645)
Something doesn't add up in your observation. (x,y,z) can't all be uniformly distributed in [-1,1] because of the constraint x^2+y^2+z^2=1.
Re:Random Points on a Sphere by kasdkashdkas on Monday April 27, 2015 @02:37AM (#9444660)
They are only individually distributed uniformly in [-1,1], not jointly.