frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

https://chriskw.xyz/2025/05/21/Fractal/
571•chriskw•5mo ago

Comments

taeric•5mo ago
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!
CBLT•5mo ago
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.
chriskw•5mo ago
The post presents it a bit out of order, but it was mostly from realizing at some point that the way the fractal grows by a factor of 5, base 5 number systems, and the "spiral" mentioned in the post can all fit together. I also thought a lot about how to programmatically draw the fractal and a natural way would be to start from the middle and zoom out.

There's an apocryphal story about Richard Feynman about how he used to keep a dozen or so random problems in the back of his mind and made a little bit of progress on them every time he saw a connection, until finally he'd solve one and everyone would think he magically figured it out instantly. This was a bit similar except I'm not nearly at that level and I've only been able to do that for one problem instead of a dozen.

leni536•5mo ago
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.

leni536•5mo ago
Found a space-filling curve for the wallflower:

https://onlinetools.com/math/l-system-generator?draw=ABCD&sk...

The previous one fills out the Koch island.

chriskw•5mo ago
That's really cool! I tried to get something to work last week on pen and paper but couldn't get anything to stick. Is there a strategy you used or did you just go by feel?

Edit: just noticed how you encoded a flip (AB <--> CD) between iterations like how the matrix flips the orientation of space. Super neat!

leni536•5mo ago
> noticed how you encoded a flip (AB <--> CD)

Exactly! There is also a less obvious relationship between A and B too: B is a A "backwards" (A rotated 180°, starting the curve from the opposite end).

The strategy was to put 5 lines on the plus sign on the sides of the 5 cells, with the idea that each line eventually fills out a neighboring cell in subsequent iterations. I found one such path that had a chance of working. Not sure if this makes sense.

entropicdrifter•5mo ago
Kinda looks like a propeller
shermantanktop•5mo ago
Things with four arms that all curve the same way unfortunately tend to look swastika-ish.
leni536•5mo ago
The the arms of the author's "wallflower" fractal don't seem to curve, as opposed to the other, similar fractal (quadratic von Koch island). Which can be explained by each iteration adding a mirroring.
winnit•5mo ago
The unfortunate thing here is that the swastika was appropriated by a genocidal regime. The symbol still has a totally different life in India and Japan.
bdamm•5mo ago
That was fun.
nico•5mo ago
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

Iwan-Zotow•5mo ago
Curious if it would work in 3D
nico•5mo ago
Very interesting! I wonder what that would look like

Right now, roughly, the algorithm recursively divides the image by doing decimation (ie. picking every other pixel), and keeps the decimated pixels as a second image

Not sure how that algorithm would apply to a 3d data structure

Do you know how 3d objects/images are usually represented?

It would be cool to recursively decompose a 3d object into smaller versions of itself :)

Scene_Cast2•5mo ago
I wonder if something similar can be applied to get a dither pattern with built-in level of detail adjustment.
cess11•5mo ago
Nice writeup. The Heighway dragon of Jurassic Park fame is pretty neat too.

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

CliffStoll•5mo ago
Outstanding work and a delightful read.
chriskw•5mo ago
Thanks Cliff, it means a ton coming from you! The videos from you and all the other folks on Numberphile always inspired me to see the beauty in math growing up :)
speeder•5mo ago
Please you two, make an awesome YouTube vídeo out of this. It is fascinating and beatiful and deserves a chance to viralize a little :)
sakesun•5mo ago
Wow
tcshit•5mo ago
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.
leephillips•5mo ago
Isn’t that it on the left in the last image?
tcshit•5mo ago
Yeah, maybe it is. It would be cool to make it much bigger, frame it and put it on the wall. Or create a mosaic tiled artwork, similar to Knuth’s dragon curve wall.
chriskw•5mo ago
Yeah, it's in the last image and in the thumbnail at very top (which I realize now is really hard to spot on mobile), intentionally not in the spotlight to leave space for the twist at the end.

https://chriskw.xyz/images/fractal/thumbnail.jpg

I think it would work perfectly as a mosaic eventually, but for the time being I'm perfectly content with the "rustic" 8x11 graph paper sized one taped to the wall. Currently planning to put up a slice of the orthotopeflower as a companion piece once I find matches for the colored pencils I used back then.

matt3210•5mo ago
Now make a tiling game engine that uses these!
Cogito•5mo ago
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
cies•5mo ago
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. :)

baq•5mo ago
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?

chriskw•5mo ago
I'm by no means a parenting expert, but my answer would be anything related to something they feel passion or wonder for in the moment. I snuck in a paragraph near the end about burnout. At the root of the problem for me was that I lost the feeling of fascination and curiosity I had for math and programming, and doing this write-up helped me tap into that feeling of childlike wonder that used to come easily.
Tade0•5mo ago
> 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.

867-5309•5mo ago
well, that escalated beautifully
kragen•5mo ago
This is beautiful. Thank you.
mathfailure•5mo ago
Too much math.
wistlo•5mo ago
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.

mckeed•5mo ago
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.

mbty•5mo ago
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.

chriskw•4mo ago
Good catch, corrected the formula!

