How to move vector(points) coordinates, for a certain angle

2.3k Views Asked by At

I tried several things, but none worked as it should. How to move vector(points) coordinates, for a certain angle that I calculated!

I calculated $\beta = 88.7^\circ$.
I'd like to expand/skew vectors $DA$ and $DC$, to get perpendicular vectors($90^\circ$)(in my case for $1.3^\circ$). How to calculate that (I need to get coordinates).

After that I need to "move" the rectangle, to be perpendicular to the coordinate system (which is in the picture case the blue/black rectangle) enter image description here

I don't need the result, I'd like to know how this is calculated.

2

There are 2 best solutions below

7
On BEST ANSWER

The computations required here are lengths.

The only things that matter here are the lengths $|DA|$, $|DC|$ and what happens to the point $D$.

So assuming that the point $D$ moves to $D'$, then the new coordinates will be $D'$, $C'=D'+(|DC|,0)$, $A'=D'+(0,-|DA|)$, $B'=D'+(|DC|,-|DA|)$.

Explicitly: If $A'=(x_{A'},y_{A'})$, $B'=(x_{B'},y_{B'})$, $C'=(x_{C'},y_{C'})$, $D'=(x_{D'},y_{D'})$, then

$x_{A'}=x_{D'},y_{A'}=y_{D'}-|DA|$,

$x_{B'}=x_{D'}+|DC|,y_{B'}=y_{D'}-|DA|$,

$x_{C'}=x_{D'}+|DC|,y_{C'}=y_{D'}$,

0
On

If you started with a rectangle, you'd first shear with $k = \cos \beta$ and then rotate it with $\sin = \frac{DC_Y}{DC}$ and $\cos = \frac{DC_X}{DC}$. As you are interested in the reverse procedure, simply take the inverse of this matrix. Note, however that this is not a unique transformation, satisfying your constraints.