frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Gravity – interactive solar-system simulator, from Newton to Einstein

https://qunabu.github.io/Gravity/
33•qunabu•2h ago
Just for fun and self education, I've built this over a weekend to teach myself why orbits exist, not just show planets going around. Something that was never clearly explain to me in school. It opens with a guided tour that builds the idea up step by step: two bodies and the equal/opposite force, inertia (the Sun is removed and Earth just drifts straight), then "an orbit is falling and continuously missing," cosmic velocities with a little rocket, Voyager 1 & 2's real gravity assists (the clock runs the actual 1977–1989 dates so the planets orbit into their grand-tour alignment and the slingshots line up), and it ends on Einstein — gravity as curved spacetime, the classic rubber-sheet well. What's real: every body uses its real radius/mass and J2000 orbital elements; positions come from solving Kepler's equation each frame. You can toggle to an N-body mode (symplectic leapfrog) that shows live energy drift (~1e-6%) so you can see the integrator is honest. The only thing faked is scale — at true scale you can't see anything — so there's a toggle between true scale and a log-remapped "visual" scale, with physics always running in real AU. Tech: TypeScript + Three.js + Vite, fully client-side, no backend, works offline (surface textures are generated procedurally from value-noise; only Earth uses a real image). Source: https://github.com/qunabu/Gravity

Happy to answer questions — and feedback on the physics or the explanations is very welcome. This project might be totally inaccurate in terms of real physics, this is how i do understand this on my own - i'm happy to confront this with reality

Comments

stevenalowe•1h ago
Looks great but on mobile the popover covers a quarter of the screen, obscuring the sun
qunabu•1h ago
I should have mentioned that its not mobile friendly so far. I will try to fix this.
qunabu•54m ago
It should be better now
iainmerrick•23m ago
It works pretty well on iPhone, except the descriptive text fills most of the bottom half of the screen, overlapping the sim which is centered on the screen.

If the sim were instead centered on the free space (the top half of the screen) it’d be perfect.

qunabu•17m ago
There a toggle button to show hide description if you missed it
Brendinooo•51m ago
Super fun! I might show it to my kids later today. Thanks for making it!
genpfault•42m ago
> Einstein

How are you handling relativistic effects in the N-body simulation?

qunabu•34m ago
Not in the sim right now — it's purely Newtonian (symplectic leapfrog, classical gravity). I show the concept on the last slide ("Einstein: gravity is curved spacetime") — a curve in space wrapping around a star/planet that pulls nearby objects into the well. The quantitative case, Mercury's ~43″/century perihelion precession, I'd add next as a 1PN correction — haven't gotten to it yet. Will try to figure it out how to show this
VikingCoder•36m ago
This is nice.

I did laugh at how the Gravity built the Earth, with a tiny North America and all, and then as more mass was accumulated, North America got to get bigger and bigger and bigger!

BigTuna•33m ago
Great job! 14 is misleading though - while the context is one day, the animation depicts axial precession which takes place over ~26,000 years
Iolaum•18m ago
My physics bias would like to see earth forming while it's constituents were orbiting around the sun.

In any case, nice visualization.

ck2•3m ago
that probably happened a few times as well we "stolen" planets or mass from other star systems in the same baby nursery as our sun

there is also likely a planet that passed through and yanked away a lot of debris, most of the simulations for tilt etc. don't work without the mystery missing planet

I could watch PBS Space Time all day for that kind of stuff, often do letting it play in the background on repeat, so much better than the news

* https://www.youtube.com/@pbsspacetime/search?query=planets

Dr. Becky is also awesome

* https://www.youtube.com/@DrBecky/videos

ck2•53s ago
the way the original mathematicians figured all this out absolutely melts my brain

no computers, no calculators, barely working telescopes looking at the moons orbiting Jupiter

