adding interpolation function to lua for basic animation