Skip to content

2d Physics Simulations using Verlet integration implemented in Haskell.

License

Notifications You must be signed in to change notification settings

beekill95/hs-2d-physics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Physics Simulation in Haskell

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.

TODO

  • 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.

Build

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.

Executables

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 running cabal run simple_app.
  • random_app is a world in which balls are continuously added, execute the program by cabal run random_app.

About

2d Physics Simulations using Verlet integration implemented in Haskell.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published