A 3D web-based complex function grapher
example of a Re-Im plot
example of a Mod-Arg plot
Uses a custom rust expression parser and evaluator (in ./rust
) compiled to wasm
-
for this to update you have to press the Load button
-
for this to update you have to press the Load button
-
for this to update you have to press the Load button
-
When shine is on:
Note: This might not accurately represent how real life translucent shiny surfaces work, and there may be issues on devices with less great GPUs
-
the book icon hides/shows the topleft tab
the camera icon exports the graph as a .png
I saw cool stuff like this graph from this youtube video:
but there is no easy way to render such Mod-Arg plots. So the objective of this is to create an optimized way to graph 3D complex plots on the web (snappily).
- cut off after certain height option
- Export to a
.stl
file 3D printing (probably defer this or smth) - Opacity, Saturation, Value option
- Logarithmic height option
- Hide title option
- Add an option for how many points u want in a mesh (aka how good is your device)
- Mod-Arg, Im-Re plot
- Export to an image -
compromised performance by addingre-renders withpreserveDrawingBuffer: true
to rendererpreserveDrawingBuffer: true
, exports image, and re-render withpreserveDrawingBuffer: false
- Optimize reloading
- shiny/glassy surface option
For a complex-valued function, the complex input consists of 2 values (Real and Imaginary part i.e.
For example for the given function
- a Re-Im plot takes the real component of the output
$w$ and uses that as the height of the surface at a given point. the imaginary part$v$ is sigmoid-ed to B/W value - a Im-Re plot, on the other hand takes the imaginary component of the output
$v$ and uses that as the height of the surface at a given point. the real part$w$ is sigmoid-ed to B/W value - a Mod-Arg plot takes the modulus as the height and the argument:
note: for functions with asymptotes/large changes in gradient it is necessary to increase the "How good is your device" to a value higher, perhaps 10 but 25 is better
$\tan(z)$ (tan(z)
), Mod-Arg
$\Gamma(z)$ (gamma(z)
), Mod-Arg
$\sec(z)$ (sec(z)
), Re-Im, colored
$\sinh(z)$ (sinh(z)
), Mod-Arg
$4sin^{-1}\frac{z}{4}$ (4asin(z/4)
), Re-Im
1/(1+(z/5)^2)
, Re-Im, colored, you can see the 2 asymptotes at z=±i that causes the radius of convergence to be 1