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/
30•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•47m ago
It should be better now
iainmerrick•16m 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•11m ago
There a toggle button to show hide description if you missed it
Brendinooo•44m ago
Super fun! I might show it to my kids later today. Thanks for making it!
genpfault•36m ago
> Einstein

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

qunabu•27m 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•30m 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•26m 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•12m ago
My physics bias would like to see earth forming while it's constituents were orbiting around the sun.

In any case, nice visualization.

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

https://qunabu.github.io/Gravity/
31•qunabu•2h ago•11 comments

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

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

Show HN: Gitdot – A better GitHub. Open-source, written in Rust

https://gitdot.io/
291•baepaul•21h ago•270 comments

Show HN: Simten – design hardware in TypeScript and simulate it in the browser

https://simten.dev/
2•charlesfrisbee•1h ago•0 comments

Show HN: UK sold house prices, uncapped, by postcode/county (Land Registry)

https://github.com/vladignatyev/uk-land-registry-price-paid
4•v_ignatyev•1h ago•0 comments

Show HN: Learn from 30 historical figures, open source, nonprofit, self-hosted

https://github.com/chipmates/agoracosmica
3•micstradev•2h ago•2 comments

Show HN: A static SPA to query ATF / BATFE historic AFMER data

https://ryjones.github.io/AFMER-SPA/?ymin=2000&ymax=2024&text=BOEING
2•RyJones•2h ago•0 comments

Show HN: Command Center, the AI coding env for people who care about quality

https://www.cc.dev/
53•Darmani•16h ago•26 comments

Show HN: Mach – A compiled systems language looking for contributions

https://github.com/octalide/mach
28•octalide•15h ago•14 comments

Show HN: SuperTree – interactive decision tree plot for sklearn,xgboost,lightgbm

https://github.com/mljar/supertree
2•pplonski86•5h ago•0 comments

Show HN: CSV Graph – create charts from CSV files in the browser

https://csv.qingyanglabs.com
5•lfdev•6h ago•2 comments

Show HN: Courtside – TUI for NBA Games

https://github.com/NolanFogarty/courtside
17•nolanfogarty•3d ago•4 comments

Show HN: HTTP/3 and raw QUIC client/server APIs for Node.js

https://github.com/currentspace/http3
14•brian_meek•19h ago•0 comments

Show HN: Startup sci-fi novel that took me 5 years to write

https://www.blockchainednovel.com/
20•mck-•21h ago•9 comments

Show HN: NoSuggest – Watch YouTube without the recommendation algorithm

https://www.nosuggest.com/
58•VJ-2-108•5d ago•61 comments

Show HN: Lathe – Use LLMs to learn a new domain, not skip past it

https://github.com/devenjarvis/lathe
389•devenjarvis•2d ago•70 comments

Show HN: I Derived a Pancake

https://www.absurdlyoptimized.com/recipes/pancakes/
333•bkazez•4d ago•135 comments

Show HN: Quick games disguised as boring spreadsheets

https://boredspreadsheet.com/workbook
13•kevinclelland•22h ago•1 comments

Show HN: Nightwatch, The open-source, read-only AI SRE

https://github.com/ninoxAI/nightwatch
32•egorferber•1d ago•9 comments

Show HN: fontliberator: Automatic font clean-room reimplementor

https://github.com/robinpie/fontliberator/
4•robinpie•10h ago•0 comments

Show HN: Kyushu – A self-hostable WASM sandbox for JavaScript workers

https://kyushu.dev/
82•le_chuck•2d ago•38 comments

Show HN: Deep Memory – Vocabulary-driven graph memory for AI agents

https://github.com/TjWheeler/deep-memory
4•tjwheeler•12h ago•2 comments

Show HN: macOS Apps on Linux: SwiftUI for Linux (and AppKit, NSFoundation, etc.)

https://github.com/Lore-Hex/QuillUI
5•ljlolel•17h ago•0 comments

Show HN: Formally verified polygon intersection – Opus 4.8 oneshots, prev failed

https://github.com/schildep/verified-polygon-intersection
93•permute•4d ago•21 comments

Show HN: Lowfat – pluggable CLI filter that saved 91.8% of my LLM tokens

https://github.com/zdk/lowfat
154•zdkaster•4d ago•77 comments

Show HN: DaysLeft – a bio-age clock that shows a range, not a death date

https://daysleft.io
2•neo-genesis•13h ago•1 comments

Show HN: Free animated icon library for Vue

https://respeak-io.github.io/lucide-motion-vue/
63•evolabs•5d ago•18 comments

Show HN: AI Pair Programmer for Emacs

https://github.com/jaketothepast/codetutor
34•jakewindle47•19h ago•0 comments

Show HN: I recreated AOL Instant Messenger in the browser

https://www.webaim.xyz
5•RgrTheShrubbr•14h ago•1 comments

Show HN: Ustps (UDP Speedy Transmission Protocol Secure) and USSH

https://github.com/x1colegal/USTP-Secure
3•x1colegal•15h ago•1 comments