c++ cloth simulation
C++
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
plan.cc
scene.cc

README.md

cloth-simulation

c++ cloth simulation (system spring mass) Finished in February 2013

Verlet's algorithm

acc = force/mass
newPos = 2 * (pos - oldPos) + acc * (Δt*Δt)
oldPos = pos
pos = newPos

Building on Mac

Open a terminal Move to your repository
and execute these command lines

g++ -framework GLUT -framework OpenGL -framework Cocoa fileName.cpp -o execName
./execName

Commands

  • x/X : move on X axis
  • y/Y : move on Y axis
  • z/Z : move on Z axis
  • r/R : rotation scene on Y axis
  • m/M : run and stop the animation
  • b : add/delete geometrics object in the scene
  • s : add/delete the smog effect
  • f : draw the scene with all surfaces
  • l : draw the scene with lines
  • p : draw the scene with points
  • ↑ : fullscreen
  • ↓ : escape fullscreen
  • q : quit

Images

Video

Video on Vimeo

License

alt cc This work is licensed under a Creative Commons Attribution 4.0 International License