How do you use a Rotation Matrix in 2-D?

AI Thread Summary
The discussion focuses on understanding the input and output of a 2D Rotation Matrix, particularly when the vector is not at the origin. The initial and terminal points of the vector are defined, and the challenge is to find the new terminal point after rotation using the angle Phi. It is clarified that the rotation should be applied to the vector components, and the results must be added to the initial coordinates to obtain the new endpoint. The process involves calculating the difference between the terminal and initial points, applying the rotation matrix, and then adjusting the result back to the original position. The derived formulas for the new coordinates after rotation are confirmed to be consistent with the discussed methodology.
Saladsamurai
Messages
3,009
Reaction score
7
I am having some trouble deciphering what the input and output of a 2D Rotation Matrix actually represent.

All example online have the vectors oriented at the origin. I know you can move them anywhere so long as you maintain their length and orientation, but here is my question:

Let's say I have a vector that is not located at the origin. Call its initial point (x0, y0) and its terminal point (x1, y1)

Now let's say that it has rotated through the positive angle of Phi. It's initial point is clearly still (x0, y0) and its new terminal point is (x2, y2).

Using only (x0, y0) and angle Phi, how can I find the coordinate (x0, y0) ?

I know that the Rotation Vector is defined as:

RM.jpg



My issue is that since they chose the origin, x1 and y1 in their example could be either the coordinates OR the components.

So, for the general 2D case: Do I plug in the coordiantes or components? And are the results the coordinates or components?

I am under the impression that it is the latter in both cases. And so in order to obtain the actual coordinates of my new vectors endpoint, I must add the resulting components to the initial coordinate (x0, y0)

Does that sound right?
 
Last edited:
Physics news on Phys.org
Well, you can move it to the origin, rotate it, and move it back.

So if v = (x0, y0) and w = (x1, y1), then: a) calculate w - v; b) apply the rotation matrix to obtain a new vector z; c) calculate z + v.
 
If the tail of the vector r that you want to rotate is not at the origin, then find the position vector R of the tail with respect to the arbitrary origin and use the matrix to rotate the sum R+r. The result will be the coordinates of the tip of rotated vector r. To find the coordinates of the rotated tail, use the matrix once more on R.
 
I just wrote a code to test a few cases of what I said in the OP, and this is the formula I came up with. I think it is consistent with what you guys are saying:

r_x = x1 - x0
r_y = y1 - y0

x2 = x0 + (r_x * Cos(theta) - r_y * Sin(theta))
y2 = y0 + (r_y * Cos(theta) + r_x * Sin(theta))
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top