Open triangleCZH opened 4 years ago
Additionally, My skirt doesn't look identical to the one on GIF, so may I know if this seems correct?
1) Are you running your code in release mode? It should be very fast to run these examples using sparse matrices.
2) I think the skirt in the readme gif has wind enabled, so press "w" and compare the results afterwards.
@abhimadan Thank you for your response.
Using a sparse matrix data structure to represent a dense matrix can make performance worse, so be careful with where you use it. In the notation of the assignment Q
is sparse and b
is dense. This issue has come up in the past, so check the following things:
There's no collision detection so self-intersections like that can happen, but you're right that at least in the skirt example it should look smooth. There are lots of unpredictable bugs that can happen when some of the math is even slightly wrong, so make sure that your dense code is correct, and that you ported it over to sparse matrices accurately.
Thank you for your reply! I will go back to my code and check the things you mentioned.
When I toggle wind after animation, mine looks the same as yours. If you enable wind while the skirt is in the rest position, then toggle animation, it should look closer to what's in the gif.
My flag and skirt under sparse-mode are still slow. The FPS is approximately 0.3~1 . I think my laptop is doing its best since it makes such a large noise. Thus I wonder if there is an expected speed to prove that the implementation of sparse mode really works?