Here you can see some balls in action. You can switch the gravitation on or off.

Just watch it for a while.

This is a game with balls attracting or repulsing each other.

It is pre-set that balls of the same colour attract and balls of different colour repulse each other. You can change these interactions in different senses, for instance by switching attracting forces into repulsing ones. So, it may happen that the red balls are attracted by the blue balls, but that those are repulsed as if they were running away from them.

You are invited to play around with these interactions.

In ths simulation, there is a similar cyclic relationship of dominance, but this time with attracting and repulsing "magnetic" forces.

You can select these forces. If a ball has changed colour, it also adopts the behaviour of his new family.