CodingTrain / CodingTrain/Suggestion-Box

Pi in the Mandelbrot Set

Open
#1,253 2 comments 0 reactions 0 assignees View on GitHub
Pi Day
Dominant language
No language data
Stars
570
Forks
85
PR merge metrics
No merged PRs in 30d

Description

An interesting thing is that pi can be computed from the Mandelbrot set, by counting the number of iterations required before point (−0.75, ε) diverges.

Discovered by David Boll in 1991, he computed the number of iterations required for the series to diverge for z = −3/4 + iε (-3/4 being the location thereof). As the series doesn't diverge for the exact value of z = −3/4, the number of iterations required increases with a small ε.

It turns out that multiplying the value of ε with the number of iterations required yields an approximation of π that becomes better for smaller ε.

If points with coordinates (−0.75, ε) are considered, as ε tends to zero, the number of iterations until divergence for the point multiplied by ε converges to π.

For example, for ε = 0.0000001 the number of iterations is 31415928 and the product is 3.1415928

**Sources**
* [Numberphile video featuring Dr Holly Krieger](https://www.youtube.com/watch?v=d0vY0CKYhPY)
* Gary William Flake, The Computational Beauty of Nature, 1998. p. 125.
* [Aaron Klebanoff, π in the Mandelbrot set, 2001](https://www.webcitation.org/66iUmBi3B?url=https://home.comcast.net/~davejanelle/mandel.pdf)
* [Mandelbrot set wikipedia page](https://en.wikipedia.org/wiki/Mandelbrot_set#Pi_in_the_Mandelbrot_set)

Also, this is probably the least efficient way to approximate the number pi.

I don't know if a coding challenge can be made on this topic, but it may inspire you for something else :)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.