Improved animation by generating intermediate points in straight lines