1
$\begingroup$

I have a few coordinates that form a triangle. I have a relative point to that triangle. if the coordinates get translated to a new triangle I want to calculate the new relative point. How do I do this generally not only for 2 dimensions but for larger ones too?

# triangle translation
(5, 2) -> (2, -3)
(2, -3) -> (-3, 6)
(-3, 6) -> (6, 5)
# relative point
(5, -7) -> (x, y)

how do I solve for x, y?

EDIT: as I've done more research into basic geometric transformations I can see that I'm asking for a generalization of all possible transformations of the space. This is not merely a rotation, or a dilation, etc. This particular example rotates the space then stretches it at an increasing rate. So what is the generalized solution for calculating spatial transformations?

$\endgroup$
  • 1
    $\begingroup$ This question seems to be more appropriate for MathSE. I'm not too sure what you are asking, but a generic affine transformation has the form $\big( \begin{array}{cc}a&b\\c&d\end{array} \big) \vec{x} + \big( \begin{array}{c}e\\f\end{array} \big)$. There are 6 unknown parameters ($a,b,c,d,e$ and $f$). From your three points you get 3 pairs of equations, so you have 6 equations with 6 parameters, and you just need to solve. $\endgroup$ – ARG Apr 17 at 6:50