Warring floodfill cellular automata

Each pixel is an automaton, having a colour and targeting another.

The canvas starts blank. Two dots of one colour are placed along a radial line, 25 and 100 pixels away from the centre, and along the same line another colour, 62½ away.

A pixel encountering a targeted-colour neighbour will devour it half the time, substituting a self-replica.

Rarely, a pixel goes rogue, targeting a differently-coloured neighbour.

It iterates thirty times per second, but renders as often as possible.

This is an older version of the code which is biased towards the bottom-right corner due to a bug. The latest version lacks this issue.