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 `z`

where _{n+1} = z_{n}^{2} + c`Z`

_{0} = 1

At point `0+0i`

,

`z`

_{1}= (1)^{2}+ (0 + 0i) = 1`z`

_{2}= (1)^{2}+ (0 + 0i) = 1`z`

_{3}= (1)^{2}+ (0 + 0i) = 1

Clearly, this function will never diverge, so we color (0+0i) black

At point `0+i`

`z`

_{1}= (1)^{2}+ (0 + i) = 1 + i`z`

_{2}= (1+i)^{2}+ (0 + i) = 2i

The magnitude of z_{2} 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`

pushes`z`

to the stack_{n}`c`

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 stack`s`

take the sine of the top element on the stack`number`

pushes the number onto the stack`v`

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