A Matlab implementation to Wolfram's community "Dancing with friends and enemies"
The color cube - Color in 3D
Any color may be created by a mixture of 3 colors: Red, Green and Blue [R, G, B].
If we think of a space where each axis represent the concentration of a the [R, G, B] colors (0=not at all, 1=as green as it gets), each point in this color cube represents a unique color.
This simple particle animation is just fascinating to watch (code). The simulation defines 2 populations with a shared center. In the first half of the simulation, one of the populations (the multicolored one) is pulled outward from the center in random directions. In the second half of the simulation the multicolored population is drawn back to the center while the other (light blue) population expands out.