6
\$\begingroup\$

I am trying to design a robust cloth system. I have no problem at all simulating things like that using forward integration such as euler, midpoint, runge-kutta, verlet, etc. However, I just can't wrap my head around implicit methods.

I don't understand how you formulate the equations in linear algebra terms. I'd really like to see a VERY simple tutorial, and an actual example of how to construct the equations, and then solve for a very simple system (for example, 3 particles connected by 3 springs).

I looked into David Baraff's Large Steps in Cloth Simulation, and I can kind of follow it, but going from equations to code is a weak spot of mine.

I can use a package like eigen to solve, but I'd also really like to see some code for something like conjugate gradient descent. I don't care about efficiency at the moment, I just want to be able to clearly understand what's going on.

Thanks

\$\endgroup\$
4
  • 2
    \$\begingroup\$ I'm also interested in a detailed/step-by-step tutorial on how to properly implement more pretentious integrators. While I tampered a bit with the implicit Euler by solving a nonlinear equation using the Jacobian/Newton's method, it was not good enough. I then found OpenCloth (on google code). You can see the Exact code you requested here: code.google.com/p/opencloth/source/browse/trunk/… . It would be nice to also get a more tutorialish explanation with some figures "and stuff". \$\endgroup\$
    – teodron
    Apr 16, 2013 at 10:15
  • \$\begingroup\$ Fantastic! That's exactly the kind of thing I was looking for. I'm going to dig in right now, yummy! Cheers \$\endgroup\$
    – DaleyPaley
    Apr 17, 2013 at 1:50
  • 1
    \$\begingroup\$ It's worth mentioning that OpenCloth encompasses almost all major numerical integration methods for cloth-like objects. This piece of web deserves a lot more attention. I'll try to write a tutorial sometime in the near future (this year), as I also cannot find anything dealing with the implementation details for a not-so mathematical person. \$\endgroup\$
    – teodron
    Apr 17, 2013 at 6:40
  • \$\begingroup\$ @teodron: This was a good question, and seems to have been answered. Can one or both of you write up the answer, for the assistance of later members who visit this question? \$\endgroup\$ May 4, 2013 at 20:12

1 Answer 1

1
\$\begingroup\$

So, as per Mr. Geerkens suggestion, for the sake of completeness, here is the answer to the question.

A fantastic example of cloth simulation using a variety of integration methods can be found here. It has explicit and implicit methods, IMEX, FEM, runge-kutta and verlet. It comes with complete source code that is easy to understand and easy to compare to other methods.

A fantastic resource that anyone interested in physical simulation should check out.

A tip of the hat to teodron for finding it.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .