The graph is on the interval [-3,3], defined on R
This function maintain the pattern on all of R
How to find the $f(x)$?
See how the graph goes parallel at certain intervals. I am thinking adding one more variables to indicate one of the direction. However, I cannot merge the two together.
Any thoughts?

You can use a triangle wave written in terms of sine and arcsine:
$$f\left(x\right)\ =\ \frac{1}{\pi}\arcsin\left(\sin\left(\pi\left(x+\frac{1}{2}\right)\right)\right)+\frac{1}{2}.$$ This gives you the following plot: