It turns out that we can express points in the complex plane as expansions
in terms of powers of -1+i.
Knuth, Gilbert, and others wrote about this quite a long
time ago (1960s and 70s).
w=1+i instead of -1+i, you don't get the whole complex plane; you get
a dragon curve instead (Gilbert and many others write about this; I will add links at some point).
This is comparible to getting all positive integers in binary expansion,
and all integers in terms of powers of -2.
This program shows the w=1+i case;
for the w=-1+i case see here.
layout: portrait/landscape (change for wide enough screens)
Expansion (for last drawn point):
0=0
0=0
0=0
Spiral:
Grid:
Map from integers to Gausian integers
In the figure,
a square of side length 1 and centre at points of the form (a,b), with
a,b integers, is coloured in if f(a,b) is less than the coefficients parameter,
for a certain function f, described as follows.
For a positive integer T, we can write T in a binary expansion,
T=a0 + a12 + a222 +
a323 + ... + an2n
with the coefficients ai being either 0 or 1.
This series ends after finitely many terms.
So from a positive integer T, we get a sequence (a0,
a1,
a2, ..., an), where the number of terms, n, depends on T.
E.g., 11=1+2+8 gives us the sequence (1,1,0,1)
Given any binary sequence,
(a0,
a1,
a2, ..., an), we can construct a Gausian integer
(wikipedia page)
S=a0 + a1w + a2w2 +
a3w3 + ... + anwn
where w=1+i (where i is the square root of -1).
So, we can take any non negative
integer T, write it in binary, and convert to a Gausian integer S,
so we get a function F(T).
When w=1+i, we don't get all Gaussian integers written in this way; we get either z or -z.
Controls
The coefficients slider changes the maximum value of T for which the points are
drawn, i.e, draw point (a+ib) if f(a,b)<=T.
The colour slider changes how the point (a,b) is coloured.
The strip at the left of the image indicates the colour scale.
The point of the various colour schemes is to indicate
various corresponding tilings of the
plane.
The grid is grid of lines with an integer coordinate.
The spiral passes through the powers of w=(1+i), which form the basis
of the expansion. The spiral line gives points on a line parameterised by
f(t) = wt. When t is an integer, the point on the spiral will
coincide with a Gausian integer. You can see an invariance under multiplication
by w in the whole picture.