Open xparq opened 7 months ago
https://www.youtube.com/watch?v=GjbcvqEOIuE, mostly comments, e.g.:
@yinotaurus 2 years ago (edited)
You could use a quadtree (or octree if you want to go 3-dimensional), which may increase precision and speed though hurt implementation simplicity. Not yet sure, what clustering method would work best, especially on GPU. Another optimization would be to use a different time step for each particle and simply not update each particle at each step. I am just looking into similar O(N log N) or better N-body simulations, but not quite on this level, only star system scale simulations, where you have up to a million small bodies and a handful of large bodies.
@PuzzledMonkey 1 year ago (edited)
A quadtree or Oct tree is a key component of the fast MultiPole method.
If I may, you should instead use integral sum (I) of the weight of all particles at any given points into a Float32 buffer, then you can compute easily the total sum of any given area (x1, y1, x2, y2) which equals to I(x2, y2) - I(x1, y1).
Less memory usage, and faster resolution, no "absolute borders" as described in your video. Still an approximation, but I think you would get better results and performance.
@lukewellcash 1 year ago (edited)
Instead of summing just the mass in each grid cell, average the position as well and store it in a 3 float texture. Expanding this in the same way done in this video would give a method that should be [much more] accurate and one that grows in complexity at the same rate as the one you displayed. The only draw back is that it would be a bit slower (just because it is having to do more).
-> #360, #447
Preferably a scale-agnostic ("continuously" hierarchical, i.e.: freely zoomable) method!
-> https://www.quora.com/According-to-your-experience-what-is-the-difference-between-K-Means-and-MiniBatchKMeans-in-clustering
+ related ChatGPT discussion: https://chat.openai.com/c/b6dbc8e6-ecf3-4c2f-ad6e-8957ae60bd5b
Note: also in the velocities domain!