Just watch. Use the arrow keys to change speed. Keep playing to change total bounces.
This is a project i made in 5 minutes it was just for fun.