Disk Point Picking

DOWNLOAD Mathematica Notebook CircularDistribution

To generate random points over the unit disk, it is incorrect to use two uniformly distributed variables r in [0,1] and theta in [0,2pi) and then take

x=rcostheta
(1)
y=rsintheta.
(2)

Because the area element is given by

 dA=2pirdr,
(3)

this gives a concentration of points in the center (left figure above).

The correct transformation is instead given by

x=sqrt(r)costheta
(4)
y=sqrt(r)sintheta
(5)

(right figure above).

The probability function for distance d from the center of a point picked at random in a unit disk is

 P(d)=2d.
(6)

The raw moments are therefore given by

 mu_n^'=2/(2+n),
(7)

giving a mean distance of d^_=2/3.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.