Click to zoom in
Ctrl+click to change control point
Examples
Documentation
These visualizations are generated by iterating a function of complex numbers.
This function is iterated at every point in the complex plane from -2-2i
to 2+2i
Imagine the function zn+1 = zn2 + c
where Z0 = 1
At point 0+0i
,
z1 = (1)2 + (0 + 0i) = 1
z2 = (1)2 + (0 + 0i) = 1
z3 = (1)2 + (0 + 0i) = 1
Clearly, this function will never diverge, so we color (0+0i) black
At point 0+i
z1 = (1)2 + (0 + i) = 1 + i
z2 = (1+i)2 + (0 + i) = 2i
The magnitude of z2 is 2, so we know this iteration will continue to diverge. We color it a different color since it took 2 iterations to diverge.
You can define simple functions of complex numbers using a simple stack machine notation
z
pusheszn
to the stackc
pushes the current coordinate to the stack+
adds the top two elements of the stack and pushes the result to the stack-
subtracts the top two elements of the stack and pushes the result to the stack*
multiplies the top two elements of the stack and pushes the result to the stacks
take the sine of the top element on the stacknumber
pushes the number onto the stackv
take the top two numbers from the stack and combine them into a complex number
Expressions are compiled to GLSL and run inside a fragment shader on the GPU