- Choose a preset function, or type your own expression of
z
- Drag the image to reposition it, drag its corner handle to
resize it
- Scroll to zoom, drag empty space to pan around the plane
- Toggle the original image, or switch on the conformal grid to
see how f bends the plane itself
How It Works
MathLive hands the equation to mathjs, which parses it; an emitter
walks that tree and prints GLSL, where every value is a
vec2 — shaders have no complex type.
The shader compiles once per equation. The image is pinned to a
rectangle of the plane under a 256 × 256 mesh, uploaded
once.
That mesh runs f(z) per vertex and the texture unit
fills in color; triangles leaving the domain are discarded.
The conformal grid maps the coordinate lines through the same
shader. WebGL2 draws offscreen, then blits into the p5.js canvas.
Built with p5.js, WebGL2, mathjs, MathLive, KaTeX and Vite.