A Bauhaus style poster.
A Bauhaus style poster.
One line… that repeatedly splits, albeit without (mostly) crossing itself.
Fractal trees GO!
splitChance controls how quickly the line branchesminChildren / maxChildren controls branchingangleRange is how many radians the new branches can change byrandomizeAngles controls if child angles are random/evenly spacedspacing is roughly how spread out the tree ispauseOnResetFor / stopOnReset controls what happens when a tree is donecolorMode changes drawing colorsanchor changes where the tree startsIt does get a bit sluggish, especially if you have a high number of children.
I’m… not really sure where I was going with this one. 😄
Basically, 16x16 tiny sketches that slide around like a sliding block puzzle. Although with how chaotic some of the simulations are, it’s not always easy to see.
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 modeU turn 180° in hex modeN above), do nothing/go straightThis 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!
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 mentionedsubGroup is horizontal or vertical for some of the abovecellType is the shape of each cellcellStyle is what to fill them withdebugDrawOne shows what one tile looks likedebugDisplay prints what random values were selectedpauseBuffer 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!
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 runsminAgentCount will spawn agents until you reach this numbermaxAgentCount will kill off agents until you’re under this numberdieOfOldAge will kill off old agentsmaxAge is the longest an agent can lastagentRatio of 0 is all order and 1 is all chaosspawnRate 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 resettingpauseOnReset will pause on a reset to allow downloading! (change any setting include this one to unpause)Create an invisible object where only the shadows can be seen.
Noise that pushes a bunch of particles around on the screen. There is 1 (or more) ‘shadows’ on the screen that push the dust away.
If the shadow runs off the screen it will come back in a bit from the opposite edge.
Settings:
dustCount is how much dustdustSpeed is a multiplier for how fast the dust goes per framedustDieOff is how much dust disappears each frameonlyEdgeDust sets dust to only spawn on the edges, rather than anywhere (has some weird visual artifacts when the dust is a nearly horizontal / vertical)rainbowDust makes the dust far more colorfulwindScale is the scale of the noise, 1 will wiggle a lot more, 5 is closer to straight lines and slow changesfade will leave trails by fading the screen; turning this off is interesting since the shadow will be much more subtleshadowCount is how many shadows there areshadowForce is how strongly they repel dustshadowWindIndependent means the shadow doesn’t always move with the particlesshadowEdge will show where the shadow shape actually isshadowsMove will allow the shadows to move / stop themBasically, we’ll pack as many circles in as we can!
retriesPerFrame is how many circles it will try to place before giving up and drawing the frameminDiameter is the smallest a circle can be (this should be 1 for a ‘perfect fit’)maxDiameter is the largest one can bespacing is how much space to leave between circles (this should be 0 a ‘perfect fit’)borders will draw a black border on each circlefillInside will place circles inside of each other as well as outside, so long as there is still enough spacingblackPercent is how many of the circles will be black rather than bright colorsThat was surprisingly fun.
Basically, it will take recursively divide the picture over time. Each time, it will find the node with the largest error (real image color compared to the current random color) and split it in 4, assigning each to the nearest random color from our palette.
colors controls how many maximum (random) colors will be chosenedges will draw the boxes of the treeminimumBlock is the size at which it won’t split any moreresetAfter will generate new colors even this many framesevenSplit will split each box into exactly 4; if this is off, each axis will randomly be 25-75%weightErrorBySize will split small boxes earlier; with this off, larger boxes have more error because they are largerIf you don’t want to look at me any more, turning off selfPortraitMode will load an image from picsum.dev.
It’s like draw a box. But somehow even more. And automatic.
If you let it run for a while, you get some crazy abstract art!
