Run and watch. Fiddle with the numbers.
Based on http://codepen.io/AlexTaietti/pen/qRrRMR Explained here: https://www.youtube.com/watch?v=qhbuKbxJsk8