How to derive the equation of a parabola given a focus and a directrix not parallel to the x or y axis? I was wondering if it is possible to derive a general form of a parabola given any focus and directrix.
So far all the materials I have come across only show the derivation for a parabola equation where the directrix is $x=c$ or $y=c$ for some constant $c$. And the only material I know that provides a general formula for a parabola is this article in wikipedia. But this relies on the general form of the conic equation.
I would like to derive the general equation of the parabola based on the definition of the parabola:

Let:
$d_1$ be the distance of a point on the parabola and its focus, $P(x_1,y_1)$
$d_2$ be the distance of a point on the parobola to its directrix, $y=mx+c$
$P(x,y)$ be any point on the parabola
So by definition of a parabola,
  $$\begin{align}
d_1 &= d_2 \\
\sqrt{(x-x_1)^2 - (x-y_1)^2 } &= ??\end{align}$$

I can't proceed further as I don't know what to put for $d_2$ as all the textbook I consulted only have the directrix in the form of $x=c$ or $y=c$, which leads me to think that a derivation of the general parabola equation using this approach is impossible.
Please advise and provide the full steps if applicable.
 A: $$d_1=\sqrt{(x-x_1)^2+(y-y_1)^2}$$
And
$$d_2=\frac{|y-mx+c|}{\sqrt{1+m^2}}$$
You can form the equation of Parabola now, but as you were unsure about second, I'll help you prove it:

As we are measuring perpendicular distance, take the line perpendicular to $y=mx+c$ passing through $(x_0,y_0)$ and the foot of perpendicular on line $(\alpha,\beta)$,i.e.$$(\beta-y_0)=\frac{-1}m(\alpha-x_0)$$
Or,
$$m(\beta-y_0)+(\alpha-x_0)=0$$
Squaring,
$$m^2(\beta-y_0)^2+(\alpha-x_0)^2=-2m(\alpha-x_0)(\beta-y_0)\tag1$$
Now consider,
$$(m(\alpha-x_0)-(\beta-y_0))^2=m^2(\alpha-x_0)^2+(\beta-y_0)^2-2m(\alpha-x_0)(\beta-y_0)$$
Or
$$m^2(\alpha-x_0)^2+(\beta-y_0)^2-(m(\alpha-x_0)-(\beta-y_0))^2=2m(\alpha-x_0)(\beta-y_0)\tag2$$
Adding (1) and (2),
$$m^2(\beta-y_0)^2+(\alpha-x_0)^2+m^2(\alpha-x_0)^2+(\beta-y_0)^2=(m(\alpha-x_0)-(\beta-y_0))^2$$
Or [Use $c=\beta-m\alpha$ and rearrange] 
$$(m^2+1)((\beta-y_0)^2+(\alpha-x_0)^2)=(y_0-mx_0-c)^2$$
So distance from line is:
$$d=\sqrt{(\beta-y_0)^2+(\alpha-x_0)^2}=\frac{|(y_0-mx_0-c)|}{\sqrt{m^2+1}}$$
Note: For a line $ax+by=c$, put $m=-\frac ab$ to get:
$$d=\frac {|ax_0+by_0+c|}{\sqrt{a^2+b^2}}$$
A: Let:

$d_1$ be the distance of a point on the parabola and its focus, $P(x1,y1)$
  $d_2$ be the distance of a point on the parobola to its directrix, $y=mx+c$
  $P(x,y)$ be any point on the parabola

So by definition of a parabola,
$$d_1=\sqrt{(x−x_1)^2−(x−y_1)^2}=d_2$$.
$$(Y-y_1)=A(X-x_1)^2$$ where $A=$the degree and direction of parabola i.e. $-x^2$ is downward
$(y_1,x_1)$ is focus and  directrix is $y=c=1/4A$
Derived from all points equidistant from focus to any $x,y$ and directrix, as formal definition of a parabola, from Pythagorean theorem
$$(X-a)^2+(Y-b)^2=(Y-c)^2$$
Separate $y$ values to one side and expand
$$(X-a)^2=Y^2-Y^2+2Yb-2Yc-b^2+c^2
       =2Y(b-c)-(b^2-c^2)\\
(X-a)^2=2Y(b-c)-((b-c)(b+c))\\
(X-a)^2/(2(b-c))=Y-(b+c).$$  So $$A=\frac 12(b-c) \text{ and } x_1=a, y_1=b \text{ and }c=\text{ directrix}$$
Kind of one way to do I guess. Sure there is less convoluted solution to  it but once you understand this you will get better. 

A: The equation of the parabola using your notation is
\begin{multline}
x^2 + m^2\,y^2 + 2m\,xy \\
{}- 2\bigl(x_1(1+m^2)+mc\bigr)\,x
{}- 2\bigl(y_1(1+m^2)-c\bigr)\,y \\
+ \bigl((x_1^2+y_1^2)(1+m^2)-c^2\bigr) =0
\end{multline}
In the derivation below I'll change the notation to avoid the indices and to make the situation more generic with respect to the equation of the line. I'll write the focus as $F=(x,y)$ and the directrix using the equation $aX+bY+c=0$ (as Étienne Bézout suggested). So $(X,Y)$ denotes a generic point against which a certain equation can be tested.
My $x$ is your $x_1$, my $y$ your $y_1$, and since your line is $mx-y+c=0$, my $a$ is your $m$, my $b$ is $-1$ and my $c$ agrees with yours.
The vector $(a,b)$ denotes the direction orthogonal to the directrix. So the point on the directrix closest to a given point $(X,Y)$ is $(X,Y)+\lambda(a,b)=(X+\lambda a,Y+\lambda b)$ with $\lambda$ chosen such that it satisfies the equation of the line, namely
\begin{align*}
a(X+\lambda a)+b(Y+\lambda b)+c&=0 \\
\lambda&=-\frac{a\,X+b\,Y+c}{a^2+b^2}
\end{align*}
If you had the equation of the line scaled such that $a^2+b^2=1$, then this $\lambda$ would already be the length $d_2$. Otherwise, you have to multiply it by $\lVert(a,b)\rVert=\sqrt{a^2+b^2}$ (since your distance vector is $\lambda(a,b)$ so it has length $d_2=\lambda\lVert(a,b)\rVert$).
You will find the length to be (like Tony Piccolo already stated):
$$d_2=\left|\frac{a\,X+b\,Y+c}{\sqrt{a^2+b^2}}\right|$$
Now that absolute value and that square root is ugly, so I'd square both sides (as suggested by Mark Bennet):
\begin{align*}
d_1^2 &= d_2^2 \\
(X-x)^2+(Y-y)^2 &= \frac{(a\,X+b\,Y+c)^2}{a^2+b^2} \\
\bigl(a^2+b^2\bigr)\bigl((X-x)^2+(Y-y)^2\bigr) &= (a\,X+b\,Y+c)^2 \\
\bigl(a^2+b^2\bigr)\bigl((X-x)^2+(Y-y)^2\bigr) - (a\,X+b\,Y+c)^2 &= 0
\end{align*}
If you expand this and then collect terms with common powers of $X,Y$, you end up with the equation given initially, except for the change in notation:
\begin{multline}
b^2\,X^2 + a^2\,Y^2 - 2ab\,XY \\
{}- 2\bigl(x(a^2+b^2)+ac\bigr)\,X
{}- 2\bigl(y(a^2+b^2)+bc\bigr)\,Y \\
+ \bigl((x^2+y^2)(a^2+b^2)-c^2\bigr) =0
\end{multline}
I first dealt with this whole situation in a different context, obtaining the formula using a different description of the parabola. But it's nice to see it confirmed like this.
