This piece is simply based on this little bit of code
(x ^ y) % 3
then rearanged, and limited to the circles. This is just plain js, html, css with the use of the canvas.
You can see it online here : https://sthor.github.io/XORcircles/ and play with some parameters :
canvas.settings={
cellWidth:1,
radius:150,
modulo:3
};canvas.drawStuff();