Complex Plane Grapher
More Examples
This tool graphs a function f(z) on the complex plane. In the default mode, the color hue represents the angle, and the brightness represents the magnitude of the output value. Enable level curves to graph only the fractional part of the magnitude, which produces sharp curved lines at every integer increment. Use the output scale to multiply by a factor if you need to bring the colors or curves into a more interesting range for the function.
The function box accepts both math expressions and C-like programs. The following code structures are available (refer to the examples to see how to use them):
Run code only if an expression is true.
Use an else block to run different code otherwise.
if (...expression...) { ...code... }
else { ...code... }
Define a complex variable, and assign a value.
complex a = ...expression...;
Return a value immediately, skipping all future code.
return ...expression...;
Loop the integer n over the range [start, end-1]
You can use n as a variable inside the loop.
loop (n, start, end) { ...code... }
Continue to the next loop increment immediately.
loop (n, start, end) { continue; }
Exit the loop immediately.
loop (n, start, end) { break; }