Two parallel lines with varying slopes and constant distance ( say 4 units) between them. Let $D$ be a line with equation $ y = ax+b$, with $a$ a varying number.
So $D$ has a changing slope and is rotating about point $ P= (0,b)$.

The question is to find the equation of $D'$ such that $D'$ is above $D$ and the distance from any point of $D'$ to $D$ is , say , $4$ units, meaning that the distance between the 2 lines is constant.
I thought of this :
(1) The angle between $D$ and the X axis is $ \alpha = \arctan (a)$.
(2) Let $Q$ be the point where $D'$ crosses the Y axis, and let $R$ be the perpendicular projection of $Q$ on $D$ , we have a right triangle QRP . The angle $\beta = \angle {QPR}= \pi/2 - \alpha$.
(3) The distance between $Q$ and $R$ has to be $4$ ( by the givens of the problem) , so, the relation must hold in $\triangle {PQR}$ : $ PQ \sin(\beta) = 4\space \space  (= QR)$, implying that $PQ = 4/ \sin (\beta)$
(4) The difference of height between $D$ and $D'$ is therefore $ c = PQ = 4/ \sin (\beta)$.
(5) From this I conclude that the equation of $D'$ is :
$ y = ax+b +c = ax+b+ \frac {4} {\sin (\arctan (a))}$.
Apparently, that works : https://www.desmos.com/calculator/x0haqu0a0a.
But what are the limitations of this method? For example, what if it were required $D$ to rotate about an arbitrary point ? Also, is there a quicker way to derive the equation of $D'$?

*

*If two lines are parallel, they have the form
$y=mx+b_1$ and $y=mx+b_2$. That is, their slopes are the same and their intercepts are different.


*The formula for the distance between these two parallel lines is $$d = \frac{|b_1-b_2|}{\sqrt{m^2+1}}.$$
You can see the derivation on Wikipedia distance between parallel lines.


*So if you know $b_1$ and have a particular $d$ in mind, you can rearrange this formula to solve for the second line's parameter $b_2$.
$$b_2 = b_1 \pm d\sqrt{m^2+1} $$
There are two solutions because the second line can be "above" or "below" the first line.


*In the special case that the lines are vertical, the slope $m$ is infinite so this formula doesn't work. Instead, our lines are simply $x = b_1$ and $x = b_1 \pm d$.
