We can substitute a regular polygon for the unit circle and graph analogues of the sine and cosine curves. When the polygon is a square, the functions are the squine and cosquine functions by graphing the y and x coordinates, respectively.

Controls

s: Toggle Sine Graph      UP: Increase Number of Edges
c: Toggle Cosine Graph  DOWN: Decrease Number of Edges
q: Toggle Squine Graph  RIGHT: Decrease Tail Length
w: Toggle Cosquine Graph  LEFT: Increase Tail Length
     +: Increase Speed
 -: Decrease Speed