Starting interactive Python…
Initializing...
A small matrix becomes a creature when selected entries move around a complex torus. Inspired by Simone Conradi.

Shape the matrix

Drag or press Enter to edit. Matrix codes: −2 = −i, −1, 0, 1, 2 = i. Set the same position to 1 in the variable mask to sample it from the torus.