# Uniformly sampling the solution space for points where the free termini of two rays, anchored at 3-space points, can intersect

I have two rays, one of length $L_1$ and one of length $L_2$. I anchor these rays, each at one end, on the 3-space points $p_1$ and $p_2$. Assuming that the Euclidean distance between $p_1$ and $p_2$ is $\leq (L_1+L_2)$, what solution space defines the points where these rays can be oriented to touch at their free ends? How might I sample uniformly from this solution space?

-

## 1 Answer

Sample points uniformly from the circle of intersection between the two spheres of radii $L_1$ and $L_2$ centered on $p_1$ and $p_2$ respectively:

(Image from Mathalino.com.)

-