I have three points,$$A =[A_x,A_y]\,,\, B =[B_x,B_y]\,,\,C =[C_x,C_y]$$
How could one calculate the equation for the line that bisects the angle $\,\angle ABC\,$ (eg., passing through $B$)?
I have three points,$$A =[A_x,A_y]\,,\, B =[B_x,B_y]\,,\,C =[C_x,C_y]$$
How could one calculate the equation for the line that bisects the angle $\,\angle ABC\,$ (eg., passing through $B$)?
Start with a translation -- i.e., shift things to a slightly modified coordinate system so that $B$ is the origin:
$$ A \mapsto \left[A_x-B_x, A_y-B_y\right] = A'\\ B \mapsto \left[B_x-B_x, B_y-B_y\right] = B'\\ C \mapsto \left[C_x-B_x, C_y-B_y\right] = C'$$
Compute the angles formed by $A'$ and $C'$ with respect to the positive $x$ axis:
$$\theta_A = \tan^{-1} \frac{A_y-B_y}{A_x-B_x}$$ $$\theta_C = \tan^{-1} \frac{C_y-B_y}{C_x-B_x}$$
Compute the angle between $A'$ and $C'$:
$$\theta = \cos^{-1} \left( \frac{A'\cdot B'}{\|A'\|\|B'\|} \right)$$
Divide by two, and add this angle to the smaller of $\theta_A$ and $\theta_C$:
$$\phi = \min \left\{ \theta_A, \theta_C\right\}+\frac{\theta}{2}$$
Find a unit vector that has this angle in the shifted coordinate system, i.e.
$$\begin{align*} \tan \phi &= \frac{D_y}{D_x} \\ D_x^2+D_y^2 &= 1 \end{align*}$$
Alternatively, ignore the fact that it must be a unit vector, and just set $D_x = 1$ and compute $D_y$--it will still be on the same line, no matter what.
Finally, shift things back to original coordinates:
$$D = \left[ D_x + B_x, D_y + B_y \right].$$
Example:
$$A = [3,3] \\ B = [2,2] \\ C = [1,3]$$
Then,
$$A' = [3-2,3-2] = [1,1] \\ C' = [1-2,3-2] = [-1,1],$$ $$ \theta = \cos^{-1} \frac{ 1\cdot (-1)+1\cdot 1}{\sqrt{1^2+1^2}\sqrt{(-1)^2+1^2}} = \cos^{-1} 0 = \pi/2\ \;\;\; (\text{90 degrees}),$$ $$ \theta_A = \tan^{-1} 1 = \pi/4\ \;\;\; (\text{45 degrees})$$ $$ \theta_C = \tan^{-1} -1 = 3\pi/4\ \;\;\; (\text{135 degrees})$$
The smaller of $\theta_A$, $\theta_C$ is $\theta_A$, so finally,
$\phi = \frac{\pi}{4}+\frac{1}{2}\theta = \frac{\pi}{4}+\frac{\pi}{4} = \frac{\pi}{2}$
as expected.
If $\phi = \pi/2$, then this is a vector pointing along the y-axis, so let $D' = (0,1)$, which leads to $D = D'+B = (0+2,1+2) = (2,3).$
Plot $A, B, C, and D$ and you will see that this is the desired result.
What about setting the equations for a general point $\,(x,y)\,$ in the plane being at the same distance from line $\,AB\,$ and from line $\,BC\,$?
Why would this suffice and, thus, work?
Added: We have
$$(1)\,\,\text{The line}\,\,AB:\,m_{AB}=\frac{B_y-A_y}{B_x-A_x}\Longrightarrow m_{AB}x-y-m_{AB}B_x+B_y=0$$
$$(2)\,\,\text{The line}\,\,CB:\,m_{CB}=\frac{B_y-C_y}{B_x-C_x}\Longrightarrow y=m_{CB}(x-B_x)+B_y$$
Now, if $\,(x,y)\,$ is a point equidistant from the above two line, then we have that
$$(3)\;\;\;\;\frac{|m_{AB}x-y-m_{AB}B_x+B_y|}{\sqrt{m_{AB}^2+1}}=\frac{|m_{CB}x-y-m_{CB}B_x+B_y|}{\sqrt{m_{CB}^2+1}}$$
Solving the above gives you the bisector's line equation.