Please use a browser that supports "canvas"
× You can use this tool to plot functions of complex, split-complex, and dual numbers, and their inverses, in 2D and 3D.
The basic color scheme and idea were entirely inspired by David Bau's complex function plotter, but my goal was to make my version run faster (using webgl) and have more features (split-complex numbers, dual numbers, 3D plotting, inverses) and be more customizable.

Basic Usage

To enter a function hover your mouse over the bottom of the window (or tap on mobile) and click the 3 horizontal bars, which will show you an interface for entering functions and customizing the tool.
In reading order, the icons at the bottom of the screen are help, menu (the three horizontal bars mentioned above), upload background image (this lets you manipulate an image of your choice with the function you entered), download, and fullscreen.
The variable z provides the x and y coordinates of each pixel in the form x + iy.
Any other variables will become toggleable values in the menu which you can use to manipulate the program.
When a user enters a function, each point (x,y) is colored by where they land under f(x+iy). If you want points to be colored based on where they originated, rather than where they ended up, enable "invert" in settings to numerically invert the function. This is fairly expensive, so consider turning down AA or making the window smaller if you experience problems (you can also customize the inversion settings in the menu).


pi or π

Operators and Functions

Note: below u and v are used to represent any expression
Grouping (u)
Magnitude |u| or ‖u‖
Conjuagte u*
Basic arithmetic: u+v,u-v,u*v or u⋅v,u/v or u÷v
To multiply you can also simply write variables next to each other i.e. uv or 2uv or 2 u v or ipiuv or i pi u v are all valid and will behave the same as if * were used. Take note that 2(u) will work fine but v(u) is a function, not multiplication (also note that (v)u or (v)(u) will work just fine).
Exponentiation and logarithms: u^v, ln(u), log(u), log(u,b) (The b argument in log can be used to specify a base, default e)
Factorial: u! (really gamma(u+1))

Trig functions: sin(u), cos(u), tan(u)
Inverse trig functions: asin(u), acos(u), atan(u)
Hyperbolic trig functions: sinh(u), cosh(u), tanh(u)

Angle: arg(u)
Get real/imaginary components: re(u), im(u)
Sign: sgn(u)
Step: step(u)
Square root: sqrt(z) or √(z) (or just use exponentiation)
Gamma function: gamma(u) or Γ(u)
Zeta function: zeta(u) or ζ(z)

Iterated function {var=update, var=initial, iterations} (Think of var=update as the body of a for loop, e.g. {z' = z' +1, z' = 0, 5} would initialize z' to 0, then add one to it in each of 5 iterations). Default value of var is z', you don't need to specify "z'=" if you plan on using z' (so {z' +1, 0, 5} also works), but if you want to use a different variable like "y" you would have to specify it ({y = y +1, y = 0, 5}). Iterations must be an integer

Derivative w.r.t z (u)' (You can nest derivatives as deeply as you want, but due to the limitations of floating point arithmetic results degrade fairly quickly) Note the parentheses, z' in an iterated function is not the derivative of z.

Integral w.r.t z $(u) or $[lower](u) or $[lower, upper](u). When the lower and upper bound parameters are omitted, defaults of 0 and z respectively are used. Integrates along a line from lower to upper bound. You can also use $[lower, upper, variable](u) to specify the variable to integrate with respect to, default z. Use $[lower,upper,variable,iter](u) to specify the number of steps to take when integrating. You can use ∫ in place of $.

Sum from 1 to |count|: Sum(u,count) or ∑(u,count) e.g. sum(1/n^z,100n).


To generate the parser for user input I used peg.js. The generated parser file is included, along with the grammar file that I wrote and used to generate the parser.