Extracting Pi from Image Data

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

In 1881, Ernesto Cesàro [1] proved that the probability that two random integers are relatively prime is . In this Demonstration, the pairs of random integers are chosen from among the pixel values of selected images.


Using enough random pairs of pixel data from almost any sufficiently complex picture gives an approximation of with between 1 and 4 correct digits.


Contributed by: Erik Mahieu (February 2013)
Open content licensed under CC BY-NC-SA




[1] B. Gourevitch. "The World of Pi: Cesaro." (March 14, 2012) www.pi314.net/eng/cesaro.php.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.