# Locus of a point on a fixed-length segment whose endpoints slide along orthogonal lines

Suppose we have some segment $AB$ of constant length that slides in such a way that its endpoints are moving along orthogonal lines. Let $P$ be a point in the segment so that $|AP| = a$ and $|PB| = b$. How can we find the curve along which $P$ moves?

I was trying to write lines $ax + by = c$ since this is orthogonal to the other line, we know normal to the orthogonal one should be $N = (-b,-a)$ and so the equation of the other line is of the form $-b x - a y + d = 0$. Now, point $A$ lie in one of them and $B$ lies on the other one line. should I solve the equation $d(P,A) + d(P,B) = a+ b$? Am I on the right track?

• You might try starting with an easy case. Consider specifically that the orthogonal lines are the coordinate axes. You can parameterize the endpoints as $A = ((a+b)\cos\theta, 0)$ and $B = (0, (a+b)\sin\theta)$. I'll let you find $P$, and also to generalize this to arbitrary lines. – Blue Apr 27 '16 at 9:49

Here's an illustration of my comment, although I've swapped the positions of $A$ and $B$ (for notational reasons that should be clear shortly).

We can use the angle ($\theta$) that the segment makes with the $x$-axis to parameterize the coordinates of the endpoints. Of course, what's important are the coordinates of point $P$, namely ...

$$P = (a \cos\theta, b \sin\theta) \tag{1}$$

One might (should?) recognize this as the parameterization of the origin-centered ellipse with radii $a$ and $b$.

The non-parametric form of this equation is, of course,

$$\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1 \tag{2}$$

Generalization to the case of an arbitrary pair of perpendicular lines is straightforward. Let the lines meet at $Q = (x_0, y_0)$, and let the line containing sliding point $B$ make angle $\phi$ with the $x$-axis. We can transform equation $(2)$ into the equation of this ellipse with substitutions corresponding to rotation by $\phi$, followed by translation by $x_0$ and $y_0$.

$$\text{rotation:}\;\begin{cases} x \to \phantom{-}x \cos\phi + y \sin \phi \\ y \to -x \sin\phi + y \cos\phi \end{cases} \qquad\qquad \text{translation:}\;\begin{cases} x \to x - x_0 \\ y \to y - y_0 \end{cases}$$

That is,

$$\frac{\left(\;(x-x_0)\cos\phi + (y-y_0)\sin\phi\;\right)^2}{a^2} + \frac{\left(\;-(x-x_0)\sin\phi + (y-y_0)\cos\phi\;\right)^2}{b^2} = 1 \tag{2^\prime}$$

where expansion and simplification is left as an exercise to the reader.

Alternatively, noting that the lines have unit direction vectors $(\cos\phi, \sin\phi)$ and $(-\sin\phi, \cos\phi)$, we easily adapt $(1)$ to get this parametric form of the locus:

$$P\left(\; x_0 + a\cos\theta \cos\phi - b \sin\theta\sin\phi\;,\;y_0 + a \cos\theta\sin\phi + b\sin\theta\cos\phi\;\right) \tag{1^\prime}$$

• This does not answer the question for any lines not just the $xy-$axis – user203867 May 1 '16 at 7:49
• @Learner: ... and yet, even after I edited my answer to include the general case, you awarded a sizable bounty to an answer that handled only the $xy$-axis case. Go figure. (I'm not bothered about the bounty ---hypergeometric is quite welcome to more internet points--- but I'm disappointed by the inconsistency. I invested (more) time and effort into refining an answer to address a concern that apparently wasn't much of a concern, after all.) – Blue May 3 '16 at 14:46
• Quite right. You've got my (+1), Blue. – Han de Bruijn May 3 '16 at 15:15

WLOG let the orthogonal lines be the $x$-axis and $y$-axis respectively. Let $P=(x,y), A=(0,y+k), B=(x+h,0), AP=a, PB=b$. By Pythagoras' theorem, \begin{align} (y+k)^2+(x+h)^2&=(a+b)^2\\ (y+\sqrt{a^2-x^2})^2+(x+\sqrt{b^2-y^2})^2&=(a+b)^2\\ y\sqrt{a^2-x^2}+x\sqrt{b^2-y^2}&=ab\\ y^2(a^2-x^2)&=a^2b^2-2abx\sqrt{b^2-y^2}+x^2(b^2-y^2)\\ 2abx\sqrt{b^2-y^2}&=b^2x^2-a^2y^2+a^2b^2\\ 4a^2b^2x^2(b^2-y^2)&=b^4x^4+a^4y^4+a^4b^4+2(-a^4b^2x^2y^2+a^2b^4x^2-a^4b^2y^2)\\ 2a^2b^2x^2(b^2-y^2)&=b^4x^4+a^4y^4+a^4b^4-2a^4b^2y^2\\ 2a^2b^2(b^2x^2+a^2y^2-x^2y^2)&=b^4x^4+a^4y^4+a^4b^4\\ (a^2y^2+b^2x^2-a^2b^2)^2&=0\\ a^2y^2+b^2x^2&=a^2b^2\\ \frac {x^2}{a^2}+\frac{y^2}{b^2}&=1 \end{align} which is an ellipse.