UI and framework to experiment with two-dimensional mass-spring networks in C++.
This project is an interactive laboratory for experimenting with different mathematical formulations and different implementations of mass-spring networks.
The idea is to allow the user to interactively switch between different spring relaxation algorithms, moving particles, imparting forces, and running and comparing results of the different algorithms' simulations.
The project is a spin-off from FloatingSandbox, a 2D physics simulator. With this project I will have a testbed to try out different algorithms, until I find a better alternative to the naive Euclidean implementation of the mass-spring network in Floating Sandbox.
I build this project with Visual Studio 2019 (thus full C++ 17 support). I tried to do my best to craft the CMake files in a platform-independent way, but I'm working on this exclusively in Visual Studio, hence I'm sure some unportable features have slipped in. Feel free to send pull requests for CMake edits for other platforms.
In order to build the game, you will need the following dependencies:
- WxWidgets (cross-platform GUI library)*
- DevIL (cross-platform image manipulation library)*
- picojson (header-only JSON parser and serializer)
- Google Benchmark
- Google Test (I'm building out of the release-1.10.0 tag)
Dependencies marked with * may be statically linked by using the MSVC_USE_STATIC_LINKING
option.
A custom UserSettings.cmake
may be used in order to configure the locations of all dependencies. If you want to use it, copy the UserSettings.example.cmake
to UserSettings.cmake
and adapt it to your setup. In case you do not want to use this file, you can use the example to get an overview of all CMake variables you might need to use to configure the dependencies.