CodingTrain / CodingTrain/Suggestion-Box

Coding Challange: the Barnes-Hut algorithm

Offen
#245 1 Kommentar 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Patron Recommended
Vorherrschende Sprache
Keine Sprachdaten
Sterne
570
Forks
85
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

You enjoy writing code that implement physical ideas, so I think the Barnes-Hut algorithm is a great idea.

In short, if we have a system of N particles, all of them interact with each other, than per iteration we would need to perform N^2 calculations, and the complexity would thus be O(N^2). The Barnes-Hut algorithm pushes this down to O(N*LogN), by constructing a quad-tree (or an oct-tree in 3D), each node of which represents a quadrant (or an octant) of the simulation area of the level above it. You sub-divide the simulation area recursively until you get only one particle per node, calculating the center-of-mass and total mass for every node, and then calculate the forces acting on each particle by reaching down the tree only to a certain point (such that far away objects are calculated as clusters, and only close enough objects are calculated one by one).

This allows you to simulate ten of thousands (if not millions) of particles in real-time! It's also how they make those galaxy simulations.

Read more about it [here](http://www.cs.princeton.edu/courses/archive/fall03/cs126/assignments/barnes-hut.html).

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Das Issue nennt keine Repository-Dateien, Tests oder keinen Einstiegspunkt; beginne damit, die verlinkte Princeton-Barnes-Hut-Aufgabe zu lesen, und bestätige den vorgesehenen Projektkontext. Erledigt wäre die Aufgabe, wenn ein vereinbarter Umfang für die Simulation und eine Möglichkeit festgelegt wären, die Quad-Tree-Implementierung und ihre erwartete Leistung zu überprüfen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
computer-graphics
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.