frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Animated Factorization (2012)

http://www.datapointed.net/visualizations/math/factorization/animated-diagrams/
208•miniBill•7h ago

Comments

chrsw•7h ago
This looks cool. Could also be a screensaver (do people still use those)?
apples_oranges•6h ago
Macs now have them again. OLED screens made them create animated login screens. (At least I think that's what happened.)
pvg•6h ago
Threads (with some explainy links) from a million and a million and a bit years ago

https://news.ycombinator.com/item?id=10776019

https://news.ycombinator.com/item?id=4788224

sherdil2022•5h ago
And definitely re-post worthy!
dang•1h ago
Thanks! Macroexpanded:

Factorizer - https://news.ycombinator.com/item?id=10776019 - Dec 2015 (30 comments)

Animated Factorisation Diagrams - https://news.ycombinator.com/item?id=4788224 - Nov 2012 (72 comments)

Animated Factorization Diagrams - https://news.ycombinator.com/item?id=4713048 - Oct 2012 (2 comments)

math_dandy•6h ago
The diagrams for powers of three form the Sierpinski triangle. Makes total sense once you see it, but I hadn't seen it until today!
robot_jesus•5h ago
Same. I loved this unique insight that the visualization provided. It definitely unlocked something in my brain for how I should think about that shape.

If anyone is curious, 6561 (3^8) is the highest pure Sierpinski available in the animation since it caps at 10K.

blueflow•6h ago
I thought this was a waiting animation and the website is broken.
kccqzy•2h ago
It would function pretty well as a waiting animation too.
nurumaik•1h ago
Waiting animation that ends after the last prime number
simojo•6h ago
it took me a few seconds before I realized that it wasn't the page loading
worldsayshi•6h ago
This is brilliant!

Now i want (to build) a drag and drop toy where i can multiply or summarize numbers that are represented in this way. To see how factors move (like boids).

Is this visualization algorithm called something? The explanation link from a previous HN post seems to be broken: http://mathlesstraveled.com/2012/10/05/factorization-diagram...

CGMthrowaway•5h ago
Kind of makes me wish that there were recognizable shapes for primes bigger 2 (pair), 3 (triangle), 4 (square) and 5 (pentagon) that didn't just look like circles. Because my favorite part about this is how you can see at a glance what the factors are. Except for primes 7 or greater I find myself cheating and looking at the top left for which prime it is.

Is there some non-regular polygon that would be more distinctly recognizable to use for 7, 11, etc?

GaggiX•4h ago
Aren't 2 (pair), 3 (triangle), 4 (square) and 5 (pentagon) also "circles" with less resolution? The visualization is just consistent.
CGMthrowaway•3h ago
Yes I dont disagree and it is elegant as is, but the way our eyes/ brain works it's much harder to ID septagon, nonagon, triacontahenagon etc at a glance. A non-regular shape would be better fit for purpose
worldsayshi•4h ago
Couldn't you draw it in a recognizable way using summation?

7 = 2*3+1

11 = (2*2+1)*2+1

etc...

CGMthrowaway•3h ago
Interesting idea
Liftyee•3h ago
Agree. I watched for a while to see some larger primes and was a little disappointed.

Filled polygons would offer some more shapes. Filled hexagon = 7, etc etc...

drdeca•2h ago
4 isn’t prime.

You could probably use the binary expansion to group the dots? So, 1 is • 2 is •• 3 is _• •_•

5 is

_• •_• •_•

7 is ____• _•_____• •_•___•_•

11 is ____• _•_____• •_•___•_• •_•___•_•

And so on.

(So, 2n is represented as n next to n, unless n is 2 in which case it is n above n, and 2n+1 is 1 above 2n )

Alternatively, using stars instead of n-gons could also be clearer?

ashwinsundar•4h ago
I believe it's called prime factorization. Each number is placed in a group of numbers (or group of groups, etc...)

E.g. 24 -> 2 * 3 * 4 = Two groups of (three groups of (four items))

Also try this for the archived version of that explanation -> https://web.archive.org/web/20130206023100/http://mathlesstr...

ajjenkins•6h ago
This would make a cool progress bar replacement. Replace percentage with the number of dots (0-100).
tocs3•5h ago
It makes me wonder what the algorithm for arranging the dots looks like.
GrantMoyer•5h ago
1. Set var factors to the prime factors of the integer

2. Sort factors in ascending order

3. Set var diagram to a single dot

4. Foreach factor in factors

4.1. Set var diagram to factor copies of diagram aranged in a circle

tocs3•5h ago
I was thinking about triangles and squares and the answer was circles.
andrewrn•5h ago
This is very cool. It looks like you used the canvas api for this, but I had expected that you'd use D3.js since its so common for data visualizations. I am curious what your thinking was there?
pona-a•4h ago
But it's not CRUD data visualization, it's a custom animation. Why use a heavy library if the browser draws circles just fine?
aaroninsf•5h ago
I wish that all the factors were shown,

e.g. when on 12, I'd like to see both 3x4 and 2x6, with a visual indicator of when the animation is showing the different factors... maybe the whole thing shrinks and additional factorizations fill in tiles subdividing the space

Knowing the number of different factorizations is an interesting and visually presentable quality that interacts in an interesting way with the factors themselves

gus_massa•5h ago
Slightly related: If you have small kids, I recommend https://www.youtube.com/@Numberblocks that is a cartoon that has characters that are numbers made by blocks, and they split to show sum and rearrange to show the factorization. It's fun for kids and the technical part is correct.
carterschonwald•5h ago
I think this was originally invented by Brent yorgey
kccqzy•4h ago
I wish the animation could play at a slower pace so you have time to count the number of groups and the circles within each group. I also wish each time a new circle would animate from the edge of the screen and then arranged to show the addition of the new circle clearly. Otherwise, excellent visualization!
gavmor•4h ago
The jumps between neighbors are sometimes so drastic—are we sure our numbers are in the right order?
jhanschoo•2h ago
I don't know what you mean by that, but for an example, 16=2^4 and is therefore arranged as a grid, whereas 17 is prime, and must therefore be arranged as 17 dots on a circle.
gavmor•39m ago
The primes are some of the worst offenders, eg the transition from 647 (prime) to 648 (3×3×3×3×2×2×2), but as we approach infinity, the visualizations increasingly appear circular, and it's the least-primey (?) that break from the trend.

eg 854-856, & 857 (prime) are all virtually or perfectly circular. Or maybe I'm observing not mathematical but neuro-visual principles.

jerf•2h ago
That's the difference between the additive view of the world and the multiplicative one. A lot of number theory involves trying to bridge that gap, and even this simplest view of numbers can rapidly fling you into the mathematical unknown. The "simplest hard problem", the Collatz conjecture, can be viewed as coming from this space. You either take a step in multiplicative space, or a step in multiplicative space and then additive space, and ask a very simple question about where those steps can take you.

And that's all it takes to end up at an unsolved problem in math.

You can spend a lifetime on this simple observation that "the jumps between neighbors are so dramatic", just trying to reconcile the complex relationships between the additive view of the world and the multiplicative one.

And we haven't even done anything like bring in complex numbers, or rationals, or introduce exponentiation!

gavmor•32m ago
How can a layperson approach and develop correct intuitions for "the multiplicative view" of numbers? Is it practical?
jderick•4h ago
Can you put them all on one page and zoom in/out? Might be interesting to see some patterns in the sequence. Maybe allow filters for different factors or number ranges or different groupings.
vivzkestrel•4h ago
sliders should be added on this page that control everything. colors and speed are starters
ttoinou•3h ago
This is pure genius, congrats, and I’m disappointed at myself I didn’t think about that earlier (:
liendolucas•3h ago
This is cool! Lets use it to display the digits of a clock :-)
ape4•3h ago
I think the sum of the area of the circles should remain constant. ie be the number that's being factored.
glaucon•2h ago
Really good. I would appreciate it if it could be slowed down, or allow the numbers to be stepped through.
dtjohnnymonkey•1h ago
After some time I find myself waiting for highly composite numbers rather than primes.
smusamashah•47m ago
Does it let you put your own number and see what diagram it makes?

Box Is Down

https://status.box.com
1•npilk•4m ago•0 comments

Will Writing Survive A.I.? This Media Company Is Betting on It

https://www.nytimes.com/2025/05/21/business/media/ai-every-media-startup.html
2•rmason•5m ago•0 comments

A new class of molecules against cancer cells refractory to standard treatments

https://presse.inserm.fr/en/a-new-class-of-molecules-against-cancer-cells-refractory-to-standard-treatments/70470/
1•programLyrique•6m ago•0 comments

ChatGPT is shockingly bad at poker

https://www.natesilver.net/p/chatgpt-is-shockingly-bad-at-poker
1•robinhouston•7m ago•0 comments

Walmart Eliminates 1500 jobs on technology team

https://www.bloomberg.com/news/articles/2025-05-21/walmart-eliminates-about-1-500-jobs-on-technology-team
1•bspencer1984•8m ago•0 comments

GitHub Developer Advocate Demo: Microsoft Build 2025 [video]

https://www.youtube.com/watch?v=KqWUsKp5tmo
1•sensanaty•9m ago•1 comments

Zotac Gaming Handheld Running Manjaro

https://forum.manjaro.org/t/development-q-a-zotac-gaming-zone/177928
1•Venn1•10m ago•0 comments

Mortality in Male Bodybuilding Athletes

https://pubmed.ncbi.nlm.nih.gov/40393525/
1•djoldman•10m ago•0 comments

Show HN: I made a Google Duplex alternative

https://www.altodial.com/?hn
1•eh8•11m ago•0 comments

Seriously, How Do You Get More Reviews on Amazon Products?

https://medium.com/for-founders-sellers/seriously-how-do-you-get-more-reviews-on-amazon-products-without-losing-your-mind-a571b75019f5
1•erayalakese•13m ago•0 comments

David Hoffman's Stroke: Things Nobody Told Me That I Experience [video]

https://www.youtube.com/watch?v=91k3zwOuzd4
1•JKCalhoun•15m ago•0 comments

Show HN: Aiden AI – An Executive Assistant App for Founders and Professionals

https://apps.apple.com/us/app/aiden-ai/id6745358011
1•kpappworx•20m ago•0 comments

Diseases are spreading. The CDC isn't warning the public like it was months ago

https://www.npr.org/2025/05/21/nx-s1-5387723/cdc-communications-cuts-social-media-public-health
4•bookofjoe•26m ago•0 comments

Nearly 50k emails leaked from org linked to Russian intelligence

https://www.occrp.org/en/project/dear-compatriots/russian-foundation-aimed-at-helping-compatriots-abroad-supports-spies-criminals-and-propagandists
1•obscurette•28m ago•0 comments

The Twopenny Hangover

https://mikedashhistory.com/2021/05/19/the-twopenny-hangover/
1•Jerry2•28m ago•0 comments

The Machine Stops (1909)

https://standardebooks.org/ebooks/e-m-forster/short-fiction/text/the-machine-stops
2•xeonmc•28m ago•0 comments

Google rejected giving publishers more choice to opt out of AI Search

https://www.theverge.com/news/671711/google-ai-overviews-search-publisher-data-choice
2•microflash•32m ago•0 comments

Death by a 1000 Standups

https://niyas.me/articles/standups
3•niazangels•35m ago•2 comments

Show HN: TripJam – Collaborative AI Travel Agent

https://tripjam.app
1•kenforthewin•36m ago•0 comments

Hacker who breached comms app used by Trump aide stole data from across US govt

https://www.yahoo.com/news/exclusive-hacker-breached-communications-app-100242693.html
4•rmason•36m ago•0 comments

Show HN: How to Use Mermaid Chart as an AI Diagram Generator for Developers

https://docs.mermaidchart.com/blog/posts/how-to-use-mermaid-chart-as-an-ai-diagram-generator
2•msfi•36m ago•0 comments

Scientists figure out how the brain forms emotional connections

https://arstechnica.com/science/2025/05/scientists-figure-out-how-the-brain-forms-emotional-connections/
1•pseudolus•37m ago•0 comments

My Tony Robbins Experience

https://idiallo.com/blog/a-tony-robbins-story
2•foxfired•37m ago•0 comments

UnitedHealth paid nursing homes to reduce hospital transfers

https://www.theguardian.com/us-news/2025/may/21/unitedhealth-nursing-homes-payments-hospital-transfers
2•Jimmc414•37m ago•1 comments

SysModeler AI – Instantly turn text, code, or voice into SysML models

https://sysmodeler.ai
1•mtbwaez•37m ago•1 comments

Marked decline in semicolons in English books, study suggests

https://www.theguardian.com/science/2025/may/18/marked-decline-semicolon-use-english-books-study-suggests
1•gnabgib•37m ago•0 comments

Coworker.ai launches agentic AI with company context, backed by $13M seed

https://finance.yahoo.com/news/coworker-ai-launches-first-ai-123100009.html
3•thesunsets•38m ago•0 comments

Remembering the ISP That David Bowie Ran for Eight Years

https://hackaday.com/2025/05/19/remembering-the-isp-that-david-bowie-ran-for-eight-years/
1•rmason•40m ago•0 comments

Baby Saved by First Single-Patient Gene-Editing Medicine

https://newsforkids.net/articles/2025/05/21/baby-saved-by-first-single-patient-gene-editing-medicine/
1•thunderbong•40m ago•0 comments

I made a code security auditor for all you dumb vibe coders – thank me later

https://github.com/anshulyadav1976/VulnViper
1•anshulyadav1976•40m ago•0 comments