Peripendicular Line at distance d from point in a given direction I have a line given by $Ax + By + C= 0$, and a point $x_0,y_0$. From that point $x_0,y_0$ in the direction of the line up to distance $d$, I want to find the equation of the line that is perpendicular to the line $Ax + By + C= 0$.
It represented in the figure below.

I want to find the equation of line $M$. Sorry if the equation seems naive, I don't have much idea about geometry.
I can easily get the slope of other line and represent it as $Bx-Ay+D=0$. The problem is figuring out the value of $D$. I am really looking for a shorthand/direct formula to compute $D$. 
 A: Let's see if i understood. Do you need the lines that are perpendicular to the one given, and whose distance from X0, Y0 is d?
Edit:
You could calculate the unit director vector from Ax+By+C=0. The director vector would be (-B,A) if I am not wrong, and from it you could calculate the unit vector and multiply it by d (there are two unit directors, choose the one whose second coordinate is positive so that you get the line you are looking for). Let's call it U. Then, if (a,b)=(X0,Y0)+U, (a,b) would be a point that belongs to the line you need. Then, since you know it satisfies the ecuation Bx-Ay+D=0, you could get D from it. I hope it makes sense. New in the site!
Edit 2:
Consider the line BX-AY+D=0. You know B and A, and you need D. Since you know the distance from this line to the point (X0,Y0) is d, you could get D from the distance formula
d=|BX0-AY0+D|/sqrt (A^2+B^2). You will get 2 values for D. One is for the line you are looking for, the other one is for the other line
Edit 3: "proof"
http://i.stack.imgur.com/PgFvj.jpg