(don't be limited by episode title, lots of amazing astrophysics in there)

* https://www.youtube.com/watch?v=8yhk1EZq9tY

Albania Is Not for Sale: Kushner's $4B Resort Triggers'Flamingo Revolution'

https://www.yacnews.com/albania-is-not-for-sale-kushners-4-billion-resort-triggers-flamingo-revol...
69•ortr•46m ago•15 comments

Making Graphics Like it's 1993

https://staniks.github.io/articles/catlantean-3d-blog-1/
266•sklopec•3h ago•38 comments

GentleOS – Classic operating system with a lovely retro GUI

https://github.com/luke8086/gentleos32
253•tekkertje•4h ago•52 comments

Microsoft's open source tools were hacked to steal passwords of AI developers

https://techcrunch.com/2026/06/08/microsofts-open-source-tools-were-hacked-to-steal-passwords-of-...
338•raffael_de•6h ago•134 comments

The better the autopilot the worse the pilot

https://julienreszka.com/blog/the-better-the-autopilot-the-worse-the-pilot/
39•julienreszka•1h ago•29 comments

WWDC 2026: Apple is Folding

https://cupertinolens.com/2026/06/09/wwdc-2026-apple-is-folding/
30•brandonb•29m ago•17 comments

Cleaning up after AI rockstar developers

https://www.codingwithjesse.com/blog/rockstar-developers/
158•BrunoBernardino•5h ago•91 comments

OpenCV 5 Is Here: The Biggest Leap in Years for Computer Vision

https://opencv.org/opencv-5/
407•ternaus•3d ago•64 comments

Forever Young: how one molecule can lock plants in a youthful state (2025)

https://omnia.sas.upenn.edu/story/biologist-scott-poethig-plants-never-age
83•bryanrasmussen•6h ago•39 comments

Show HN: Gravity – interactive solar-system simulator, from Newton to Einstein

https://qunabu.github.io/Gravity/
33•qunabu•2h ago•13 comments

Emerge Career (YC S22) Is Hiring a Founding Growth Marketer

https://www.ycombinator.com/companies/emerge-career/jobs/v0S1AEG-founding-growth-marketer
1•gabesaruhashi•2h ago

An introduction to functional analysis for science and engineering

https://arxiv.org/abs/1904.02539
57•Anon84•1d ago•5 comments

Apple reveals new AI architecture built around Google Gemini models

https://www.macrumors.com/2026/06/08/apple-reveals-new-ai-architecture/
663•unclefuzzy•19h ago•513 comments

The iPhone's Last Stand

https://stratechery.com/2026/the-iphones-last-stand/
71•swolpers•4h ago•111 comments

Thi.ng – open-source building blocks for computational design and art

https://thi.ng
105•nmstoker•1d ago•18 comments

Job: Head of Stonehenge

https://www.english-heritage.org.uk/about/our-people/careers-with-us/job-search/default-job-page/...
182•mooreds•11h ago•151 comments

Adopting the Parallel DWARF linker in dsymutil

https://jonasdevlieghere.com/post/dsymutil-parallel-linker/
7•JDevlieghere•2d ago•1 comments

Corrupting a ZFS File on Purpose

https://oshogbo.com/blog/90/
43•zdw•2d ago•7 comments

xAI is looking more like a datacentre REIT than a frontier lab

https://martinalderson.com/posts/xais-new-rental-business/
618•martinald•23h ago•485 comments

Show HN: Performative-UI – A react component library of design tropes

https://vorpus.github.io/performativeUI/
1063•lizhang•1d ago•193 comments

Siri AI

https://www.apple.com/apple-intelligence/
627•0xedb•20h ago•619 comments

Eagle Computer: The rise and fall of an early PC clone

https://dfarq.homeip.net/eagle-computer-the-rise-and-fall-of-an-early-pc-clone/
30•giuliomagnifico•5h ago•5 comments

EU-banned pesticides found in rice, tea and spices

https://www.foodwatch.org/en/eu-banned-pesticides-found-in-rice-tea-and-spices
469•john-titor•22h ago•254 comments

Porting the ThinkPad X61 to Coreboot

https://blog.aheymans.xyz/post/thinkpad_x61/
113•walterbell•10h ago•42 comments

The beauty and simplicity of the good old C-style void* in C++

https://giodicanio.com/2026/06/05/how-to-declare-a-c-plus-plus-function-that-takes-a-blob-of-memory/
39•movd128•2d ago•71 comments

H2JVM – A Haskell Library for Writing JVM Bytecode

https://discourse.haskell.org/t/h2jvm-a-haskell-library-for-writing-jvm-bytecode/14182
33•rowbin•2d ago•8 comments

MiMo-v2.5-Pro-UltraSpeed: 1T model with 1000 tokens per second

https://mimo.xiaomi.com/blog/mimo-tilert-1000tps
596•gainsurier•22h ago•442 comments

Old'aVista – The most powerful guide to the old Internet

https://oldavista.com/
134•abnercoimbre•22h ago•28 comments

Apple Core AI Framework

https://developer.apple.com/documentation/coreai/
331•hmokiguess•19h ago•96 comments

Looking Forward to Postgres 19: Query Hints

https://www.pgedge.com/blog/looking-forward-to-postgres-19-query-hints
197•jjgreen•3d ago•35 comments