PARTICLES: storage alternative (not really a question)?

posted to: Updated Collisions

Excellent course. I am learning a lot.

There are almost always multiple ways to achieve the same thing. After struggling with this step for a while, I discovered a small modification which was easier for me to understand and manage.

  1. Initial conditions: store named attributes posN, posN-1
  2. Verlet integration - result is "posN+1" (Position)
  3. Constraints - for each constraint, check "posN+1". If necessary:
    Reflect "posN+1"
    Reflect posN, overwrite it
  4. At the end of the chain, shift and store:
    posN -> posN-1
    "posN+1" -> posN

It seems to work well.