Possibly the smallest Mandelbrot tracer ever in JavaScript: 101 bytes

## Experience always wins the day

Recent discoveries in the codegolf group allowed me to revisit the good old Mandelbrot tracer and squeeze it in 101 bytes

`<svg onload=for(n=99;n-=1/64;write(n%3?k:-7))for(r=i=0,k=20;--k/r;i=t)t=2*r*i+1-n/49,r=r*r-i*i+1-n%3>`

Check this 101 mandelbrot tracer for yourself. Like the smallest versions before, this one works best in a Webkit or Blink based browser. Making it work in Firefox and Edge takes 3 more bytes.

`<svg onload='for(n=99;n-=1/64;write(n%3?k:" "))for(r=i=0,k=20;--k/r;i=t)t=2*r*i+1-n/49,r=r*r-i*i+1-n%3'>`

Then came Xen who saved another 2 bytes by offseting the initial values of the complex number:

`<svg onload='for(n=99;n-=r=i=1/64;write(n%3?k:" "))for(k=20;--k/r;i=t)t=2*r*i+1-n/49,r=r*r-i*i+1-n%3'>`

## The genesys

Back in 2008, I got this hitch that a Mandelbrot tracer was possible in 128b. There had been countless Mandelbrot and Julia fractals in 256b but the 128b mark seemed within reach. My first attempts clocked at 137b and 133b. Jacob 'cupboy' Seidelin then kicked the ball down to 122bytes, at which point this whole thing turned into a friendly competition that lead us to more dirty tricks and down to 112bytes.

`<body onload=for(n=84;n-=1/32;document.write(n%3?k:''))for(r=i=0,k=21;--k/r;i=t)t=2*r*i+1-n/42,r=r*r-i*i+1-n%3>`

You can see most of the iterations:

- 137b
- 122b by 'cupboy'
- 117b
- 115b
- 114b by 'cupboy'
- 113b by 'cupboy', with a trimmed BODY element
- 112b
- 111b with a trimmed BODY element

Trimming the BODY element is really rough on the various browser engines. To this day, only Firefox accepts this. The 112b version on the other hand works in Opera and Firefox. The 115b version also works in Webkit browsers.

## Other recent projects

There are many experiments and projects like **MANDELBROT
TRACER** to discover other here.

**OUTER_M2**OUTER_M2: EXPLODING NEUTRINOS, a smashing JavaScript demo for the 1024 bytes demo competition at the Assembly 2019.**WE DON'T MAKE MISTAKES AT DEVONE 2019**Giving the closing keynote DEV ONE 2019, held on April 11 in Linz, Austria was absolutely fantastic. The conference was very well organized with one track, 11 talks about "scale" and 600 wonderful delegates. I learnt so much that day, got confirmation for some good practices but also learnt about many opportunities to improve our work. Also it was a pleasure to meet new people and see familiar faces among the organizers and attendees from Script'17.**MUSIC FOR TINY AIRPORTS AT WEB AUDIO CONFERENCE**The Web Audio Conference 2018, held in September 19-21 in Berlin was a great mix of researchers, web developers, artists and performers presenting their projects. I had the chance to provide a deep dive into music for tiny airports, explaining how to generate hours and hours of music in a handful of bytes.**ASTRA**ASTRA is a JavaScript odyssey in 1002 bytes for Assembly 2016**TEA STORM**256 bytes JavaScript signed distance field raymarcher using 2D Canvas. TEA STORM won at Function 2013**MARS LANDSCAPE**Remember the amazing MARS 4Kb intro by Tim Clarke in 1993 ? Here comes a remake in 256b using JavaScript and Canvas**PNEBULA**Almost the first 256b intro using Canvas ever :p**DEFENDER OF THE FAVICON**The brilliant arcade game Defender now playable inside the favicon of your browser! The idea was to push the concept of generated favicons far and beyond and pack a thrilling retro shooter in 16×16 pixels.**256B.HTM**The first edition of the 256B.HTM contest allowed 5 entries per author. Mine ranked 1st, 10th, 19th and 29th out of 63.

## Let's talk

Don't be shy; get in touch by mail, twitter, github, linkedin or pouet if you have any questions, feedback, speaking, workshop or performance opportunity.