The formula

I don't draw your signs. I let the sky set the numbers in one formula, and I work it out for each of the 65,536 points of a 256×256 picture. Here it is, written out, with the second of today's four made-up people (Sun in Scorpio, Leo rising, in London) worked through step by step. The same sky and the same birth always give the same picture.

Below, & is bitwise AND, | is bitwise OR, >> shifts bits right (>> 1 halves), and mod always gives an answer with the divisor's sign.

1. One formula

For a point at grid position (u, v):

d     = (b & u) − (v − k)
value = ((u − v) | −u) mod d
black when (value mod 8) ≥ 8 − s

When d is 0, value is 0.

The Moon's phase, from 0 at the new moon to 1 at the next, sets the three constants:

n = floor(phase × 29.53)
L = (1 − cos(2π × phase)) / 2
b = 13 + 4 × (n mod 7)
k = n + 3
s = round(5 − 3L)

n is the night of the lunar month and L how much of the Moon is lit. b is a bit mask that weaves differently each night, k an offset, and s how many of the 8 possible values are black: 5 at the new moon, 2 at the full.

Written in binary, −u is long runs of ones, so OR-ing it with u − v makes stepped bands. Dividing by d, which mixes u and v again, breaks the bands into triangles and lattices.

Today: waning crescent, phase 0.89, so n = 26, L = 0.11, b = 33, k = 29 and s = 5. On the plain grid (u = x/2, v = y/2, every cell 2×2 points) that alone draws this, the same for everyone today:

The bare formula for today, the same for everyone

2. Moving the grid

Before the formula, each point (x, y) is moved to (u, v), in this order:

  1. The sign rising where you are, at noon UTC (r, from 0 for Aries to 11 for Pisces): r mod 4 turns the grid by 0°, 90°, 180° or 270°, and r mod 3 leaves it, mirrors it top to bottom (v → 255 − v), or slants it (u → u + v/4).
  2. A waning Moon (phase ≥ 0.5) mirrors it left to right (u → 255 − u), so the two halves of the month run in opposite directions.
  3. Your Sun sign's quality: cardinal leaves it; fixed folds u at its middle (u → 255 − u past 128); mutable folds u and v.
  4. Your Sun sign's element: fire turns it on the diagonal, (u, v) → ((u + v)/2, v − u); earth steps it, u → u + 8 × floor(v/32); air slants it, u → u + v/2; water waves it, u → u + round(14 sin((v + Sy)/19)).
  5. Your rising sign, if you gave a birth time and place, sets a pivot p = 48 + (floor(4 × ascendant) mod 160), and one of four folds about the point (p, 255 − p).
  6. The slide, then halving, which makes every cell 2×2 points:
    u = ((u + Sx) mod 256) >> 1
    v = ((v + Sy) mod 256) >> 1
    
    Sx = (floor(2 × birth Sun) mod 113)
       + floor(degree rising here)
       + floor(3 × ascendant)
    
    Sy = (floor(birth Mercury + Venus + Mars) mod 103)
       + floor(degree rising here / 3)
       + floor(2 × midheaven)

    The ascendant and midheaven count only with a birth time and place.

  7. The Moon's sign today, mod 4, sets the grain: nothing, u rounded down to an even number, v + u/8, or u + (v/4) mod 4.

Today, for this person: Aquarius is rising in London, so the grid is turned 180° and is mirrored top to bottom. The Moon is waning, so it is mirrored. The Sun sign is fixed and water. The rising sign's fold widens in steps away from the pivot (p = 69). The slide is Sx = 713, Sy = 172, and the grain adds (v/4) mod 4 to u.

Today's formula after the grid is moved for a Sun in Scorpio, Leo rising, in London

3. The lines

I compare today's Sun, Moon and planets, Mercury to Saturn, with the points of your birth chart: your Sun and Mercury to Saturn, and with a birth time also your Moon, rising sign and midheaven. For the three closest aspects (conjunction 0°, sextile 60°, square 90°, trine 120°, opposition 180°) within 6° of exact, black and white swap wherever:

((x − 127.5) cos θ + (y − 127.5) sin θ) mod P < w
θ = birth point's longitude + aspect's angle
P = 34 + 14 × angle / 60
w = 1 + 5 × (1 − degrees off exact / 6)

P is the spacing of the lines, 34 to 76 points, and w their width, 1 to 6 points. That lays parallel lines across the picture at an angle set by your chart: bolder the closer the aspect.

Today, for this person: today's Sun trine the birth Jupiter (w = 5.93), today's Jupiter square the birth Venus (w = 5.89) and today's Sun trine the birth midheaven (w = 5.80). South of the equator the picture is mirrored left to right at the end, because the sky is seen the other way round there. This is the finished picture:

Today's finished picture for a Sun in Scorpio, Leo rising, in London

Where the sky's numbers come from

I work out the sky myself, without asking anyone. The positions use short, well-known formulas (Meeus for the Sun and Moon, JPL's approximate orbits for the planets), good to a fraction of a degree between 1900 and 2050, which is plenty for a sign: the Sun's mean position corrected for Earth's elliptical orbit, the Moon's with about ten periodic corrections, and each planet's orbit seen from Earth's. Today's sky is taken at noon UTC on your local date. The rising degree comes from local sidereal time θ, the tilt of Earth's axis ε and your latitude φ:

ascendant = atan2(cos θ, −(sin θ cos ε + tan φ sin ε))

Signs are the tropical zodiac: 30° each, starting where the Sun is at the March equinox.

Back to the start