Skip to content

A simple cloth simulation program written in C++ and OpenGL. Based on spring-damper model with diverse controls.

Notifications You must be signed in to change notification settings

TonyZYT2000/MyClothSimulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Cloth Simulation

Description

This is a simple cloth simulation program written in C++ and OpenGL. It is based on spring-damper model and uses a 50 * 50 mesh with thousands springs and dampers interconnected. There are also gravity and wind force acting on the cloth. With all these forces and diverse controls, the program presents a intuitive demonstration of cloth simulation.

Build

The project is managed using Visual Studio on Win10. It depends on OpenGL, GLEW and GLM. With these dependencies configured correctly, this project should also be able to run on OS X and Linux. Instructions can be found here.

Usage

  • Press W, A, S and D to move the cloth around.
  • Press Q and E to rotate the cloth.
  • Press left Shift and left Ctrl to move the cloth up and down.
  • Press arrow keys, right Shift and right Ctrl to control winds.
  • Press P to turn on and off polygon view.
  • Press Space to pause the animation.
  • Press Backspace to release and recapture the cloth.

Artworks!

Here are some GIFs of the running program. Try download it and interact with it!

About

A simple cloth simulation program written in C++ and OpenGL. Based on spring-damper model with diverse controls.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published