Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
1  
you can use the graham-schmidt process to change the basis to an orthogonal one. the linear transformation that does this is calculated by finding the coordinates of the new basis in terms of the old one. –  lyj Feb 1 '13 at 10:22

2 Answers 2

up vote 0 down vote accepted

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'}$,

share|improve this answer
    
the D point can stay on the same position, it doesnt matter. –  anzes Feb 1 '13 at 10:52
    
Then take $D'=D$. –  copper.hat Feb 1 '13 at 10:54
    
How to calculate for example: C ′ =D ′ +(|DC|,0). Like Calculating vector(Xa-Xb),(Ya-Yb)? –  anzes Feb 1 '13 at 11:37
    
If $C'=(x_{C'},y_{C'})$, then $x_{C'}= x_{D'}+|DC|$, $y_{C'}= y_{D'}$. –  copper.hat Feb 1 '13 at 11:42
    
are this move formulas suitable only for perpendicular rectangle or have I just derived the wrong formulas for A' and B'? –  anzes Feb 1 '13 at 12:37

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.