dilevin / CSC417-a6-rigid-body-contact

9 stars 6 forks source link

Gauss-Seidel max iterations and convergence #4

Open mshoe opened 4 years ago

mshoe commented 4 years ago

When I use 10 PGS iterations, the simulation is very fast when the torus is not contacting the floor, and significantly slower when it is. This gives a very temporally jumpy looking simulation.

But when I use 1 PGS iteration, it seems to run fairly smoothly and the contact is still resolved just like in the readme gif.

Is this jumpy behavior with 10 iterations expected? I believe so since PGS should be the bottleneck of the simulation. So should we submit it with 10 iterations or 1 iteration which also works well.

dilevin commented 4 years ago

yes, pgs is the bottleneck and only runs when the objects in contact with the floor, so the more pigs iterations you use, the more time it takes to compute a time step during contact resolution