0
$\begingroup$

We have an equation for a line in space as follow $$ \frac{x-x_{0}}{x_{1}-x_{0}}=\frac{y-y_{0}}{y_{1}-y_{0}}=\frac{z-z_{0}}{z_{1}-z_{0}} $$
$$ x_{1}\neq x_{0},y_{1}\neq y_{0},z_{1}\neq z_{0} $$ and a point is given which is on the line $$P_{0}=(x_{0},y_{0},z_{0})$$ It is obvious that there are two points existed on the given line which have a given distance $(d)$ from $P_{0}$. what are the coordination of those points?

If those two points are as follow, find them $(P2,P3)$.

  • 0
    What is the content of all the formulas at the end?2017-01-04
  • 0
    I want find parametric answer for $x_{2},y_{2},z_{2},x_{3},y_{3},z_{3}$ .2017-01-04
  • 0
    I recommend deleting the last $8$ lines in your question. Without explanation, they are very confusing and look like basic facts that the points must satisfy. If they are part of your work, please provide some details of what you're attempting.2017-01-04
  • 0
    @MichaelBurr I deleted those. I am trying write a small game and an object must move to it's distenation. I want each frame the object move toward its goal by a special size $d$. so I should calculate the next positon of the object each frame.2017-01-04
  • 0
    With given point as center and $d$ as radius, the two points are situated on either end of a sphere of diameter $2d$2017-01-04

3 Answers 3

3

We can compare the given distance $d$ to another given distance $d_1$: $$ d_1=\sqrt{(x_1-x_0)^2+(y_1-y_0)^2+(z_1-z_0)^2}. $$ Let $r$ be the ratio of these two given distances: $$ r = {d\over d_1} $$ Then the equations for unknown coordinates $x_2,y_2,z_2$ and $x_3,y_3,z_3$ are $$ {x_2-x_0\over x_1-x_0} = {y_2-y_0\over y_1-y_0} = {z_2-z_0\over z_1-z_0} = {d\over d_1} $$ $$ {x_3-x_0\over x_1-x_0} = {y_3-y_0\over y_1-y_0} = {z_3-z_0\over z_1-z_0} = -{d\over d_1}. $$ Solving these equations, for the $P_2$ coordinates we get $$ x_2 = x_0 + {d\over d_1} (x_1-x_0), \qquad y_2 = y_0 + {d\over d_1} (y_1-y_0), \qquad z_2 = z_0 + {d\over d_1} (z_1-z_0), \qquad $$ and similar expressions for the $P_3$ coordinates: $$ x_3 = x_0 - {d\over d_1} (x_1-x_0), \qquad y_3 = y_0 - {d\over d_1} (y_1-y_0), \qquad z_3 = z_0 - {d\over d_1} (z_1-z_0). \qquad $$

1

Hint:

Getting the line out of symmetric form, and into parametric form, you have \begin{align*} x&=x_0+t(x_1-x_0)\\ y&=y_0+t(y_1-y_0)\\ z&=z_0+t(z_1-z_0) \end{align*}

Let $\vec{v}=\langle x_1-x_0,y_1-y_0,z_1-z_0\rangle$. If you want points at distance $d$ from $(x_0,y_0,z_0)$, use $$ t=\pm\frac{d}{\|\vec{v}\|}. $$

Can you explain why this works? (Hint: try plugging in such a $t$ and compute the distance of the calculated point).

  • 0
    That's the more neat way to do it !2017-01-04
0

Hint: If $P_2=(x_2,y_2,z_2)$, then $P_3=(2x_0-x_2,2y_0-y_2,2z_0-z_2)$ from $$\frac{x_2-x_0}{x_1-x_0}=\frac{y_2-y_0}{y_1-y_0}=\frac{z_2-z_0}{z_1-z_0}\\ \Leftrightarrow \frac{x_0+x_2-2x_0}{x_1-x_0}=\frac{y_0+y_2-2y_0}{y_1-y_0}=\frac{z_0+z_2-2z_0}{z_1-z_0}\\ \Leftrightarrow \frac{(2x_0-x_2)-x_0}{x_1-x_0}=\frac{(2y_0-y_2)-y_0}{y_1-y_0}=\frac{(2z_0-z_2)-z_0}{z_1-z_0}$$