Complex Function Grapher

This is a complex function grapher that shows how path(s) in the complex plane are transformed by a function f : CC.
f = z => z.pow(2).mul(0.2);
line([-20,1], [20,1], {color: "blue"});
line([2,-20], [2,20]);
grid([2,1]);

Other good examples to try include these:

f = z => z.pow(2).mul(0.2);
circle([2,1], 2, {color:"blue"});
line([2,-20], [2,20], {color: "red"});
grid([2,-1]);

The reciprocal function:

f = z => z.pow(-1).mul(4);
line([-20,1], [20,1], {color: "blue"});
line([2,-20], [2,20]);
circle([1.5,2],2.5,{color:"green"})
grid([2,1]);

An example from Homework 5:

f = Complex.mobius(2,0,-1,2);
for (let i = 0; i < 8; i++) {
  circle([0.5,i], 0.5);
}
line([1,-20], [1,20], {color:"blue"});
line([0,-20], [0,20], {color:"gray"});

Level curves of a solution to the Dirichlet problem on the upper half-plane converted to level curves of a solution in the unit disk.

f = Complex.mobius(-2,[0,2],-1,[0,-1]);
line([-20,0],[1,0], {color: "blue"});
line([20,0],[1,0], {color: "red"});
line([1,0],[20,10], {color: "purple"});
line([1,0],[10,20], {color: "purple"});
line([1,0],[-10,20], {color: "purple"});
line([1,0],[-20,10], {color: "purple"});
line([1,0],[-20,3], {color: "purple"});

The next example shows the flow of a fluid out of a long narrow channel.

f = z => Complex.exp(z).add(z);
line([-5,pi], [5,pi], {color: "blue"});
line([-5,-pi], [5,-pi], {color: "blue"});
line([-5,-3], [5,-3], {color: "red"});
line([-5,-2], [5,-2], {color: "red"});
line([-5,-1], [5,-1], {color: "red"});
line([-5,0], [5,0], {color: "red"});
line([-5,1], [5,1], {color: "red"});
line([-5,2], [5,2], {color: "red"});
line([-5,3], [5,3], {color: "red"});