Interactive demo of using Newton's method in the complex plane with a cubic. Its a little slow, any ideas for improvements are welcome:

@hamptonio you could probably make it respond in realtime if you do the per-pixel calculations in a WebGL fragment shader running on a GPU instead of Javascript on a single core of a CPU

@hamptonio I made it roughly 2x faster (in Firefox 62 on Debian Buster) by avoiding memory allocation by [...] inside the loop:

here's one of my experiments from 2012 with GLSL fragment shader (using desktop OpenGL, not WebGL) I think it ran in realtime, but it's so long ago that I forgot...

@hamptonio Oh! I found my code, and turns out I already ported it to WebGL (runs 60fps full screen realtime on my system but I have a beefy GPU..).

drag with left-mouse-button pressed to add a new root (the path is recorded and animated, but there is no visual feedback in the process, and you need 2 or 3 paths to get something interesting...). for source/history browser

Sign in to participate in the conversation

A Mastodon instance for maths people. The kind of people who make \(\pi z^2 \times a\) jokes.

Use \( and \) for inline LaTeX, and \[ and \] for display mode.