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) = z2
f(z) = z3
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 stacki
combines the top two numbers on the stack into a complex numbers
take the complex sine of the top element on the stackc
take the complex cosine of the top element on the stacknumber
pushes the number onto the stack
Debug
Calculations are done on the GPU. Here is the shader code that implements this equation.