Microsoft 365 Copilot – Arbitrary Data Exfiltration via Mermaid Diagrams

https://www.adamlogue.com/microsoft-365-copilot-arbitrary-data-exfiltration-via-mermaid-diagrams-...
57•gnabgib•2h ago•12 comments

Show HN: MyraOS – My 32-bit operating system in C and ASM (Hack Club project)

https://github.com/dvir-biton/MyraOS
90•dvirbt•4h ago•8 comments

Are-we-fast-yet implementations in Oberon, C++, C, Pascal, Micron and Luon

https://github.com/rochus-keller/Are-we-fast-yet
23•luismedel•2h ago•1 comments

A definition of AGI

https://arxiv.org/abs/2510.18212
130•pegasus•7h ago•203 comments

Sandhill cranes have adopted a Canada gosling

https://www.smithsonianmag.com/science-nature/these-sandhill-cranes-have-adopted-a-canadian-gosli...
17•NaOH•4d ago•1 comments

You already have a Git server

https://maurycyz.com/misc/easy_git/
386•chmaynard•14h ago•312 comments

Ken Thompson recalls Unix's rowdy, lock-picking origins

https://thenewstack.io/ken-thompson-recalls-unixs-rowdy-lock-picking-origins/
72•dxs•8h ago•2 comments

NORAD’s Cheyenne Mountain Combat Center, c.1966

https://flashbak.com/norad-cheyenne-mountain-combat-center-478804/
81•zdw•5d ago•38 comments

A bug that taught me more about PyTorch than years of using it

https://elanapearl.github.io/blog/2025/the-bug-that-taught-me-pytorch/
324•bblcla•3d ago•66 comments

Poison, Poison Everywhere

https://loeber.substack.com/p/29-poison-poison-everywhere
81•dividendpayee•2h ago•34 comments

System.LongBool

https://docwiki.embarcadero.com/Libraries/Sydney/en/System.LongBool
32•surprisetalk•4d ago•25 comments

AI Mafia Network – An interactive visualization

https://dipakwani.com/ai-mafia/
64•dipakwani•2h ago•6 comments

Wren: A classy little scripting language

https://wren.io/
115•Lyngbakr•4d ago•33 comments

Show HN: Helium Browser for Android with extensions support, based on Vanadium

https://github.com/jqssun/android-helium-browser
21•jqssun•2h ago•5 comments

ICE Will Use AI to Surveil Social Media

https://jacobin.com/2025/10/ice-zignal-surveillance-social-media
10•throwaway81523•33m ago•0 comments

Asbestosis

https://diamondgeezer.blogspot.com/2025/10/asbestosis.html
213•zeristor•16h ago•157 comments

Making the Electron Microscope

https://www.asimov.press/p/electron-microscope
57•mailyk•8h ago•6 comments

Feed the bots

https://maurycyz.com/misc/the_cost_of_trash/
147•chmaynard•13h ago•103 comments

Alzheimer's disrupts circadian rhythms of plaque-clearing brain cells

https://medicine.washu.edu/news/alzheimers-disrupts-circadian-rhythms-of-plaque-clearing-brain-ce...
144•gmays•7h ago•27 comments

Eavesdropping on Internal Networks via Unencrypted Satellites

https://satcom.sysnet.ucsd.edu/
173•Bogdanp•6d ago•28 comments

Researchers demonstrate centimetre-level positioning using smartwatches

https://www.otago.ac.nz/news/newsroom/researchers-demonstrate-centimetre-level-positioning-using-...
14•geox•6d ago•4 comments

Pico-Banana-400k

https://github.com/apple/pico-banana-400k
356•dvrp•23h ago•60 comments

Downloadable movie posters from the 40s, 50s, 60s, and 70s

https://hrc.contentdm.oclc.org/digital/collection/p15878coll84/search
404•bookofjoe•1w ago•79 comments

Resource use matters, but material footprints are a poor way to measure it

https://ourworldindata.org/material-footprint-limitations
11•surprisetalk•10h ago•2 comments

Formal Reasoning [pdf]

https://cs.ru.nl/~freek/courses/fr-2025/public/fr.pdf
119•Thom2503•13h ago•27 comments

Validating your ideas on strangers (2017)

https://jeremyaboyd.com/post/validating-your-ideas-on-strangers
60•tacon•2d ago•31 comments

Why your social.org files can have millions of lines without performance issues

https://en.andros.dev/blog/4e12225f/why-your-socialorg-files-can-have-millions-of-lines-without-a...
79•andros•1d ago•8 comments

We Saved $500k per Year by Rolling Our Own "S3"

https://engineering.nanit.com/how-we-saved-500-000-per-year-by-rolling-our-own-s3-6caec1ee1143
14•mpweiher•4h ago•1 comments

Nvidia DGX Spark: When benchmark numbers meet production reality

https://publish.obsidian.md/aixplore/Practical+Applications/dgx-lab-benchmarks-vs-reality-day-4
126•RyeCatcher•7h ago•82 comments

Advent of Code 2025: Number of puzzles reduce from 25 to 12 for the first time

https://adventofcode.com/2025/about#faq_num_days
407•vismit2000•16h ago•198 comments