Leif's Blog

A blog that is partly data-visualization themed, but mostly random.

Updated the layout this morning. The old one looked horrible.
New features are:
Tags. No, its not really that amazing.
Mac-like style with text-shadows and round curves (works only in Safari and Firefox)
It is simpler.
It is W3C XHTML valid, well, apart from the Flash objects which screw everything up.
Chances are it does not work well with IE, because I dismissed it entirely in the development process.

Updated the layout this morning. The old one looked horrible.

New features are:

  • Tags. No, its not really that amazing.
  • Mac-like style with text-shadows and round curves (works only in Safari and Firefox)
  • It is simpler.
  • It is W3C XHTML valid, well, apart from the Flash objects which screw everything up.

Chances are it does not work well with IE, because I dismissed it entirely in the development process.

You can see my changes that I make to the Extended Essay at run-time! (well, I need to upload it, but I’ll do it often).

Currently working on a newer version of UpsandDowns.no webpage.

Currently working on a newer version of UpsandDowns.no webpage.

Posted the 1.0 alpha version of the Extended essay for y’all to read. Hope to work on the 1.1 alpha version, and be finished by 28th of June.

Psychologically speaking, flocking is very simple. Mathematically speaking, its almost impossible to generally create (make it actually look like behaviour).
The above image is from a PDF on the web, have no idea where now (its been on my hard drive for about a year now). It talks simply about simple mathematical algorithms in a very simple manner that is applicable to any computer language (like pseudocode, but even simpler). Some algorithms are circle/object packaging, tiling, weaving, blending, cracking. The above image shows the underlying concepts of flocking. Below is what it says on the image:
Recipe for Flocking
For each agent for each increment of time:
Avoid crowding local flock-mates. Steer to keep a minimum distance between each agent and the ones around it.
Align towards the average heading of local flockmates.
Cohere to the flock, move towards the center of mass of local flockmates
Well, that seems easy, right? Its just two simple rules! If too close, make agent turn away. If too far, but close, make agent turn towards nearest center of mass. Sadly, it is something quite difficult, as it is hard to define center of masses and how to make something go towards something in a non-weird behaviour.
I found some great examples online. One of them stood out in particular. I particulary like the one linked because it also contains objects, food and predators, something that I initially wanted. A simpler example is one from the Processing.org site, which is originally based in Craig Renold (someone who developed the algorithm in 1986).
So I tried to replicate it on my own for a while, so far with out sucess. But hopefully I’ll find a way in the next few days (I may have to peek onto the source code on the Processing.org site version, hopefully not as I want the challenge)
As someone who likes to look at behavioural psychology, I think flocking is one of the greatest phenomena in nature, and its amazing to see flocking occur (most impressive are birds, which take 3-dimensional motions). And to think that it can be really replicated in mathematical terms is even more impressive.

Psychologically speaking, flocking is very simple. Mathematically speaking, its almost impossible to generally create (make it actually look like behaviour).

The above image is from a PDF on the web, have no idea where now (its been on my hard drive for about a year now). It talks simply about simple mathematical algorithms in a very simple manner that is applicable to any computer language (like pseudocode, but even simpler). Some algorithms are circle/object packaging, tiling, weaving, blending, cracking. The above image shows the underlying concepts of flocking. Below is what it says on the image:

Recipe for Flocking

For each agent for each increment of time:

  • Avoid crowding local flock-mates. Steer to keep a minimum distance between each agent and the ones around it.
  • Align towards the average heading of local flockmates.
  • Cohere to the flock, move towards the center of mass of local flockmates

Well, that seems easy, right? Its just two simple rules! If too close, make agent turn away. If too far, but close, make agent turn towards nearest center of mass. Sadly, it is something quite difficult, as it is hard to define center of masses and how to make something go towards something in a non-weird behaviour.

I found some great examples online. One of them stood out in particular. I particulary like the one linked because it also contains objects, food and predators, something that I initially wanted. A simpler example is one from the Processing.org site, which is originally based in Craig Renold (someone who developed the algorithm in 1986).

So I tried to replicate it on my own for a while, so far with out sucess. But hopefully I’ll find a way in the next few days (I may have to peek onto the source code on the Processing.org site version, hopefully not as I want the challenge)

As someone who likes to look at behavioural psychology, I think flocking is one of the greatest phenomena in nature, and its amazing to see flocking occur (most impressive are birds, which take 3-dimensional motions). And to think that it can be really replicated in mathematical terms is even more impressive.