Skip to content

Corg-Labs/Cloth-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Verlet Rope

Verlet-integration rope/cloth strand simulation, in C.

A small, self-contained demo written in pure C — no external libraries, just the standard library and POSIX. Part of the Corg-Labs collection of single-file C programs.


How It Works

  1. Each node integrates position using Verlet integration
  2. Gravity is added to every free node each step
  3. Distance constraints between nodes are solved iteratively
  4. The anchor node swings side to side to drive motion

Build

gcc rope.c -o rope -lm

Run

./rope

Controls

Press Ctrl-C to quit.

About

► Verlet-integration rope/cloth strand simulation, in C.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages