Deadlock
Deadlock
  • 4
  • 240 505
How to make HUGE N-Body Simulations (N=1,000,000+)
This is my implementation of the Barnes-Hut algorithm for calculating the mutual gravitational forces of N bodies in time complexity O(N log N). The video starts with a quick introduction to the problem and then gives the key insights that allow the algorithm to work. I then show how I implemented it in code and I also point to how you can improve the algorithm beyond what was defined in the original paper.
This is the third video in a playlist on gravity simulations which you can find here: th-cam.com/play/PLj66_2EKS5gzXSiIR-WfXmVmrHfK7XW-S.html&si=mV_R8fxhRPbrlHBs
Code: github.com/DeadlockCode/barnes-hut
Chapters:
0:00 - Intro
0:18 - Problem
0:46 - Solution
2:28 - Quadtree
4:09 - Construction
4:59 - Propagation
6:04 - Acceleration
7:23 - Improvements
8:58 - Collisions
9:15 - Outro
มุมมอง: 100 519

วีดีโอ

Making an N-Body Simulation
มุมมอง 19Kปีที่แล้ว
Making an n-body gravity simulation without wasting any time. After this 9 minute tutorial, you should have all the knowledge you need to make your own basic n-body simulation in your preferred programming language and most importantly, you might even understand it. I try to keep my videos relevant, no matter what language you use, as long as there's no language explicitly specified in the titl...
Lightning Fast Circle Rendering
มุมมอง 101Kปีที่แล้ว
Creating a framework to simplify the process of creating particle simulations. Using Rust as the programming language, winit for windowing, WGPU for graphics, and last but not least egui as the graphical user interface. This video is some 'highlights' during the creation of said framework. It is not a line-by-line tutorial but, instead just some things to keep in mind if you decide to go down t...
Mesh from Math - The basics of Marching Cubes
มุมมอง 20Kปีที่แล้ว
An explanation and implementation of marching cubes written in rust, but the general algorithm is adaptable to any language. Data: pastebin.com/6TN46s9p - Click "raw" if you don't see the triangulation array. Chapters: 0:00 - Intro 0:26 - It all begins with a grid 2:18 - The march of cubes 3:08 - Rust syntax interlude 4:15 - Some important data 4:52 - The end of the march 6:21 - Outro