Category Archives: programming

Mosaic Art Lab

Mosaic Art Lab is out!

monument-loWhat was originally meant to be a small app designed to make subdivision mosaics (that’s what I’m calling the type of mosaic I have been posting below, with variable tile sizes), turned out to be a bigger project than expected.

I ran across these circle mosaics on the web, similar to the one shown here and had to implement an algorithm to achieve that effect. It turns out an iPhone app, Percolator, is actually specialized in these.

My next source of inspiration came from an Android game I had played a few months ago called Strata. Basically it’s a game where you have to form a grid like color pattern by using ribbons and deciding which goes on top of which. So I started wondering if in principle car1-loone could form an image from intersecting ribbons by cleverly picking their colors. My conclusion was unfortunately that you can’t unless you cheat and change the ribbon color as needed or stick to very few colors and use dithering. By the time I discovered this fact I had a working algorithm  that could generate interesting fabric effects, if not reach the impossible goal I had set.

At this point I had 3 algorithms each with dozens of parameters. It took a while to figure out I should split them into simpler filters and reduce the possibilities for the end user. The app has a typical workflow – choose your image, choose your filter, choose your parameters, apply the filter and enjoy the result. I have many ideas in store yet, so the app should be updated frequently in the coming months.

You can get the app on the Google Play Store.

Sort Mania – Beta

game3Sort Mania is in beta on the google play store.

It is the evolution of the experimental web game I made late last year, but using fingers rather than a mouse makes for a more satisfying experience. Most of the game was coded over the past two weeks. I had already ported the web game to android a bit earlier and started from that.

As noticed when working on Pan’s Remarkable Adventure, most of the work was spent on everything outside of the game proper: level selection, options, main menu and the report sheet at the end of a game.


Color Sort game

colorsort1We were sorting around some little colored tokens from a boardgame the other day and it gave me the idea for a a game of making piles of identical colored objects.

Here‘s the result in the HTML5 canvas.

I found it to be smooth in Chrome but sluggish in Firefox. The collision detection could be optimized quite a bit.

Find the code on github.


WebGL planet


Here is a little webGL demo I have started working on, based on something I did in 1997. Back then I had to precalculate images to make an animation though.

This planet is made of about 200 thousand triangles. The triangles are generated along layers. Compared to subdividing an icosahedron and projecting on a sphere this method generates triangles that are more uniform in size, though they are less equilateral.

The terrain is generated by displacing vertices along the normal to the sphere using a sum of sine functions of x, y and z. Colors are simply function of the altitude.

If your device can handle it, check out the nicer looking high polygon count version (over one million triangles).

You can find the source on github.

Acknowledgments to for much of the code.