Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Subject 6.08: How do I generate random points on the surface of a sphere?

Points Sphere Subject
0
10 Posted

Subject 6.08: How do I generate random points on the surface of a sphere?

0
10

There are several methods. Perhaps the easiest to understand is the “rejection method”: generate random points in an origin- centered cube with opposite corners (r,r,r) and (-r,-r,-r). Reject any point p that falls outside of the sphere of radius r. Scale the vector to lie on the surface. Because the cube to sphere volume ratio is pi/6, the average number of iterations before an acceptable vector is found is 6/pi = 1.90986. This essentially doubles the effort, and makes this method slower than the “trig method.” A timing comparison conducted by Ken Sloan showed that the trig method runs in about 2/3’s the time of the rejection method. He found that methods based on the use of normal distributions are twice as slow as the rejection method. The trig method. This method works only in 3-space, but it is very fast. It depends on the slightly counterintuitive fact (see proof below) that each of the three coordinates is uniformly distributed on [-1,1] (but the three are not independent, obvio

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123