8000 GitHub - amabok/mandelbrot-explorer: A simple HTML5 + vanilla JS mandelbrot manipulation workbench to experiment with and showcase browser modules, canvas and workers features
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A simple HTML5 + vanilla JS mandelbrot manipulation workbench to experiment with and showcase browser modules, canvas and workers features

Notifications You must be signed in to change notification settings

amabok/mandelbrot-explorer

Repository files navigation

Mandelbrot Explorer

A simple HTML5 + vanilla JS mandelbrot manipulation workbench to experiment with and showcase browser modules + canvas (and workers features in the future).

Mandelbrot no zoom HSL Mandelbrot no zoom Greyscale

Requirements

  • NodeJs version >= 14.16.0

Rationale

This simple application was born out of curiosity from my girlfriend on how complex would be to do the programming - or simply how to instruct the computer to do the spectacular visualizations you can see below and that are screenshots from this application - of the algorithm behind the Mandelbrot Set and associated visualization from scratch.

UI with Mandelbrot zoom details HSL UI with Mandelbrot zoom details greyscale

Besides some brush up on basic Complex/Imaginary number operations math 'magic' most if not all of the algorithm is based on this quite nice and pragmatic Python tutorial: https://www.codingame.com/playgrounds/2358/how-to-plot-the-mandelbrot-set/adding-some-colors

Tech stack and implementation

Very simple and pragmatic:

  • Plain Vanilla Javascript following the Module organisation
  • A couple of modules encapsulating and separating the different concerns (ui/presentation, complex numbers, mandelbrot calculations, graphical computation)
  • HTML5 Canvas for rendering
  • No CSS (I'm not a big Frontend or Pixel Perfect kind of personality)

Resources and references used

Improvements and further development

Setup

  • Run npm install

Build

  • No need the build process in itself. Node is presented as a requirement in order to have a quick way of statically serving the files at the
  • This Javascript code is Module compatible and will run on any modern compatible web browser. For more compatibility details please check: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

Test

  • No tests yet

Run

  • First start a static content webserver to serve the page content by running: npx serve
  • Open your browser of choice at http://localhost:5000/mandelbrot-explorer.html
  • Due to project being JS Module based the html file needs to be served from a Web server and won't run from your local file system in your preferred browser at least without any command-line or configuration magic.

About

A simple HTML5 + vanilla JS mandelbrot manipulation workbench to experiment with and showcase browser modules, canvas and workers features

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0