Another fractal piece based on Daniel's videos.
In the main viewport is the Mandelbrot Set visualization. Click anywhere in the main viewport:
What are these?
As per Wikipedia: The Mandelbrot set is the set of complex numbers c for which the function fc(z) = z2 + c does not diverge when iterated from z=0, i.e., for which the sequence fc(0), fc(fc(0)), etc, remains bounded in absolute value.
fn+1(z) = zn2 + c
f0(z) = c , when z = 0
f1(z) = c2 + c
Let c = a + bi
c2 = (a + bi)(a + bi)
= a2 - b2 + 2abi
Based on the above formula, check for all of the possible values and see if it goes towards infinity or stays bounded.
Here the canvas is a 2D plane, which can represent a complex number a + bi across the x and y axes.
While the formal definition of Julia Set is there, in this context, I want to point out that Julia Set is deeply connected to the Mandelbrot Set.
A quick way to describe the relation is that the c in the formula of Mandelbrot Set which we keep updating from the previous iteration:
fn+1(z) = zn2 + c
is just a constant (complex number) for Julia Set.
Daniel Shiffman videos: Mandelbrot Set, Julia Set.
Wikipedia links: Mandelbrot Set, Julia Set.