homogeneous distribution of particles over the surface of a sphere

15 views (last 30 days)
hi everyone, I have a very simple question Im using random numbers from a uniform distribution (range from 0 to 2*pi) to create two vectors, azimuth and elevation, together with a third one with fixed radius... these values are then transformed to cartesian coordinates and (sph2cart), and visualized through scatter3....
the problem: I noticed that the density of particles over the surface of this sphere is increased on the poles, and I simply dont know why.... can anyone help?
I want equal density throughout the surface...

Accepted Answer

James Tursa
James Tursa on 11 Jun 2014
Edited: James Tursa on 11 Jun 2014
Consider circular horizontal slices through the sphere (latitude slices). At the equator, the circle has a certain radius(the radius of the sphere). But near the poles, the circles have a smaller radius. Spreading out a same size uniform sample on the smaller circle will cause the points to be more densely packed than those spread out on the larger circle. Hence, you see more dense grouping of points near the poles. There are a few ways to deal with this. You could sample from a 3D multi-variate normal distribution then turn the results into vectors of length radius. That will get them uniformly distributed on the sphere. Or you could modify your elevation sampling by applying a cosine law to the values, causing more of the samples to bunch up near the equator and fewer to bunch up near the poles. That will also result in points uniformly distributed over the surface of the sphere.
E.g., see this link for one method:
  3 Comments
James Tursa
James Tursa on 11 Jun 2014
Edited: James Tursa on 11 Jun 2014
Yes they are, but the density of points at high latitudes is not the same as the density of points at low latitudes when looking at latitude (i.e., elevation) slices. That is, you can't just apply a uniform distribution to the elevation angle and expect the result to be uniform in "area" over the sphere surface. You will get what you already know and have seen in your plots ... denser point spread near the poles. To account for that effect, you need to get some trig calculations into the sampling. I have included a link for one such method.
Mario Trevino
Mario Trevino on 11 Jun 2014
Got it! yeah You are right... angles are equidistributed but densities are not....
Thank you very much for the explanation!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!