# Find the distance to from point to the line

Here is the diagram

If we only know distance PA to line l1, distance PC to line l3, and angle alpha between l1 - l2, angle beta between l2 - l3, how to calculate PB from P to l2 the fastest?

• In which form the lines are given? – Dr. Sonnhard Graubner Jun 30 '18 at 11:08

Calling $|OP| = 2r$ we have
$$2r\sin\phi = d_1\\ 2r\sin(\alpha+\phi) = d_2\\ 2r\sin(\beta+\alpha+\phi) = d_3$$
three equations and three unknowns $\phi, r, d_2$
Call $\gamma$ as the angle between $L_1$ and $OP$ $$\sin(\beta+\alpha+\gamma)=\frac{PC}{OP}\\ \sin\gamma=\frac{AP}{OP}\\ \gamma\implies\cot ^{-1}\left(\frac{\csc (\alpha +\beta ) (PC-AP \cos (\alpha +\beta ))}{AP}\right)\\ OP\implies\csc (\alpha +\beta ) (PC-AP \cos (\alpha +\beta )) \sqrt{\frac{AP^2 \sin ^2(\alpha +\beta )}{(PC-AP \cos (\alpha +\beta ))^2}+1}$$ Since $\sin (\gamma+\alpha)=\frac{BP}{OP}$, then: $$\bbox[10px,border: 1px black solid]{\therefore BP\implies OP\sin(\alpha+\gamma)\implies \csc (\alpha +\beta ) (AP \sin (\beta )+PC \sin (\alpha ))}$$