So I have a rectangle, that has points A and C on the y-axis, and A at (0,0). Then it is stretched along the y-axis.
I have all new coordinates of the stretched rectangel.
How to calculate the stretch/scale factor used without using sinus-functions? (I assume it will basically have two solutions, but I know the C is always above A, somewhere on a positive y-point.)
(I made a nice graphic, but don't know how to upload it.)
It's not homework. (I'm afraid back at school I would have solved this in like 3 minutes.)
Assuming you know from the start that your stretch transformation is of the type $$ T_\alpha: (x,y) \mapsto (x,\alpha y) $$ This transformation maps lines to line, so you can avoid computing a sine/cosine if you use the dot product properly.
Say your original rectangle is $IJKL$ and after applying the stretch $T_\alpha$ it is mapped to $I'J'K'L'$. We're going to look for some value $\beta$ such that $T_\beta$ maps $I'J'K'L'$ back to $IJKL$.
Let $\mathbf u'=\vec{I'J'}$ and $\mathbf v'=\vec{J'K'}$. (The two vectors $\mathbf u'$ and $\mathbf v'$ can actually be the direction vector of any two consecutive sides.) Let $(u_x',u_y')$ be the coordinates of $\mathbf u'$, and likewise $(v_x',v_y')$ the coordinates of $\mathbf v'$. If you apply a stretch with scaling factor $\beta$ to $\mathbf u'$ and $\mathbf v'$, and compute their dot product, you end up with $$T_\beta(\mathbf u').T_\beta(\mathbf v') = u_x'v_x'+\beta^2u_y'v_y'$$ In particular, when that dot product is zero you know that the two directions $T_\beta(\mathbf u')$ and $T_\beta(\mathbf v')$ are orthogonal. That means that the $\beta$ values that annul that dot product have either inverted your initial stretch, or given you the symmetric configuration. In other words, $\left\lvert \alpha\beta \right\rvert = 1$.