Algorithmic Art in Javascript

August 10, 2014

I was reading the solution to a problem on Stackoverflow when this thread caught my eye People were challenged to come up with concise functions for Red, Green and Blue to be called on each pixel in a 1024x1024 image. Furthermore, the functions had to total less than 140 bytes, short enough to fit into a tweet.

Now the original challenge was in C++ and required compiling and knowledge of C++. It didn’t seem easily accessible to the general coding public, or at least to me (I don’t know C++). Even though, the artwork that people had produced was outstanding! The images look beautiful and complex, yet the code is so simplistic. I was entranced and wanted to start muddling with it on my own.

So here’s my response, a Javascript re-write of the original driver and a UI wrapper around it to make it accessible. Without further-adieu, here’s the app:

Width: Height:
function red(x, y) { }
function green(x, y) { }
function blue(x, y) { }
comments powered by Disqus