Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Implicit Cloth Simulation with Gradient Descent

A gentle introduction to optimization-based implicit time integration for [CSCI 5611](https://umtc.catalog.prod.coursedog.com/courses/8103481).
An introduction to optimization-based implicit time integration for [CSCI 5611](https://umtc.catalog.prod.coursedog.com/courses/8103481).

_This is a work in progress. I released this around 2021 and it hasn't seen many updates. Please let me know if you have suggestions: mattoverby@gmail.com_
_This is a work in progress and was released around 2021. Please let me know if you have suggestions!_

## Introduction

Expand All @@ -20,7 +20,7 @@ Nonetheless, implicit time integration remains a valuable and sometimes necessar

Recently, optimization-based methods have grown in popularity. This approach formulates the Eqs. of motion as an [iteratively minimized objective function](https://en.wikipedia.org/wiki/Optimization_problem).
These methods provide unparalleled robustness and extensibility, e.g., [state of the art solvers](https://doi.org/10.1145/3450626.3459767) for cloth simulation.
The implementation is often easier to construct piece-by-piece than B&W-style integrators.
The implementation is often easier to construct piece-by-piece than B&W-style integrators. In this tutorial, you'll see why.

Below we describe a simple implicit solver for mass-spring systems using gradient descent.
This is meant solely as a tutorial to optimization-based time stepping, and not for practical applications.
Expand Down Expand Up @@ -57,6 +57,8 @@ To compile, execute the following commands:
3. cmake ..
4. make -j

Then press "A" to start the simulation.

### Energies

Whenever I write a new simulator, I start with the most basic elastic energy as the deformable primitives: a Hookean spring with stiffness $k$ and rest length $`\ell`$. The potential energy of a spring is $`(k/2)(\|x_a-x_b\|-\ell)^2`$.
Expand Down
2 changes: 2 additions & 0 deletions src/Solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class Solver
x = xk - alpha * grad;
}
}

v = (x - x_start) * (1.0 / dt);
}
};

Expand Down