Many people did fractals renderers in Javasript in 256 bytes, but no one ever made one that zooms and rotate... until today.
Exactly 256 bytes.
And here is a slightly beautified version of the render loop
for(d='p01?*?:,~.????',C=Math.cos(n-=88),S=Math.sin(n),Y=m=1+C,z=2048;z;Y-=m/16) for(d+='<br>',X=m;--z&63;X-=m/32,d+=d.charAt(k)) for(r=i=k=0;++k+r*r+i*i<13;i=t) t=2*r*i-X*C+Y*S, r=r*r-i*i-X*S-Y*C+C-1; B.innerHTML=d
Not much magic going here. It is rather straight forward implementation of a Mandelbrot fractal renderer with zoom and rotation of the viewport.
Many bytes were wasted to make sure this effect works cross browser.
The one trick I like here and reused many times was to have one line with some kind credits that also serves as a look up table to render the frames.
Other recent projects
There are many experiments and projects like MANDELBROT ROTOZOOM to discover other here.
- 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.
- MUSIC FOR TINY AIRPORTS 2/1 🛫 Celebrating the 40 years anniversary of Brian Eno's "Ambient 1: Music for Airports" with an homage written in 256 bytes with the Web Audio API.
- THEY COME AT DUSK 👺 A survival horror game for JS1k 2018, where you run away from dead miners as you hear your heart beat. Turn around using the arrow keys until all you hear is beeeeeeeep.
- THREAD The "10 print" maze generator in 15 bytes of x86 assembler.
- WOLF1K The idea of this entry for the JS1K contest was to do the impossible: a 1K remake of the famous WOLF5K that rocked the final edition of the5K. It does not feature guns, evil grins and violence for in WOLF1K there is no room for guns or any form of violence.
- ASAHIKAWA Flyby the city of Asahikawa in 64 bytes.
- TERRA A voxel landscape rendered using a plasma in a valid 480bytes Atari bootsector. TERRA ranked #2 at Outline 2006
- SIERPINSKI GASKET A cute Sierpinski gaskets in 96 bytes of DHTML.
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.