Adding animations with sin and cosine functions