cmm-21 / a5

0 stars 0 forks source link

Should we use the stablized integration method for ex4? #7

Closed catachiii closed 3 years ago

catachiii commented 3 years ago

I noticed that with epsilon = 1, the gif in README shows that the ball will bounce higher and higher, which clearly indicates that the integration method is not stable. In the meanwhile, my ball will bounce lower and lower with epsilon = 1, and sinks into the ground if epsilon is below 1.

I wonder if this is from the wrong integration method since its energy is decreasing, and could we use the "unstable" integration method (explicit euler) for ex4?

eastskykang commented 3 years ago

@Catially did you also try with epsilon=0? what happens?

catachiii commented 3 years ago

@eastskykang Yes, the unstable method will result in the same result as shown in the README file. The ball will stop moving while half of it is underground. But it will still sink into the ground gradually using my stable integration method.

eastskykang commented 3 years ago

@Catially in short, you should use the stable integration scheme for Ex.4 too. If there's some difference in the collision behavior in your implementation, please do a double check if you are following the step-by-step instructions correctly.

Side note: The behavior of collision can be hugely differ by a collision/contact model adopted. There's no perfect solution. Nevertheless, in this exercise, you should reproduce exactly same result with the demo video I posted in README. (I believe this is pretty straight-forward if you read the instructions carefully)

catachiii commented 3 years ago

@eastskykang Sorry, it seems that I have misstated my problem. I have already reproduced the exact results in the README using my integration method (no spoiler for other colleagues), but I need to slightly modify the file structure (change some update sequence of velocity and position) to reproduce the results shown in ex4. Will I lose points because of this?

eastskykang commented 3 years ago

@Catially I think you are on the right track :)