Quote by disregardthat
The problem with polynomials of higher degree is that they cannot be periodic, so I think it would be hard to accomplish that which you describe.

Actually that would work. We know that
[itex]f(x) = \sin(2 \pi x / L)[/itex]
has period L, so in our example L=6.
Then all we need to do is find the Newton polynomial solving
[itex]f(0) \mapsto 0[/itex]
[itex]f(1) \mapsto 1[/itex]
[itex]f(2) \mapsto 1[/itex]
and so on. Call this p(y).
Then [itex]p \circ f (x)[/itex] gives what we want.