Thank you very much for your reply.
In fact, I am not familiar with Java. Can I simulate that plastic collision in MATLAB?