finding a coordinate of a point using a given distance and two points

40 Views Asked by At

https://prnt.sc/sgksht

I have a two given know points $(a,b)$, $(x,y)$ and a distance $r$ and with some small math, you can gain $D-r$ (distancing $D [(a-x)(b-y)]$ and then $D-r$)

My question is, how I can express point $(w,p)$.

1

There are 1 best solutions below

0
On BEST ANSWER

The point $(w,p)$ is one of the point intersection of $(C)$ and $(D)$ where $(C)$ is the circle centered at (x,y) with radius r and (D) is the line passing through the point $(\alpha,\beta)$ and $(x,y)$. These have respective equations: $$(C): (X-x)^2 + (Y-y)^2 = r^2$$ $$(D): Y-y = \frac{(X-x)(\beta-y)}{\alpha-x}.$$ To find $(w,p)$ we solve the system: $$\begin{align}&\begin{cases} (X-x)^2 + (Y-y)^2 &= r^2\qquad\quad\cdots (1)\\ Y-y &= \frac{(X-x)(\beta-y)}{\alpha-x}\quad(2) \end{cases}\\\text{substituting (2) in (1) we get:}\\&(X-x)^2 + \frac{(X-x)^2(\beta-y)^2}{(\alpha-x)^2} =r^2\\&(X-x)^2\bigg[(\alpha-x)^2+(\beta-y)^2\bigg] = r^2(\alpha-x)^2\\&(X-x)^2=\frac{r^2(\alpha-x)^2}{(\alpha-x)^2+(\beta-y)^2}\\&X =x \pm \frac{r(\alpha-x)}{\sqrt{(\alpha-x)^2+(\beta-y)^2}} \end{align}.$$It will follow that: $$Y = y \pm \frac{r(\beta-y)}{\sqrt{(\alpha-x)^2+(\beta-y)^2}}.$$ Finally we get: $$\begin{cases}w & = x + \frac{r(\alpha-x)}{\sqrt{(\alpha-x)^2+(\beta-y)^2}}\\ p&=y + \frac{r(\beta-y)}{\sqrt{(\alpha-x)^2+(\beta-y)^2}} \end{cases}$$