Find the line equation $ax + by+ c =0$ from point and angle. Given a point $P$ and an angle $\alpha$ (see image) how does one find the corresponding line equation on the form $ax + by + c = 0$?
An image of a point $P$ and an angle $\alpha$
 A: $$
\newcommand{\bv} {{\mathbf v}}
\newcommand{\bu} {{\mathbf u}}
$$
If the line direction is $\alpha$, then a vector pointing along the line is $\pmatrix{\cos \alpha \\ \sin \alpha}$. Rotating counterclockwise by 90 degrees, we get that the vector $\bv = \pmatrix{-\sin \alpha \\ \cos \alpha}$ is perpendicular to the line. That means that if $\bu$ is any vector pointing along the line, we know that $\bv \cdot \bu = 0$. Hold that thought.
Now we have a point $(x_1, y_1)$ on the line, and if $(x,y)$ is an arbitrary point on the line, then $\bu = \pmatrix{x-x_1 \\ y - y_1}$ is a vector pointing along the line, so $\bv \cdot \bu = 0$. Writing that out, we get
\begin{align}
0 
&= \bv \cdot \bu \\
&= \pmatrix{-\sin \alpha \\ \cos \alpha} \cdot \pmatrix{x-x_1 \\ y - y_1} \\
&= -\sin (\alpha) (x-x_1)+ \cos (\alpha) (y - y_1) \\
\end{align}
Separating out the coefficients of $x$ and $y$, we get
$$
-\sin(\alpha) x + \cos(\alpha) y + (\sin(\alpha)x_1 - \cos(\alpha)y_1) = 0
$$
which has the required form.
Notice that my form for $c$ is simpler than yours --- that's because you have both $x_1y_1$ and $-x_1 y_1$ in yours.
A: I did manage to solve it myself. Here is my solution:
Finding a line on the form $ax+by+c=0$ from a point and an angle:
Let $P_1:(x_1,y_1)$ be an arbitrary point and $\alpha$ be an arbitrary angle which together define a line in the plane. Then a new point $P_2$ on the line can be constructed by taking a unit step along the direction given by $\alpha$ hence $P_2:(x_1+cos(\alpha),y_1+sin(\alpha))$.
Then from this post we know a point $P:(x,y)$ lies on the line connecting $P_1$ and $P_2$ if and only if the area of the parallellogram with sides $P_1P_2$ and $P_1P$ is zero. This can be expressed using the determinant as
$$
\begin{align}
\begin{vmatrix}
(x_1+cos(\alpha))-x_1 & x-x_1 \\
(y_1+sin(\alpha))-y_1 & y-y_1
\end{vmatrix} = 0 \\ \Longleftrightarrow 
(y_1-(y_1+sin(\alpha)))x+((x_1+cos(\alpha))-x_1)y+x_1(y_1+sin(\alpha))-(x_1+cos(\alpha))y_1=0 \\ \implies 
-sin(\alpha)x+cos(\alpha)y+x_1(y_1+sin(\alpha))-y_1(x_1+cos(\alpha))=0
\end{align}
$$
Hence (up to scale) $a =-sin(\alpha)$, $b=cos(\alpha)$ and $c=x_1(y_1+sin(\alpha))-y_1(x_1+cos(\alpha))$.
A: Use trig.
If we imagine a bug traveling along the line for $1$ unit.  The number of units in the $x$ direction will be $\cos \alpha$ units, and the number of units in the $y$ direction will be $\sin \alpha$ units.
For any given point $(x,y)$ then change in vertical direction, ($y-y_0$) will be in proportion to the change in horizontal direction, $(x-x_0)$ as $\sin \alpha$ will be to $\cos \alpha$.
That is $(y-y_0):: (x-x_0) \sim \sin \alpha :: \cos \alpha$ so
$\cos\alpha(y-y_0) = \sin \alpha (x-x_0)$.
You might note that using the old idea of "slope/point" formula where $y = mx + b$ or $y-y_0 = m(x-x_0)$ or $\frac {y-y_0}{x-x_0} = m$.  This is  quite simply, $m = \frac {\sin \alpha}{\cos \alpha}=\tan \alpha$.
As you point out in a comment, the fails if the line is vertical and the slope $m$ is infinite and $\alpha = \frac {\pi}2$ and $\tan \alpha = \infty$.
But our old slope/point formula failed in those cases anyway.
..... cut the below ......
Using trig we get $\cos \frac \pi 2(y - y_0) = \sin\frac \pi 2(x-x_0)$
$0 = x-x_0$ and $x = x_0$ is the formula.
SO the slope of the line is $\frac {\sin \alpha}{\cos \alpha} = \tan \alpha$.
And that's it. Once we have the slope and a point we are done.
If the point is $x_0, y_0$ then we have the equation is $(y-y_0) = m (x-x_0) = \tan \alpha (x-x_0)$.
That's all.
