by FridgeSeal · 9y ago · 0 comments
While that's clearly meant to be somewhat of a joke (from a medium account called dailyjs as well), it's this kind of annoying attitude that has lead to js being forced into lots of other avenues.
Also, is js really even the best tool for this? I feel like you're going to get far better pictures and faster results from language closer to the metal like C/Rust/Java(???).
In other words... No. But experimenting with JS still can have value.
Realistically speaking, any toy fractal renderer like this will be an order of magnitude or two away from a heavily tuned one employing every trick in the book anyway, regardless of language.
How about a good old-fashioned image that doesn't require the viewer have JS enabled?
Javascript is a nice hacking tool if you keep it in the browser.
WebGL is, and the author actually uses this for his "final" implementation (linked from article).
I sort of get the JS hate (sort of) but if you want to do things in the browser then you're either using JS, or something that compiles to JS, or WebGL (1).
(1) If you're really lucky and only care about targeting supporting browsers you might also consider WebAssembly, and then you can use C or Rust, but for many scenarios that's still not an option. (And I doubt it would be faster than a shader-based WebGL implementation that runs on the GPU, for this scenario.)
For visualizing the Mandelbrot set? No. For writing an article on the web about incrementally building it up? Yes.