lodestone is a physics engine to calculate 3D vector fields at high performance
currently calculating magnetic field vector fields due to a single magnetic dipole.
the core equation used is:
B = (μ₀/4π) · (1/r³) · [3(m·r̂)r̂ - m]
- language: C++17
- math: eigen
- note: "eigen performs best with compilers based on GCC or LLVM/CLANG" [1]
- with this information in mind, lodestone will be compiler agnostic with only GCC and CLANG to maximize performance
a neodymium magnet i found stuck to a chair
default compilation (uses your system's default compiler):
cmake -S . -B build
cmake --build buildforce compilation with g++ (gcc):
cmake -G "MinGW Makefiles" -S . -B build
cmake --build buildrun the engine:
.\build\Debug\lodestone.exerun the tests:
cmake --build build --target lodestone_tests
cd build
ctest --output-on-failure[1] Eigen: A C++ template library for linear algebra
books that have influence the modularity of lodestone
[2] C++17 In Detail - Bartłomiej Filipek
[3] Effective Modern C++ - Scott Meyers
tutorials that have been helpful
[4] Learn OpenGL: Creating a window
[5] GLFW: Getting started