The Cosine Function is capable of producing a wave-like pattern shown here. By having the sprite constantly set its y position to the sine of timer multiplied by the amplitude, you will force the sprite to move so that it and its clones move like the Cosine Wave. The Cosine function and Sine functions are very similar to each other if you graph them. y is y position a is amplitude cos is the abbreviation for cosine p is timer addon t is time s is speed f is frequency y = { a * [ ( cos( ( p + ts ) * f) ) -1 ] * -1 } - a
Aryabhata of Gupta for discovering the Cosine function, along with its counterparts, the Sine function, and the versine function