It was really interesting! I think there is also a solution with fourier series.

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.