Share:

This tool helps to visualize the behavior of functions of complex numbers. Each point on the complex plane between -1-i and 1+i is assigned a color. A function is applied to the point and that color is drawn at the output. This visualization shows each point moving linearly between its input and ending location.

# Examples

`f(z) = z`

^{2}`f(z) = z`

^{3}`f(z) = 1/15 * sin(3.14 * z)`

`f(z) = 1/3 * sin(z) / (1+1i)`

`f(z) = 1/3 * sin(z) / cos(z)`

`f(z) = 1/4 * sin(3.14 * p) * sin(3.14 * p)`

You can define simple functions of complex numbers using a simple stack machine notation

`p`

pushes the input onto 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`/`

divides the top two elements of the stack and pushes the result to the stack`i`

combines the top two numbers on the stack into a complex number`s`

take the complex sine of the top element on the stack`c`

take the complex cosine of the top element on the stack`number`

pushes the number onto the stack

# Debug

Calculations are done on the GPU. Here is the shader code that implements this equation.

```
```