menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Cloud News

>

A simple w...
source image

Johndcook

1M

read

206

img
dot

A simple way to generate random points on a sphere

  • A simple way to generate random points on a sphere is by generating random points in a cube until one falls inside the sphere, then normalizing it to push it to the sphere's surface.
  • To generate random points on the unit sphere, independent random values are generated on [-1, 1], and if the sum of their squares is less than or equal to 1, the normalized values are returned.
  • This approach is intuitive, with minimal dependencies compared to the more common method of generating n independent values from a standard normal distribution then normalizing.
  • While the accept-reject methods used in this approach may have varying runtimes, they are practical for most cases. The efficiency trade-offs and considerations in parallel computing and cryptography are also discussed.

Read Full Article

like

12 Likes

For uninterrupted reading, download the app