Find point on line withv given start point, distance, and line equation I have line equation  $$   Ax +By + C = 0.$$
I have start point (on this line): $    P_0 = (X_0, Y_0)$. 
I have distance $d$ too.
I need find point $P_2$ with distance $d$ from $P_0$ and placed on this line. I know that we have 2 points with this distance. But how calculate? I need some programmatic solution.

From the equation $Ax+By+C = 0$, find the slope of the straight line:
$$A\cdot{\Delta x} + B\cdot{\Delta y} = 0$$
As long as $B\ne 0$, $\Delta y = -\frac AB \Delta x$. Also it is known that
$$d = \sqrt{(\Delta y)^2 + (\Delta x)^2} = \left|\Delta x\right| \sqrt{1+\frac {A^2}{B^2}}$$
So $\Delta y$ and $\Delta x$ can be solved (and there are two pairs of $\Delta x$ and $\Delta y$).
If $B=0$, the straight line is a vertical line and $\Delta y$ is pretty easy to solve; but using similar reasoning, $\Delta x = 0$ and then
$$d = \sqrt{(\Delta y)^2 + (\Delta x)^2} = \left|\Delta y\right| \sqrt{1+0}$$
