It's May 7, 2026 afternoon just now. Earlier today, I saw a painting called "Movement in Squares". Here's a rough recreation.
$f\in\{0,1\}^{[0,1)\times [0,1)}$
$[0,1)=\bigcup_{n\in [0,k)_{\mathbb{N}}}[\frac{n}{k},\frac{n+1}{k})$
$\text{Odd}_k=\bigcup_{n\in [0,k)_{\mathbb{N}},n\text{ is odd}} [\frac{n}{k},\frac{n+1}{k})$
$\text{Even}_k=\bigcup_{n\in [0,k)_{\mathbb{N}},n\text{ is even}} [\frac{n}{k},\frac{n+1}{k})=[0,1)-\text{Odd}_k$
checkerboard¶
$f(x,y)=\chi_{\text{Odd}_{12}}(y)\chi_{\text{Even}_{12}}(x)+\chi_{\text{Even}_{12}}(y)\chi_{\text{Odd}_{12}}(x)$
In [17]:
import math
import numpy as np
import matplotlib.pyplot as plt
res = 1000
x = np.linspace(0, 1, res)
y = np.linspace(0, 1, res)
X, Y = np.meshgrid(x, y)
def chi_odd(k, x):
assert 0 <= x <= 1
n = math.floor(x * k + 1e-10)
if n % 2 != 0:
return 1
else:
return 0
def chi_even(k,x):
return 1 - chi_odd(k,x)
def g(x):
return 12 + math.floor(\
12 * np.exp(-25 * np.abs(x - (2/3)))\
)
def f(x,y):
return chi_odd(12,y) * chi_even(g(x),x)\
+ chi_even(12,y) * chi_odd(g(x),x)
Z = np.vectorize(f)(X, Y)
plt.figure(figsize=(6, 6))
plt.axis('off')
plt.imshow(
Z, extent=[0, 1, 0, 1],\
origin='lower', cmap='Greys_r'\
)
plt.show()