Wave increases with distance from pole. Ukrainian anthem, translated poetically: "Nay, thou art not dead, Ukraine, see, thy glory's born again, And the skies, O brethren, upon us smile once more! As in Springtime melts the snow, so shall melt away the foe, And we shall be masters in our own home."
Looked at several models of flag waving, tried more concise code, experimenting until it waved less near the pole (amplitude and frequency decreases as x decreases). Suggestions welcome. Ukrainian national anthem, performed by U.S. Navy Band (public domain), then, Ukrainian folk song by Mykola Lysenko, 1899 (Creative Commons, Wikimedia Commons Audio) See wikipedia: Shche_ne_vmerla_Ukrainy_i_slava,_i_volia