3
$\begingroup$

diagram

I have 4 points: $Q, R, S, T$.

I know the following

  • Coordinates for $R$, $T$, and $S$;
  • Length of $\overline{RQ}$
  • That segment $\overline{RT} < \overline{RQ} < \overline{RS}$;
  • I need to figure out the coordinates of $Q$.

$R$, $T$, $S$ form a triangle and point $Q$ can be found on the line segment $\overline{TS}$. I need to get the coordinates for $Q$.

I have solutions for this problem, but they are all so convoluted and long I know I must be doing something wrong. I feel certain there must a simple elegant way to solve this. The best solution would be the simplest one since this needs to be programmed.

  • 0
    In that case: you want to find the intersection point of a circle of radius $d$ centered at $R$, and the line joining $T$ and $S$... which does result in a quadratic equation you need to solve. You may first want to perform a preliminary translation and rotation so that $R$ is the origin and $\overline{RS}$ lies on the horizontal axis, find the intersection point, and then undo the rotation and translation afterwards.2011-09-02

4 Answers 4

2

This is the problem of finding the intersection of a straight line and a circle, as commented by J.M.. The more elementary method using analytical geometry, without rotate or translate the coordinate axes (which would make the computation easier$^1$), although not being a compact one, is the following (see sketch).

enter image description here

The equation defined by points $ S(N,J)$ and $T(M,I)$ is given by $ y-J=m(x-N),\qquad m=\frac{I-J}{M-N}\tag{1}. $ The equation of the circle centered at $R$ with radius $d=\overline{RQ}$ is $ (x-L)^{2}+(y-H)^{2}=d^{2}.\tag{2} $ You need to solve the following system $ \left\{ \begin{array}{c} y-J=m(x-N) \\ (x-L)^{2}+(y-H)^{2}=d^{2}, \end{array}\tag{3} \right. $ which is equivalent to $ \left\{ \begin{array}{c} x=\frac{y-J+mN}{m} \\ \left(\frac{y-J+mN}{m}-L\right)^{2}+(y-H)^{2}=d^{2}.\tag{4} \end{array} \right. $ Solving the quadratic equation yields (with the help of SWP): $ y=\frac{1}{ m^{2}+1 }\left( -mN+Lm+J+m^{2}H\pm \sqrt{\Delta}\right), \tag{5} $ where the discriminant is

$\begin{eqnarray*} \Delta &=&A+B, \\ \text{with } A &=&-m^{4}N^{2}+m^{4}d^{2}-m^{4}L^{2}-m^{2}J^{2}-m^{2}H^{2}+d^{2}m^{2}-2m^{3}NH, \\ B &=&2Lm^{3}H+2Jm^{2}H+2m^{4}NL-2m^{3}JL+2m^{3}JN.\tag{6} \end{eqnarray*}$

The information $\overline{RT}<\overline{RQ}<\overline{RS}$ will define the signal of the term $ \pm \sqrt{\Delta}$. The coordinates of $Q$ are $O=x,K=y$.


$^1$By making the translation $X=x-L$ and $Y=y-H$, and computing the new coordinates of the points in this $X,Y$ system, the above formulae simplify (it is equivalent to set $L=H=0$ in them). In the end they should be convert back to the original $x,y$ system.

  • 0
    @Srivatsan: Thanks! I think it is a result of the job I had and of my age (before the computers).2011-09-02
1

I suppose that the distance $d$ is known because it is mentioned in the title. The point $Q$ is the intersection of the circe with the radius $d$ around $R$ and the line $TS$.

Circle: $(X - R)^2 = d^2$

Line $TS$: $ X(t) = (T-S) t + S$

Intersection (exists since $\overline{RT} < \overline{RQ} < \overline{RS}$): $(T-S)^2 t^2 + 2(T-S) \cdot (S-R) t + (S-R)^2 = d^2$

Here, $T-S$ etc. are the vectors given by subtracting the respective point coordinates, '$\cdot$' means the scalar product, and the power 2 of a vector is its squared length. Solve this quadratic equation for $t$ yielding at most two solutions $t_1, t_2$. Since the parameter $t$ corresponds to the position of $Q$ at the line segment $TS$, take that $t_i$ for which $0 \le t_i \le 1$. Then $Q = X(t_i)$.

0

Let $d$ be the length $RQ$. Solve $(tM+(1-t)N-L)^2 + (tI+(1-t)J-H)^2 = d^2$ for $t$. As a quadratic this will give two solutions. If $ RT < RQ < RS$ then one of these solutions will be between $0$ and $1$, so pick that one.

Then the co-ordinates of $Q$ are $(O,K)=(tM+(1-t)N,tI+(1-t)J)$.

  • 0
    There's actually a quick way to pick out the smaller solution of a quadratic equation: use the "Citardauq" formula (thanks André! ;)), $-\frac{2c}{b+\mathrm{sign}(b)\sqrt{b^2-4ac}}$.2011-09-02
0

since you know Coordinates for R, T, and S so you know the equation of line ST. so you can write Coordinates of point Q in terms of a variable say x (x coordinates is x and y coordinates in terms of x using equation of ST. Now just apply distance formula for Lenght of QR as you know the length of QR and now u have x and hence you have coordinate of Q.