Visualization for basic simulation of a perfectly elastic collision between balls https://demo.pages.djmil.dev/egui-circles
Go to file
djmil 505135b4d5 Punch direction vector
Draw punch vector ontop of circles (for better visibility)
2024-08-31 19:44:35 +02:00
.cargo wasm32 build target (#10) 2024-08-31 12:23:28 +02:00
assets wasm32 build target (#10) 2024-08-31 12:23:28 +02:00
src Punch direction vector 2024-08-31 19:44:35 +02:00
wasm32 wasm32 build target (#10) 2024-08-31 12:23:28 +02:00
.gitignore Circles spawning area 2024-08-31 14:52:43 +02:00
Cargo.lock wasm32 build target (#10) 2024-08-31 12:23:28 +02:00
Cargo.toml wasm32 build target (#10) 2024-08-31 12:23:28 +02:00
index.html wasm32 build target (#10) 2024-08-31 12:23:28 +02:00
LICENSE Initial commit 2024-04-28 21:51:37 +02:00
README.md wasm32 build target (#10) 2024-08-31 12:23:28 +02:00

Immediate Mode GUI app with naive visualization for elastic balls collisions. Live demo.

Build & run

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # install rust
cargo run --package=egui_circles                               # build & run

wasm32 build target

cargo install --locked trunk    # https://trunkrs.dev
trunk serve                     # visit http://127.0.0.1:8080

Acknowledgments

ImGui

Detailed information on how to use egui rust library can found here.

Math

A simple explanation of 2D vector math, silently working behind the scene of the collisions simulation.