/elastic-cord

Simulation of an elastic cord using C++ and SDL2

Primary LanguageC++

Elastic Cord Physics

Simulation of an elastic cord in C++ using SDL2 graphics library.

Old code from 2016. Not being actively maintained for now.
Contributions are still welcome, though.
https://youtu.be/Vwf6FZaxdDY

Theory

The cord is approximated by a finite number of points connected by damped harmonic oscillators (real springs). The color of each small segment signifies the fractional extension of its length (and hence the elastic tension in it).