How do I rotate a 2D point?
Submitted by: AdministratorIn 2-D, the 2x2 matrix is very simple. If you want to rotate a column vector v by t degrees using matrix M, use
M = {{cos t, -sin t}, {sin t, cos t}} in M*v.
If you have a row vector, use the transpose of M (turn rows into columns and vice versa). If you want to combine rotations, in 2-D you can just add their angles, but in higher dimensions you must multiply their matrices.
Submitted by: Administrator
M = {{cos t, -sin t}, {sin t, cos t}} in M*v.
If you have a row vector, use the transpose of M (turn rows into columns and vice versa). If you want to combine rotations, in 2-D you can just add their angles, but in higher dimensions you must multiply their matrices.
Submitted by: Administrator
Read Online Programming Algorithms Job Interview Questions And Answers
Top Programming Algorithms Questions
☺ | How to find median of a BST? |
☺ | Define and describe an iterative process with general steps of flow chart? |
☺ | State recursion and its different types? |
☺ | What is ARCBALL? |
☺ | What are the two ways through which the Markov algorithm terminates? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |