[Gravity_Particles] Add a true N-body mode (softened gravity / Barnes-Hut) and a web build
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start with Math_Chaos/Gravity_Particles/main.cpp:31-56 and the gravity particles documentation at docs/src/content/docs/math-chaos/gravity-particles.mdx:20. Identify how cursor attraction and particle updates currently work, then determine how the proposed integrator, Barnes-Hut option, controls, tests, and Emscripten build fit the project. Done means the acceptance criteria pass and the documentation describes the available modes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The docs already promise N-body gravity, and raylib supports Emscripten. A real N-body mode (O(N^2) for a few thousand bodies, or Barnes-Hut for more) with optional mouse attraction would match the project name and the docs. A WASM build could be embedded in the docs site.
Location
Math_Chaos/Gravity_Particles/main.cpp:31-56docs/src/content/docs/math-chaos/gravity-particles.mdx:20
Evidence
Currently there is only cursor attraction (main.cpp:37), with no particle-particle forces.
Expected
A toggle between “cursor” and “N-body” modes, configurable particle count, and an optional web build.
Proposed fix
- Add an
NBodyintegrator (leapfrog/velocity Verlet with Plummer softening). Start with O(N^2) and add a quadtree Barnes-Hut (theta = 0.5). - Add key bindings (G toggles mode, +/- changes count).
- Add an Emscripten CMake preset (
-DPLATFORM=Web) and embed the result in the docs page.
Acceptance criteria
- N-body mode conserves total momentum within 1e-3 over 1000 steps (test)
- Web build runs in a browser
Repository audit, November 2026 · Phase 9 · New features · evidence: found by code reading · ref chaos-native-055
Generated by Claude Code
- Lingua principale
- C++
- Stelle
- 2
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ibra-kdbra/Math-Problems
-
area: security-algorithms priority: P1 size: XS type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
ibra-kdbra/Math-Problems#417 ·
-
area: math-chaos priority: P3 size: S type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ibra-kdbra/Math-Problems#397 ·
-
area: docs-site good first issue priority: P3 size: XS type: chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ibra-kdbra/Math-Problems#379 ·
-
area: docs-site good first issue priority: P3 size: XS type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
ibra-kdbra/Math-Problems#378 ·
-
area: docs-site good first issue priority: P2 size: XS type: chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ibra-kdbra/Math-Problems#367 ·
Tutte le issue di ibra-kdbra/Math-Problems
Issue simili
-
TransformInteract: a circle drag through the centre sets Scale to its minimum, which can't grow backApertadifficulty:easy prio:low type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
NatronGitHub/openfx-supportext#311 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CachyOS/packageinstaller#211 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
OpenEmu-Silicon/OpenEmu-Silicon#920 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100