Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 1
    \$\begingroup\$ I like your first approach. I'm having trouble understanding how a bias towards the equator is avoided if z, from a uniform distribution, is left unmodified. \$\endgroup\$ Commented Sep 9, 2019 at 8:12
  • 2
    \$\begingroup\$ @Jitse The spherical distribution is in factor uniform over each coordinate. This is something special for dimension 3. See for instance this proof that the surface area of a slice of a sphere is proportional to its height. Regarding the intuition that this is biased to the equator, note that while slices near the equator have a bigger radius, ones near the pole are titled inward more which gives more area, and it turns out these two effects exactly cancel. \$\endgroup\$ Commented Sep 9, 2019 at 8:14
  • \$\begingroup\$ Very nice! Thanks for the clarification and the reference. \$\endgroup\$ Commented Sep 9, 2019 at 8:23
  • \$\begingroup\$ @Jitse Thanks, I added it to the body. I realized though that I was only sampling positive z though, and fixed that for a few bytes. \$\endgroup\$ Commented Sep 9, 2019 at 8:26
  • 1
    \$\begingroup\$ @Jitse Indeed, the surface area of a sphere equals the lateral surface area of the enclosing cylinder! \$\endgroup\$ Commented Sep 9, 2019 at 8:50