Friday, March 30, 2012

Adding interactivity to the sim. This is running fully parallized on the CPU, and it's reasonably quick with four cores banging on it at 256x256, but I get out-of-resources error from OpenCL when I try to run it on the GPU.

Tuesday, March 27, 2012

This sim treats each of the colour channels of the image as a separate fluid component which is immiscible with the others. Here the blue and green repel each other strongly, but the red only interacts weakly with the others.

I'm having fun exploring the parameters space of the sim, but it's big, and has a lot of dead ends. Many, perhaps most, combinations are uninteresting, though you get nice surprises like this. The problem is that there are about 7 or 8 parameters to play with, and each of them can range over many orders of magnitude, and then some behaviour will emerge for a certain range, but it will be highly sensitive to one or two parameters just inside some tiny range. Interesting, challenging.

Tuesday, March 20, 2012

Playing with phase separation in a lattice-Boltzmann fluid simulator I wrote recently. Lattice-Boltzmann sims are very easy to write, and if you ever wanted to write a fluid sim, but find the math daunting, they're a good place to get started. They have other virtues (and limitations) beyond ease of implementation. For instance, it's very easy to simulate multiple phases and immiscible fluids with an LB sim.

For the second two pictures, I tweaked the sim so that the fluid flow favours the x- and y-axis directions.

Monday, March 19, 2012

Some output from my cell/clustering software (code-named "Clusterf**k"). For comparison, I used a similar vector field for each. Each cluster has its own set of attributes including size, eccentricity, alignment with neighbours, orientation with respect to the field and a few others. You can get a wide variety of effects by playing with various distributions of these properties. I like that you can get cell distributions that are very different qualitatively.

In other news, I'm headed back to New Zealand to work on the Hobbit in about a month, so I'm wrapping this and a few other projects up. The biggest remaining task for the Clusterf**k is optimization -- the current algorithm is slowish, and I would love for to work at truly interactive rates. It works on arbitrary surfaces, not just 2d planes, and that flexibility brings a cost in speed.