~/talk

Do You Like Physics Simulations aaaannnd C++? Me Too!

Talkat CppNorth 2023 · 2023-07-17..07-19· [creative-coding]
links:none on file
slides:none on file

Ports Matthias Müller’s JavaScript fluid demo into C++ using CMake, MSVC and an OpenGL widget, ends up running about 21,000 particles on a laptop after fixing Y‑axis and scale bugs and converting JS reference semantics to C++ references. Implements C++23 modules, replaces flat arrays with mdspan, rewrites loops into ranges and tests parallel execution for drawing vs simulation, finding drawing parallelizes well but math-bound simulation limits speed. Adds sand and floating material by changing densities, uses consteval/if consteval for compile‑time tuning.

AI-written summary · about

  1. 0:00Introduction and goals
  2. 3:36Fluid physics foundation
  3. 6:23Translating JS to C++
  4. 8:24Modernizing with ranges
  5. 10:03Using MDspan for data
  6. 11:50Fixing simulation bugs
  7. 14:18Advanced range techniques
  8. 16:48String formatting and scaling
  9. 19:12Fixing physics and references
  10. 22:18Implementing C++ modules
  11. 25:47Module structure and cycles
  12. 28:38Refactoring into modules
  13. 31:10Simulation loop breakdown
  14. 34:01Parallel algorithms
  15. 37:11Compile-time optimizations
  16. 39:22Graphics rendering optimization
  17. 42:26Adding materials and analysis
  18. 45:46Conclusion and takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.