Series: Genuary 2026

Recent posts (Page 1 of 3)

Genuary 2026.20: One line

Genuary 2026.20: One line

One line… that repeatedly splits, albeit without (mostly) crossing itself.

Fractal trees GO!

  • splitChance controls how quickly the line branches
  • minChildren / maxChildren controls branching
  • angleRange is how many radians the new branches can change by
  • randomizeAngles controls if child angles are random/evenly spaced
  • spacing is roughly how spread out the tree is
  • pauseOnResetFor / stopOnReset controls what happens when a tree is done
  • colorMode changes drawing colors
  • anchor changes where the tree starts

It does get a bit sluggish, especially if you have a high number of children.

read more...

Genuary 2026.18: Unexpected paths

Genuary 2026.18: Unexpected paths

I feel like the most unexpected of paths is Langton’s Ant!.

Okay, it’s fairly expected. And I’ve even done it before. Been a while though.

Anyways, here we go!

In a nutshell, you have a grid with N possible values (the length of the rule string). For each pattern, when the ‘ant’ walks on that cell, the value in incremented by one and you will turn according to these rules:

  • R turn right (90° or 60° in hex)
  • L turn left (same)
  • S turn right 120° in hex mode (nothing in square)
  • M turn left 120° in hex mode
  • U turn 180° in hex mode
  • anything else (N above), do nothing/go straight

This ends up with some really interesting behavior for such a short ruleset. Langton’s Ant (LR, the default) is definitely an interesting one. For 10,000 ticks, you get chaotic behavior… and then suddenly it stabilizes!

Here are some interesting patterns:

You can also do some interesting things with multiple ants (they’ll spawn in a circle):

The modes are:

  • pauseMode controls when the simulation will stop (note: will always pause at width * height * 100 tiles)

    • n-tiles will pause when the tile count is width * height (no matter where they are)
    • one-at-edge will stop when each cell is 1 pixel and any ant reaches the edge of the image
    • all-at-edge will only stop when all ants reach the edge
    • no-pause will never pause (this can get really laggy eventually)
  • centerMode is how the displayed part of the simulation will be centered

    • origin will stay centered at 0,0
    • bounds will center on the middle of the current overall bounds
    • ants will average the x,y of all ants
    • tiles will average the x,y of all tiles
    • mouse will allow some mouse control; left click and drag to move, right click (in theory) to reset

read more...

Genuary 2026.17: Wallpaper Groups

Genuary 2026.17: Wallpaper Groups

Wallpaper group. There are only 17 ways to cover a plane with a repeating pattern, choose your favourite on this page: Wallpaper group

This is a great article about Classifying Symmetries that says there are actually 35 tiling patterns!

List of planar symmetry groups is another Wikipedia page with a good summary of the wallpaper group.

I spent waaaaay too long on this one.

  • group is the 17 groups mentioned
  • subGroup is horizontal or vertical for some of the above
  • cellType is the shape of each cell
  • cellStyle is what to fill them with
  • debugDrawOne shows what one tile looks like
  • debugDisplay prints what random values were selected
  • pauseBuffer is useful for pausing the generation (although if any of the others are random they will keep changing)

Not all of the groups and cell types are perfectly compatible. In fact, probably half or more aren’t. But they still produce something, and I think that’s pretty cool!

read more...

Genuary 2026.16: Order vs Disorder

Genuary 2026.16: Order vs Disorder

Order vs Disorder

So I have two kinds of agents: Order, which always moves in straight lines and Chaos which… doesn’t!

Settings:

  • updateRate is how fast it runs
  • minAgentCount will spawn agents until you reach this number
  • maxAgentCount will kill off agents until you’re under this number
  • dieOfOldAge will kill off old agents
  • maxAge is the longest an agent can last
  • agentRatio of 0 is all order and 1 is all chaos
  • spawnRate is how often an agent will spawn a new agent (of the same kind)
  • resetPercent is how much of the screen can be full before resetting
  • pauseOnReset will pause on a reset to allow downloading! (change any setting include this one to unpause)

read more...


All posts