That fractal that's been up on my wall for years

(chriskw.xyz)

Comments

CliffStoll 22 May 2025
Outstanding work and a delightful read.
nico 22 May 2025
Amazing insightful and thoughtful write up, thank you!

Loved the 3d visualizations

It reminds me of this thing I built some time ago while playing with recursive decimation to generate effects similar to fractals from any image

You can play with it here: https://jsfiddle.net/nicobrenner/a1t869qf/

Just press Blursort 2x2 a couple of times to generate a few frames and then click Animate

You can also copy/paste images into it

There’s no backend, it all just runs on the browser

Don’t recommend it on mobile

leni536 22 May 2025
Got a bit nerd-sniped by this and came up with an L-system that fills out (I think) "the wallflower":

https://onlinetools.com/math/l-system-generator?draw=AB&skip...

edit: On second thought, this probably generates the other fractal, but I'm not sure.

taeric 22 May 2025
Holy cow, I was expecting a quick read. Wound up having to skim some, as I need to get some work today. Will be coming back to this to play with some. Really well done!
baq 23 May 2025
This went much deeper and harder than expected. One has to admire the dedication.

Question to the author: what would you recommend to hang on my kid’s wall today?

Cogito 23 May 2025
Thought I'd check the arithmetic for 2 two-digit numbers, and it works!

I expect 41+14 to be 12 (two right plus two up equals two right and two up).

Long addition in long form below uses:

'=' to show equivalent lines (reordering of terms (1+2=2+1), spliting numbers (41=40+1), adding single digits (1+4=22))

'->' for when the algorithm gives a digit

'<' for when we move over a column

    41+14
    = (40+1)+(10+4)
    = 40 + 10 + (1+4)
    = 40 + 10 + 22
    -> 1s digit = 2
    < 4 + 1 + 2
    = 22 + 2
    = 20 + 2 + 2
    = 20 + 41
    -> 10s digit = 1
    < 2 + 4
    = 0
    -> done
    == 12
[edit] Just noticed the article has two different numbering systems, one where 10, 20, 30, 40 are clockwise and one where they are anticlockwise. In both, 1, 2, 3, 4 are clockwise. My addition is on the second, where 10s are anticlockwise (this is what is used in the addition table).

It still works in the alternative system (14+21 should equal 12)

    14+21
    =10+20+42
    ->2
    <1+2+4
    =13+4
    =10+3+4
    =10+31
    ->1
    <1+3
    =0
    ==12
CBLT 22 May 2025
Well written! Would you mind sharing how you came up with the "middle out" numbering system? I can never seem to come up with something this inspired when I'm doing math problems by myself.
cies 23 May 2025
I had this one up the wall (giant print) at a place I worked:

https://raw.githubusercontent.com/cies/haskell-fractal/refs/... [17MB, sorry Github]

It contains the Haskell code that produced it: https://github.com/cies/haskell-fractal

Especially the `sharpen` function was interesting to come up with (I used some now-offline tool to do curve fitting for me): https://github.com/cies/haskell-fractal/blob/master/fractal....

Fun little project. :)

Tade0 23 May 2025
> Deciding to delegate to a future version of me that knows more math

Relatable. Huge part of my decision on what degree to pursue was a list of problems (mostly linear algebra) I needed to solve, but didn't have the guidance (and internet connection) to.

mbty 29 May 2025
Really cool and in-depth, thank you!

I believe that there is a typo in the pattern formula (right after "Looking closely you might pick up on the pattern"): it should read

  5**(n/2) instead of 5**n
  5**((n-1)/2) instead of 5**(n-1)
(\overrightarrow{10*4} is [0, 25] but your original formula gives [0, 625])

Also, regarding Knuth's mistake: Youtube comments point out that his fractal is in fact correct; he just mistook the beginning point with the end point. Loosely speaking, the fractal is symmetrical about its middle turn, which is precisely the one Knuth believed to be incorrect. All in all, he still made a fractal-related mistake, so the conclusion holds.

tcshit 22 May 2025
Nice writeup! I was hoping to see a photo of the fractal on your wall.. Nice link to Knuth video that I somehow have missed.
mckeed 23 May 2025
Fun post! I drew the first 5 iterations by hand myself and I'm finding it easiest to think of as a self-similar coloring of a square tesselation.

If you start with the shape of iteration 3, it tessellates as a 5x5 square tile. Make an infinite grid of those tile shapes with one iteration 3 version in the center. Treat that center tile as the center square in the iteration 3 pattern and color the tiles around it according to how the 2nd and 3rd iterations were built of squares. This gives you the 4th and 5th iteration and you can continue to iterate on the coloring outwards to color the grid of tiles in the wallflower pattern.

cess11 22 May 2025
Nice writeup. The Heighway dragon of Jurassic Park fame is pretty neat too.

https://en.m.wikipedia.org/wiki/Dragon_curve

wistlo 23 May 2025
This is so much better than reading the news.

Favorited—I'll be coming back to absorb more, as my aging semi-fluency in engineering physics and SQL doesn't help much with the notation I last saw in the 1980s.

Scene_Cast2 22 May 2025
I wonder if something similar can be applied to get a dither pattern with built-in level of detail adjustment.
867-5309 23 May 2025
well, that escalated beautifully
kragen 23 May 2025
This is beautiful. Thank you.
entropicdrifter 22 May 2025
Kinda looks like a propeller
bdamm 22 May 2025
That was fun.
mathfailure 23 May 2025
Too much math.
matt3210 23 May 2025
Now make a tiling game engine that uses these!