Skip to content

AdamColton/asmJsMandelbrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Asm.js Mandelbrot

I wanted to try writing some asm.js (by hand) to understand it's structure. Rendering the Mandelbrot set seemed like a good problem.

I may come back to this at somepoint and add support for Web Workers, using transfer objects it would add a notible performance gain.

Very little code is actually used in computing the set, lines 238-251 and 203-218. It was easier to repeat the algorthm to accomodate the differences in the two shading styles.

The Zebra shading is the most direct approach, and here we choose to highlight the escape bands. Lines 64-129 run a simple smoothing algorithm by averaging each pixel with it's 8 neighbors.

The smoothing algorithm is take directly from the Wikipedia article.

All rendering parameters are kept in the URL, so interesting coordinates can be bookmarked or shared. Such as these:

Have fun!

About

Mandelbrot set in Asm.Js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages