Skip to content

mmzsource/verlet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

verlet integration playground

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages