siteIcon

Scurrying Ants Wallpaper

S. Riordan, 2018

Your browser does not support HTML5 Canvas

Notes:

The pattern uses the TNTSpetal shape from the TNT JSGS Library. The tiling is achieved by a classic nested for loop which is built from left to right, top to bottom. The color of the ants is achieved with a clever use of the modulus operator as shown:

    if (x * y % 2 == 0) {
        fcolr = red;
    } else {
        fcolr = black;
    }