2d Physics Simulation using Verlet integration implemented in Haskell. This project is inspired by the work of johnBuffer's Writing a Physics Engine from scratch and the corresponding Github repo.
This also serves as my final project for the course CIS 194: Introduction to Haskell. My solutions to the assignments and homework in the course is here.
- Read more about strict evaluation in Haskell to optimize the collision solvers;
- Implement a multi-thread collision solver;
- Implement a string object;
- Implement a box container;
- Maybe implement an abstract container;
- Write-up.
This project depends on gloss to render. Make sure you installed the required dependencies for the gloss library: openGL, GLU, freeglut. Next, you can install the required libraries for the project:
cabal install
And, finally: cabal build
to build the project.
Right now, there are two executables in the project:
simple_app
is just a simple world with 4 balls in it. You can execute the program by runningcabal run simple_app
.random_app
is a world in which balls are continuously added, execute the program bycabal run random_app
.