Sunday, August 24, 2014

Mathematical art

Once upon a time, I considered myself a decent painter. I remember getting second place in some magazine for some Christmas teenagers contest and spending a whole summer painting furiously at my home in the highlands. But, truth be said, I'm awful compared with the professional painters and artists I have found working as a game developer. Most of my art prodigies are forever lost now, maybe for good, but I remember painting something like this when I was entranced on my abstract expressionism period:

But the image above was not painted by me, it's generated from some short equations. This and a lot of interesting images can be found in this amazing post about Tweetable Mathematical Art. I translated some of the equations to JavaScript and put a simple page where you can run the demos and try your own:


I needed to make smaller the canvas to work in the browser, and some equations required some tweaks when translated from C, due to that the equations are not exactly the same from the original post. For the fun, I also ported an animated version of the "Table cloths" demo to GLSL. You'll need a decent browser to see it, it needs WebGL. The source code is on my github account.

No comments:

Post a Comment