Improved animated line algrorithim