+ 5
Verlet collisions, no libraries
I am experimenting with Verlet rather than Euler integration in my mover codes. After reading some background it is not clear to me how to best handle collisions. Without velocity and thus easy conservation of moment, what are the best choices to make it look realistic? Anybody has examples or can point me to background reading? I am interested in knowing how it works, not in a blackbox library.
2 ответов
+ 4
thank you! I guess this is still compatible with rag doll animation, a few rigid bodies joined with springs?
I was asking more about whether to use a spring-like force for collision or calculate velocity, in which case I am not sure I understabd why verlet code should be faster than Euler
+ 2
I changed one of my codes from Euler to Verlet but I do not see skipping velocity brings any advantage, unless there is a clever way to shuffle pointers rather than copying previous positions.
I would like to reduce the number of operations to afford more particles in e.g water animations.
https://code.sololearn.com/Wycda4iX2TDc/?ref=app