I am trying to identify a function of the following graph in order to implement an animation. It doesn't need to be exactly, anything similar would do the work.
The function repeat itself as you can see in red. In green is the same but mirrored.
I am currently trying combining polinomials and trigonometric functions, if I use different ranges of those I could get something similar but it should be something simpler.

As an option, consider, for example, seven cubic Bezier segments,
where the Bezier control points are
Periodic line looks like