I have line defined by general form of equation: $$Ax + By + C = 0.$$

I know coordinates of point $P$ [$P_x$, $P_y$]. The point $P$ is on the line.

How can I find coordinates of points $P'$ and $P''$ in specific distance $d$ from the point $P$?

$|P'P| = d = |PP''|$

------------P'------P------P''------------------ <- line Ax + By + C = 0
                d   |   d
  • $\begingroup$ you should solve a system of equations obtained by noticing that these two points are just the intersection of a given circle and a given straight line (notice that the equations are not linear) $\endgroup$ – aflous May 7 '14 at 9:46

Let $\left(u,v\right)$ be the coördinates of $P$.

Then any point $P'$ on the line can be written as $\left(u,v\right)+\lambda\left(B,-A\right)$ for some $\lambda\in\mathbb{R}$.

Here $\overline{PP'}=d$ means that $\left\Vert \lambda\left(B,-A\right)\right\Vert =d$ or equivalently $$|\lambda|=d\times\left\Vert \left(B,-A\right)\right\Vert ^{-1}=\frac{d}{\sqrt{A^{2}+B^{2}}}$$

This enables you to find the coördinates of $P'$.

  • $\begingroup$ Thank you :-). This is exactly what I needed. $\endgroup$ – OTree May 7 '14 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.