Symulation is a native C++ simulation playground for interactive physics and computational engineering demos. It brings multiple numerical experiments into one desktop application, combining custom visualization, parameter exploration, and solver-focused workflows behind a single UI shell.
Built with raylib, ImGui, ImPlot, ImPlot3D, Eigen, and CGAL, the project currently spans mechanics and electromagnetics, from time-domain motion studies to field visualization and finite-element eigenmode analysis.
A compact simulation lab for exploring how different numerical models behave, how they are parameterized, and how their results can be inspected visually.
The name is intentional: Symulation combines simulation with symbolic, visual, and systems-oriented exploration. The project is meant to feel like a small lab where numerical models can be inspected, adjusted, and compared directly.
| Module | Focus | Documentation |
|---|---|---|
| BCC Spring-Mass Lattice | Interactive 3D body-centered cubic spring-mass lattice with local impulses, damping, and integration controls. | Technical note, GIF |
| Hertzian Dipole | Animated electric and magnetic field visualization for an idealized dipole. | Technical note, GIF |
| Linear Dipole (MoM + Pocklington) | Thin-wire dipole current solve with impedance, near/far field, and directivity views. | Technical note, GIF |
| Double Pendulum | Chaotic two-link pendulum motion with damping, trails, and direct manipulation. | Technical note, GIF |
| Three-Body Gravity | Softened three-body gravity demo with trails, velocity vectors, and energy drift display. | Technical note, GIF |
| Helmholtz FEM (Bezier, mixed BC) | Editable Bezier-domain FEM eigenmode solve with mixed boundary conditions and 2D/3D plots. | Technical note, GIF |
- Single-window native GUI with a shared runtime shell for multiple simulations.
- Modular simulation architecture with one active solver/scene loaded at a time.
- Interactive controls for physical parameters, solver settings, and visualization modes.
- Mixed 2D and 3D rendering paths for trajectories, fields, meshes, and modal structure.
- Current simulations include spring-mass lattices, dipole radiation models, chaotic mechanics, gravitational dynamics, and Helmholtz FEM modes.
- C++17 application shell built on
raylib,rlImGui,ImGui,ImPlot, andImPlot3D. - Shared simulation interface for registering, activating, resetting, updating, and drawing modules.
- Custom lightweight 3D viewport helpers for ImGui draw-list based simulation views.
- Numerical modules using direct integration, dense complex linear solves, CGAL triangulation, and Eigen eigenvalue routines.
- GPU backend reporting is currently a CPU fallback/stub; CUDA support is not implemented yet.
- CMake 3.25 or newer.
- A C++17 compiler.
- A working desktop OpenGL setup on Linux.
- Git submodules for GUI dependencies:
raylib,imgui,implot,implot3d, andrlImGui. - System packages for
EigenandCGAL.
On Ubuntu/Debian:
sudo apt install build-essential cmake git libeigen3-dev libcgal-dev xorg-dev libgl1-mesa-devClone with submodules, then build from the repository root.
git clone --recurse-submodules https://github.com/mmaharebi/symulation.git
cd symulationcmake -S . -B build-local
cmake --build build-local -jThe executable is produced at build-local/symulation.
./build-local/symulationmain.cppstarts the application.src/sym/application.cppowns the main ImGui shell and simulation registration.src/sym/simulation_manager.cppmanages simulation lifetime and activation.src/sym/simulations/contains the individual simulation modules.
- Open the
Simulationsmenu to switch the active module. - Use the
Viewmenu or side panel to toggle helper windows. - Use each simulation's control panel to tune its parameters.
- The GUI dependencies live in Git submodules. If they are missing, run
git submodule update --init --recursive. EigenandCGALare expected from system packages, though a localeigen/checkout is still supported for development.- GIFs under
docs/media/are part of the documentation and are intended to be committed. - GPU reporting is currently a CPU fallback/stub; CUDA support is not implemented yet.
build-localis the preferred out-of-tree build directory for day-to-day work.
This project is released under the MIT License. See LICENSE for details.
