Using easing functions to smooth animations