N / Squares

Family / Two seeds, eight labeled views

Change the view.
Keep the rule explicit.

Compare eight orientations of a finite modular grid. Each panel uses N = 8 and phase k = 1; values remain visible alongside color.

The forward / backward family

The labels below identify the displayed constructions. Horizontal and vertical reflections act on the coordinates; neither changes the chosen phase. All indices run from 1 through N.

Two seeds.
Declared reflections.

Let mod mean the nonnegative remainder. Wrapping returns an integer to the range 1 through N:

wrapN(x,N) = ((x − 1) mod N) + 1

TRB(r,c) = (((r − 1) · c + k − 1) mod N) + 1

TLF(r,c) = (((r − 1) · wrapN(c − 1,N) + k − 1) mod N) + 1

H(c) = N − c + 1
V(r) = N − r + 1

TRF
TLF(r, H(c))
BLF
TLF(V(r), c)
BRF
TLF(V(r), H(c))
TLB
TRB(r, H(c))
BLB
TRB(V(r), H(c))
BRB
TRB(V(r), c)

The shorthand suppresses the unchanged k and N arguments. Use the explicit seed when comparing another tool’s indexing or display convention. A color pattern is a visualization of these values; it is not additional mathematical evidence.

One equivalent formula

For integer N ≥ 2 and coordinates and phase r,c,k in 1 through N, write [x]_N for the nonnegative remainder in 0 through N−1. The eight named formulas can also be written as:

Aα,β,s(r,c,k,N) = 1 + [s(r−α)(c−β) + (k−1)]N

Here α and β are each 0 or 1, and s is +1 or −1.

Eight named parameter choices
Nameαβs
TLF11+1
TRF10−1
BLF01−1
BRF00+1
TLB11−1
TRB10+1
BLB01+1
BRB00−1

This is an equivalent description of the seeds and reflections above. The wrapped TLF column factor is congruent to c−1 modulo N; reflection gives H(c)−1 congruent to −c and V(r)−1 congruent to −r. Reflecting the TRB seed horizontally, H(c) is congruent to −(c−1).

The names identify eight parameter choices, which need not produce eight different grids at every size. For example, positive and negative signs agree modulo 2. The final N wrap and +1 remain part of every formula.

An earlier interactive version

The legacy family instrument retains variable size and phase plus individual-image and sprite-sheet export controls. Its grids initialized in a browser smoke check; control changes and exports remain unverified.

The definitions on this page remain the reference for the two seeds and eight named choices. Similar pictures alone do not establish that older transforms use the same conventions. Find other retained instruments in Guides & archive.