I want to write a parametric function that can take any function $f(x)$ and reflect it over a given line in the form $y=mx+b$ (excluding the vertical line). I know the reflection matrix is given by:
$r_\theta=\begin{bmatrix}\cos(2\theta) &\sin(2\theta) \\ \sin(2\theta) & -\cos(2\theta) \end{bmatrix}$
Where $\theta$ is the angle the line forms with the x-axis, in the case of lines passing through the origin.
This makes taking a function parameterized as $(t,f(t))$ under the reflection writable as:
$(x,f(t))\to(x\cos(2\theta)+f(t)\sin(2\theta),x\sin(2\theta)-f(t)\cos(2\theta)$
To write this in terms of a line, we can have the line $y=mx$. Where $m=\tan(\theta)$. And so the parameterized curve above gives the reflection of the function $f$ over the line $y$ for the angle the line forms with the x-axis.
I want to know if there is a way to generalize the parameterized curve to generalize for lines that don't necessarily pass through the origin, in the form $y=mx+b$, and write a general form for that transformation accounting for the intercept.
The rules I have been trying (the hidden curves in picture) work only for specific values for $\theta$, specifically for $\frac{\pi}{4}+\pi n$.
Any help or even some insight for an approach would be much appreciated.
