Using the answer that has been given to me in this post : What goes wrong in my parametric equation for it to produce only a partial rotation of the graph of $f(x)=\cos(x)$?
I derived empirically this formula in order to rotate counterclockwise, about an arbitrary point $C=(a,b)$ , the graph of an arbitrary function $f(x)$ by an arbitrary positive angle $\alpha$ :
$\bigg< a+ D(t)sgn(t-a)\cos (A(t)+\alpha), b+D(t)sgn(t-a)\sin(A(t)+\alpha)\bigg>$.
with :
$D(x)=$ distance function of an arbitrary point $P=(x, f(x))$ from the center $C$.
$A(x)$ = angle function of the $CP$ line ( with the horizontal axis) before the rotation
My queston is : how to justify precisely, using trigonometry, the necessity of using the "sign function"?