This runs slower on my computer than MGSV in ultra settings running on 4k resolution.
It would take either a domain expert or someone willing to spend a few months studying the problem to write an optimized version, but then it could probably be made to run a couple orders of magnitude faster by using slightly coarser approximations for various function evaluations (no need for 10^-15 precision for drawing on screen), or by simplifying the problem to require fewer function evaluations overall (e.g. by using Bézier curve segments instead of straight line segments), rewriting the core of the library to be vectorized, and rendering via a raster- rather than DOM-based drawing system. I’m sure a GPU could handle such a problem very effectively, though working with WebGL might be a pain.
Anyway, go for it!