What is the best way to find the distances of points $X_1$ and $X_2$ from point $A$, using their distance $R$ from point $B$, the positions of points $A$ and $B$, and a normalized vector $V$ defining a line going through point $A$? Everything is happening in 2D. Note, that I'm interested only in their distance from the point $A$ and so far the best solution is to calculate their positions first. I feel there must be a simpler solution.
2026-04-24 08:11:42.1777018302
On
Find points on a line with specific distance to another point
333 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
0
On
With $p = (x,y)$ the solution is at the intersection of two locus. A line $L$ and a circle $C$
$$ \cases{ L\to p = A + \lambda \vec v\\ C\to ||p-B|| = r } $$
so
$$ ||A+\lambda\vec v-B||^2=r^2 $$
or
$$ ||A-B||^2-2\lambda (A-B)\cdot \vec v + \lambda^2||\vec v||^2 = r^2 $$
now solving for $\lambda$ we have one two or no outcomes at all. One in case of tangency, two in case of strict intersection or none in case of no intersection. Supposing we have strict intersection, then having two outcomes $\lambda^*_1,\lambda^*_2$ we have
$$ X_1 = A+\lambda^*_1\vec v\\ X_2 = A+\lambda^*_2\vec v\\ $$
We can have directly those distances if previously the vector $\vec v$ was normalized.

Ok, because I needed only the closest point anyway, I ended up using this equation:
$$-\frac{d \cdot v + \sqrt{\vphantom{\bigl(}r^2 \lVert d\rVert^2 - \lVert d \times v\rVert}}{\lVert d\rVert^2}$$
$v$ is unit vector with the direction of the line
$d$ is the vector $A-B$
$r$ is the distance from $B$