I have such a problem :

I am given :

  • x,y
  • $\|a\|$
  • $\alpha$
  • $\vec{v}$ and $\|v\|$

I need to get the coordinates of point X1Y2.

enter image description here


$$(x_1, y_1) = (x, y) + \frac{a}{\|v\|} \cdot R(\alpha) \cdot \vec{v}$$ Where $R(\alpha)$ is a rotation matrix.

  • $\begingroup$ @Patryk: This is a best answer for a fast result.+1 ;-) $\endgroup$ – mrs Jan 6 '13 at 11:00

Use this fact that for two vector $v=(x_1,x_2),w=(y_1,y_2)$ we can evaluate $v.w$, the dot product of $v$ and $w$, by two ways. They are : $$v.w=x_1y_1+x_2y_2$$ and $$v.w=|v||w|\cos(\alpha)$$

Personally, I prefer @Karolis's answer but we can have an elementary approach according to what was given to us.

  • $||a||=\sqrt{(X-X_1)^2-(Y-Y_2)^2}$
  • $XX_1+YY_2=vw=||v||.||a||.\cos(\alpha)$

Above system have two equations of two unknowns. As you noted, we have $||a||,||v||,\alpha,X,Y$ so, put the known values and evaluate $X_1,Y_2$. I hope I could help.

  • $\begingroup$ Thanks a lot for this but if I am correct I will have an equation with 2 unknowns, right ? $\endgroup$ – Patryk Jan 6 '13 at 0:50
  • $\begingroup$ @Patryk: Right. But you have a system of equation with 2 unknowns and I think after solving this system, you will get X1 and Y1. Tell me if you have any problem in it. ;-) $\endgroup$ – mrs Jan 6 '13 at 6:36
  • $\begingroup$ Somehow I can't see the second equation. Can you edit your answer so that it is a bit more clearer :) ? $\endgroup$ – Patryk Jan 6 '13 at 10:45
  • $\begingroup$ @Patryk: Sorry and forgive me for the delay. $\endgroup$ – mrs Jan 6 '13 at 21:02
  • $\begingroup$ Good job explaining! +1 $\endgroup$ – Namaste Feb 23 '13 at 0:07

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.