You see that there’s $xodd = ($xnum % 2 > 1); and $yodd = ($ynum % 2 > 1);. You know that it’s impossible for x % 2 to be bigger than 1. Yet when I replace the > with a >=, nothing changes in the script.
How? Or maybe the output changes and I just didn’t notice?
hmm… maybe you are thinking that u and v are pixel/texel coordinates (integers)?
if you create simple SeExpr, you will notice that u and v are floats in range [0.0, 1.0] (NOT pixel coordinates)
# u is in range [0.0 .. 1.0] -> from canvas [left_border .. right_border]
# v is in range [0.0 .. 1.0] -> from canvas [top_border .. bottom_border]
$u_remainder = (5.0 * $u) % 2.0;
$v_remainder = (5.0 * $v) % 2.0;
$color = [$u_remainder > 1.0, $v_remainder > 1.0, 0.0];
$color
so change of > to >= changes checker board cell splitting in ultra rare cases by one pixel (but most of the time it will not change anything, it would only change the case where pixel is exactly at infinitely thin cell splitting line)