LIC and boids, kinda

So, I’ve been tinkering a bit more with the boids…

I had the idea of borrowing concepts from a technique called ‘line integral convolution’ and play with what that one does to the images. LIC is a method used in vector field visualization and creates images like this one from wikipedia for example:

The results depend on an input image,- you can use white noise for example.

It is usually used to visualize the flow on a surface etc. and you obviously need a vector field for it to work. I don’t have that, but I have the boids’ movement which I can use instead. Usually, for each pixel you calculate a streamline through that pixel and integrate over that streamline using a filter kernel like a box, triangle, gauss, … – you get the idea. Again, no way to calculate a forward streamline but I have the backward part and just pretend that my filter kernel weights the forward bit with 0. Long story short, this all boils down to a very simple implementation but this was my thinking along the way and where I got the idea from. The final implementation is embarassingly trivial and comes down to an average of the last N pixels visited ;) Nothing too crazy, but I wanted to give it a try.

These were the first results:

lic_jigga4

lic_jigga

lic_jigga3

lic_jigga2

Here I let the color get darker over time. Pixels that have been visited a lot are the darkest:

lic_jigga7

lic_jigga6

lic_jigga11

lic_jigga10

lic_jigga9

lic_jigga8

Here I use the underlying checkerboard for the convolution but draw the pixels on a clean background:

nochecker1

nochecker2

nochecker3

nochecker4

nochecker5

nochecker7

nochecker8

I got quite a few suggestions for the next iteration of tests and I hope that I get to try some of them soon. :)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s