You could turn a regular sine wave into such a function if you were to define sine as a vector-valued position function:
$$\vec{r} = \begin{bmatrix}cos(\frac{-\pi}{2}*g(t)) & 0 & sin(\frac{-\pi}{2}*g(t))\\0 & 1 & 0\\ -sin(\frac{-\pi}{2}*g(t)) & 0 & cos(\frac{-\pi}{2}*g(t))\end{bmatrix} \begin{bmatrix}0\hat{i} \\ t\hat{j} \\ sin(t)\hat{k}\end{bmatrix}$$
where g(t) is defined as:
$$
g(t) = \left\{\begin{aligned}
&0, \ \ where&& \lfloor t \rfloor \ne n\\
&1, \ \ where&& \lfloor t \rfloor = n
\end{aligned}
\right.$$
$$where \ n \in \mathbb{Z}: \frac{n}{2} \notin \mathbb{Z} \ (n \ is \ an \ odd \ integer \ only)$$
That would make this the identity matrix when it's not an odd integer multiple of $\pi$, and it rotates $90^\circ$ clockwise for that second half of the period