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•7mo ago

Comments

taeric•7mo 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•7mo 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•7mo 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•7mo 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•7mo 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•7mo 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•7mo 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•7mo ago
Kinda looks like a propeller
shermantanktop•7mo ago
Things with four arms that all curve the same way unfortunately tend to look swastika-ish.
leni536•7mo 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•7mo 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•7mo ago
That was fun.
nico•7mo 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•7mo ago
Curious if it would work in 3D
nico•7mo 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•7mo ago
I wonder if something similar can be applied to get a dither pattern with built-in level of detail adjustment.
cess11•7mo ago
Nice writeup. The Heighway dragon of Jurassic Park fame is pretty neat too.

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

CliffStoll•7mo ago
Outstanding work and a delightful read.
chriskw•7mo 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•7mo 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•7mo ago
Wow
tcshit•7mo 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•7mo ago
Isn’t that it on the left in the last image?
tcshit•7mo 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•7mo 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•7mo ago
Now make a tiling game engine that uses these!
Cogito•7mo 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•7mo 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•7mo 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•7mo 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•7mo 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•7mo ago
well, that escalated beautifully
kragen•7mo ago
This is beautiful. Thank you.
mathfailure•7mo ago
Too much math.
wistlo•7mo 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•7mo 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•7mo 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•7mo ago
Good catch, corrected the formula!

Sugar industry influenced researchers and blamed fat for CVD (2016)

https://www.ucsf.edu/news/2016/09/404081/sugar-papers-reveal-industry-role-shifting-national-hear...
257•aldarion•3h ago•172 comments

LaTeX Coffee Stains [pdf] (2021)

https://ctan.math.illinois.edu/graphics/pgf/contrib/coffeestains/coffeestains-en.pdf
152•zahrevsky•2h ago•33 comments

Shipmap.org

https://www.shipmap.org/
127•surprisetalk•2h ago•24 comments

Eat Real Food – Introducing the New Pyramid

https://realfood.gov
29•atestu•15m ago•23 comments

A4 Paper Stories

https://susam.net/a4-paper-stories.html
174•blenderob•4h ago•80 comments

The Case for Nushell (2023)

https://www.sophiajt.com/case-for-nushell/
21•ravenical•1h ago•3 comments

Many Hells of WebDAV: Writing a Client/Server in Go

https://candid.dev/blog/many-hells-of-webdav
38•candiddevmike•1h ago•22 comments

Health care data breach affects over 600k patients, Illinois agency says

https://www.nprillinois.org/illinois/2026-01-06/health-care-data-breach-affects-600-000-patients-...
19•toomuchtodo•1h ago•6 comments

Meditation as Wakeful Relaxation: Unclenching Smooth Muscle

https://psychotechnology.substack.com/p/meditation-as-wakeful-relaxation
63•surprisetalk•2h ago•28 comments

The $14 Burrito: Why San Francisco Inflation Feels Higher Than 2.5%

https://www.foglinesf.com/p/the-14-burrito-why-san-francisco-inflation-feels-higher-than-2-5
7•KothuRoti•25m ago•10 comments

Becoming a Centenarian

https://www.newyorker.com/magazine/2025/12/22/becoming-a-centenarian
14•mrjaeger•4d ago•0 comments

BillG the Manager

https://hardcoresoftware.learningbyshipping.com/p/019-billg-the-manager
17•rbanffy•1h ago•0 comments

Creators of Tailwind laid off 75% of their engineering team

https://github.com/tailwindlabs/tailwindcss.com/pull/2388
216•kevlened•1h ago•99 comments

“Stop Designing Languages. Write Libraries Instead” (2016)

https://lbstanza.org/purpose_of_programming_languages.html
180•teleforce•5h ago•150 comments

Show HN: I built a "Do not disturb" Device for my home office

https://apoorv.page/blogs/over-engineered-dnd
19•quacky_batak•4d ago•10 comments

Sergey Brin's Unretirement

https://www.inc.com/jessica-stillman/google-co-founder-sergey-brins-unretirement-is-a-lesson-for-...
314•iancmceachern•6d ago•386 comments

Optery (YC W22) Hiring a CISO and Web Scraping Engineers (Node) (US and Latam)

https://www.optery.com/careers/
1•beyondd•5h ago

Quake Brutalist Jam III

https://www.slipseer.com/index.php?resources/quake-brutalist-jam-iii.549/
103•Venn1•2d ago•13 comments

US Job Openings Decline to Lowest Level in More Than a Year

https://www.bloomberg.com/news/articles/2026-01-07/us-job-openings-decline-to-lowest-level-in-mor...
191•toomuchtodo•2h ago•165 comments

Formal methods only solve half my problems

https://brooker.co.za/blog/2022/06/02/formal.html
59•signa11•4d ago•23 comments

Show HN: KeelTest – AI-driven VS Code unit test generator with bug discovery

https://keelcode.dev/keeltest
19•bulba4aur•4h ago•6 comments

Dell's CES 2026 chat was the most pleasingly un-AI briefing I've had in 5 years

https://www.pcgamer.com/hardware/dells-ces-2026-chat-was-the-most-pleasingly-un-ai-briefing-ive-h...
50•mossTechnician•1h ago•20 comments

Vector graphics on GPU

https://gasiulis.name/vector-graphics-on-gpu/
126•gsf_emergency_6•4d ago•27 comments

Stop Doom Scrolling, Start Doom Coding: Build via the terminal from your phone

https://github.com/rberg27/doom-coding
533•rbergamini27•21h ago•371 comments

Opus 4.5 is not the normal AI agent experience that I have had thus far

https://burkeholland.github.io/posts/opus-4-5-change-everything/
747•tbassetto•23h ago•1077 comments

Target has their own forensic lab to investigate shoplifters (2024)

https://thehorizonsun.com/features/2024/04/11/the-target-forensics-lab/
46•jeromechoo•1h ago•50 comments

LLM Problems Observed in Humans

https://embd.cc/llm-problems-observed-in-humans
101•js216•2h ago•67 comments

Electronic nose for indoor mold detection and identification

https://advanced.onlinelibrary.wiley.com/doi/10.1002/adsr.202500124
173•PaulHoule•17h ago•95 comments

A 30B Qwen model walks into a Raspberry Pi and runs in real time

https://byteshape.com/blogs/Qwen3-30B-A3B-Instruct-2507/
313•dataminer•20h ago•110 comments

Show HN: Comet MCP – Give Claude Code a browser that can click

https://github.com/hanzili/comet-mcp
18•hanzili•3d ago•18 comments