# Balanced base 2+i (and some gratuitous fractals)

Traditional numeral systems, such as binary, decimal, and dozenal, let us represent non-negative numbers in a systematic way. When we want to write down a negative number, we write a $-$ sign followed by a positive number. There are other numeral systems, such as balanced ternary, that let us write down both positive and negative numbers in a seamless, systematic way.

Balanced ternary, like ternary (base three), is based on powers of three, but unlike ternary, whose digits are 0, 1, and 2, the digits used in balanced ternary are 0, 1, and 1, the last of which represents negative one.  As in binary, the product of any two digits is a digit, which can simplify multiplication, but the symmetry around 0 means that to negate a number, you just turn each digit upside down.

Donald Knuth apparently called balanced ternary “perhaps the prettiest number system of all”, but even in balanced ternary, complex numbers have to be written as a real number plus the product of a real number with $i$, the imaginary unit.  Can we represent all complex numbers in a seamless, systematic way? Continue reading Balanced base 2+i (and some gratuitous fractals)

# A triangular space-filling curve

Yesterday, I showed you a snowflake.  Today, I’m going to try to explain it. [EDIT: There’s a couple of animations at the end, if you’re not interested in the explanation.]

I was inspired by a space-filling curve called the Hilbert curve.  I wondered how to define a space-filling curve where the successive approximations were based on a triangular grid, rather than a square grid.  So, given a grid like this:we want a path from the bottom-left dot to the bottom right dot (as indicated), passing exactly once through all the other dots in the grid. Continue reading A triangular space-filling curve

# A snowflake

I intend to write later about the design of this picture.