Find position on line given start and end points

197 Views Asked by At

I'm trying to solve this problem for myself which is for latitudes and longitudes. For the illustration below - I know ALL the variables EXCEPT $(a_1,b_1)$ which the latitude and longitude I need to calculate.

$X_o,Y_o$ - Circle Center

$X_2,Y_2$ - Outer perimeter

$M_d$ - Maximum distance I can go

$T_d$ - Total radius distance

How do I find the $(a_1,b_1)$ co-ords ?

2

There are 2 best solutions below

2
On BEST ANSWER

Hint:-

1. Use section formula,

You can assume that the point $(x_2,y_2)$ divides the line joining $(x_1,y_1)$ and $(a_1,b_1)$ in the ratio $T_d$:$M_d$, externally.

2. Distance formula,

$\dfrac{a_1-x_1}{\cos\theta}=\dfrac{b_1-y_1}{\sin\theta}=M_D$ where $\theta$ is the slope of line joining $(x_1,y_1)$ and $(x_2,y_2.)$

Let us take, $(x_1,y_1)$ and $(x_2,y_2)$, $(0,0)$ and $(3,3)$ respectively and $M_d$ equal to $2\sqrt2$, for example. Here $\theta$ is $45^{\circ}$, using the formula, $(a_1,b_1)$ comes out to be $(2,2)$.

3
On

Let's imagine that $(a1,b1)$ is 70% of the way from $(x0,y0)$ to $(x2,y2)$. It's x- value will be 70% of the way from $x0$ to $x2$ and likewise it's y-value will be 70% of the way from $y0$ to $y2$. To find the coordinates of your point we can simply substitute 70% in my anecdote with $\dfrac{Md}{Td}$.

Hopefully the algebra here is not too confusing, but in your example this would give

\begin{align*} a1 &= \dfrac{Md}{Td}(x2-x0) + x0 \\[.5pc] b1 &= \dfrac{Md}{Td}(y2-y0) + y0 \end{align*}

For example

Imagine we have two points $A(2, 3)$ and $B(10, 12)$ and we want to find a point, C, that is 70% of the way from $A$ to $B$.

\begin{align*} x_C &= \dfrac{7}{10}(10-2) + 2 \\ &= 5.6 + 2 \\ &= 7.6 \\[.5pc] y_C &= \dfrac{7}{10}(12-3) + 3 \\ &= 6.3 + 3 \\ &= 9.3 \end{align*}

Point C would be at $(7.6, 9.3)$. Here's a quick Geogebra verification.

enter image description here

Although Geogebra is doing some rounding, you can tell that $AC/AB \approx 7/10$. In fact if you compute the distances exactly you will find that it is exactly $7/10$.