Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.04 KB

README.md

File metadata and controls

50 lines (32 loc) · 1.04 KB

Verlet Integration

This repo uses verlet integration to simulate a world with:

  • Points
  • Sticks connecting points
  • A cloth
  • A (swinging) block

It was mostly inspired by this paper by Thomas Jakobsen.

I wrote a blog explaining this code.

Installation

Prerequisites:

git clone <this repo>

Tested on java8.

Usage

Running lein run in the root of this project will start an applet where you can interact with mouse and keyboard.

Keybindings:

  • b (re)start block simulation

  • c (re)start cloth simulation

  • p (re)start point simulation

  • s (re)start stick simulation

  • i to show info screen

  • q to quit

Mouse interactions:

  • Click and drag any point
  • Unpin a pinned point

License

Use the code the way you want it at your own risk. It is not copyrighted.