Anyway, this is what I have managed thus far.
Boundary detection. The circles change direction when they hit the container boundary and fade when they cross each other’s area. The line between the two was just to help me verify the distance was being calculated from the center.
[iframe src=”http://noconceptoftime.net/ballvas.html” width=”630″ height=”610″]
Reverse direction on collision. Added a visible border for the container boundary too.
[iframe src=”http://noconceptoftime.net/ballvas2.html” width=”630″ height=”610″]
Every time the circles collides, the larger one steals a bit of mass from the smaller one.
[iframe src=”http://noconceptoftime.net/ballvas3.html” width=”630″ height=”610″]
The larger on steals mass and color on collision.
[iframe src=”http://noconceptoftime.net/ballvas4.html” width=”630″ height=”610″]