Formulas for Rotation and Translation

In summary, the coordinate system (x, y) is rotated by 90° in the clockwise direction. The coordinates of the origin after translation are (3,4).
  • #1
JC2000
186
16
Moved from a technical forum, so homework template missing
Given the coordinates ##P = (3,4)## , find the coordinates of ##P"(x',y')## when the origin is shifted to (1, –2), and the axes are rotated by 90° in the clockwise direction.

I attempted to solve this problem using the following formulas :

##x = X + h## and ##y = Y + k## for translation of the coordinate system. And the table below for rotation of the axes where (x,y) are the coordinates before rotation :
\begin{array}{|c|c|c|c|}
\hline
& x & y\\ \hline
x'&cos \theta & sin \theta\\ \hline
y'&-sin \theta &cos \theta &\\ \hline
\\ \hline.
\end{array}

Since Rotation followed by Translation of the axes or vice versa should give the same result, I attempted to solve it in multiple ways but did not get the same result.

x,y are the coordinates before transformation while x',y' are coordinates after transformation. h,k represent the coordinates of the origin after translation.)

Case 1 : Translation followed by Rotation
Using the above formulas I got the following results :
$$x'= (x-h)cos \theta + (y-k)sin\theta$$ and $$y' = -(x-h)sin\theta + (y-k)cos\theta$$ ...(A)

OR

$$x-h = x'cos\theta - y'sin\theta$$ and $$y-k = x'sin\theta + y'cos\theta$$ ...(B)

Case 2 : Rotation followed by Translation :
$$x = (x'+h)cos\theta - (y'+k)sin\theta$$ and $$y = (x'+h)sin\theta + (y'+k)cos\theta$$...(C)

OR

$$x'+ h = xcos\theta + ysin\theta A$$ and $$y'+k = -xsin\theta + ycos\theta$$...(D)

Upon plugging in the values (A) and (B) gave matching answers with ##P"(-6,2) ##whereas using (C) and (D) gave ##P"(-5,5)##.

Thus I had the following questions:
1. Are the formulas (A),(B),(C),(D) correct?
2. If not, then why?
 
Physics news on Phys.org
  • #2
JC2000 said:
Since Rotation followed by Translation of the axes or vice versa should give the same result
Really? Try to visualise what is happening. What if the original point is (0,0)?
 
  • Like
Likes JC2000 and PeroK
  • #3
DrClaude said:
Really? Try to visualise what is happening. What if the original point is (0,0)?

After trying to visualize the process I believe that the two results would be different since...

Case 1 : Rotate then Translate - Here the translation occurs with reference to the new coordinate axes (axes which have been rotated slightly with respect to the original axes).

Case 2 : Translate then Rotate - Here the translation occurs with respect to the original axes and thus represents a different point.

a)And hence the difference in result?!

b)Is this why (A) matches (B) while (C) matches (D)?

c) If this is the case then (A),(B) hold only for Translation followed by Rotation while (C), (D) hold only for Rotation followed by Translation.

 
  • #4
JC2000 said:
a)And hence the difference in result?!

b)Is this why (A) matches (B) while (C) matches (D)?

c) If this is the case then (A),(B) hold only for Translation followed by Rotation while (C), (D) hold only for Rotation followed by Translation.

Correct.
 
  • Like
Likes JC2000
  • #5
DrClaude said:
Correct.

Thank you very much!
 
  • #6
Notice you can also check by using matrices, EDIT rotations are linear operations. Translations are affine.
 
Last edited:
  • Like
Likes JC2000
  • #7
WWGD said:
check by using matrices, since both rotation
I am unfamiliar with the use of matrices for transformations, I would be grateful if you would share a few links regarding the topic. Thanks!
 
Last edited:
  • #8
JC2000 said:
I am unfamiliar with the use of matrices for transformations, I would be grateful if you would share a few links regarding the topic. Thanks!
Sure,
https://en.wikipedia.org/wiki/Rotation_matrix
Please note my edit: translations are NOT linear, they are what you call affine.
Please let me know if you want/need something else on this.
 
  • #9
Maybe you should think the rotation again. I mean I think you have got the correct formula for a general rotation which will be useful in future.
But a rotation through 90° is really very simple – off the back of your head almost you could say what does the point (a, b) relative to the original x, y axes, become relative to the rotated axes?

This would serve you as a check, and in getting habit of looking for simple solutions even if you can also get them longhand.
 
  • Like
Likes neilparker62 and JC2000
  • #10
epenguin said:
Maybe you should think the rotation again. I mean I think you have got the correct formula for a general rotation which will be useful in future.
But a rotation through 90° is really very simple – off the back of your head almost you could say what does the point (a, b) relative to the original x, y axes, become relative to the rotated axes?

This would serve you as a check, and in getting habit of looking for simple solutions even if you can also get them longhand.

Yes, (a,b) would be (b.-a) when the axes are rotated counter-clockwise and (-b,a) when rotated clockwise?! I was actually struggling with the general case and hence I picked the first problem I came across to try and list all possible cases, nonetheless using a simple case does seem useful. Strangely when I tried to do the rotation by 90 degrees off the back of my head I struggled quite a bit. Thanks.
 
  • #11
WWGD said:
Sure,
https://en.wikipedia.org/wiki/Rotation_matrix
Please note my edit: translations are NOT linear, they are what you call affine.
Please let me know if you want/need something else on this.

Are there matrices for transformations? Also you used the terms 'linear operations' and 'affine transformation', I looked them up on wikipedia and there seemed to be a fair bit of content related to them. Is there an overarching 'topic' that they link to? If so, is there a resource that you would recommend that systematically deals with it. Thank you for your time.
 
  • #12
JC2000 said:
Are there matrices for transformations? Also you used the terms 'linear operations' and 'affine transformation', I looked them up on wikipedia and there seemed to be a fair bit of content related to them. Is there an overarching 'topic' that they link to? If so, is there a resource that you would recommend that systematically deals with it. Thank you for your time.
Sorry, JC2000, I will check something more specific/focused. I will be a bit loose with the terms to avoid being confusing. There is a correspondence (bijection, meaning a map that assigns to every linear map a unique matrix and viceversa) between linear transformations and matrices. A linear map is , essentially, one in which the output is directly proportional to the input , e.g., if we double the input, we double the output ( notice, e.g., ## f(x) = x^2 ## is _not_ linear , as ##f(6)=36 \neq 2f(3)=18 ##). I will look for something else.
 
  • Like
Likes JC2000
  • #13
WWGD said:
Sorry, JC2000, I will check something more specific/focused. I will be a bit loose with the terms to avoid being confusing. There is a correspondence (bijection, meaning a map that assigns to every linear map a unique matrix and viceversa) between linear transformations and matrices. A linear map is , essentially, one in which the output is directly proportional to the input , e.g., if we double the input, we double the output ( notice, e.g., ## f(x) = x^2 ## is _not_ linear , as ##f(6)=36 \neq 2f(3)=18 ##). I will look for something else.

1.So linear maps/transformations are essentially linear functions?
2.What would be a nonlinear transformation?
3. Is the statement regarding the mapping being bijective an axiom?

Do all these topics fall under Linear Algebra? Since, in that case I will encounter that area in due course of time.
 
  • #14
JC2000 said:
1.So linear maps/transformations are essentially linear functions?
2.What would be a nonlinear transformation?
3. Is the statement regarding the mapping being bijective an axiom?

Do all these topics fall under Linear Algebra? Since, in that case I will encounter that area in due course of time.

1) Yes. You may also have operators, which are functions defined on functions. Integration is an example ## \int (f+g)= \int f + \int g ##, differentiation too.
2) ##Cosx, Sinx, x^n ; n \neq 1 ##, Basically when multiplying the input by k does not increase the output by k. ## Cos(x+y) \neq Cosx + Cosy ; \sqrt {x+y} \neq \sqrt x + \sqrt y ##
3) It is a theorem: Once you set up an ordered basis, there is a well-defined bijection between matrices and linear transformations.
 
  • Like
Likes JC2000
  • #15
WWGD said:
1) Yes. You may also have operators, which are functions defined on functions. Integration is an example ## \int (f+g)= \int f + \int g ##, differentiation too.
2) ##Cosx, Sinx, x^n ; n \neq 1 ##, Basically when multiplying the input by k does not increase the output by k. ## Cos(x+y) \neq Cosx + Cosy ; \sqrt {x+y} \neq \sqrt x + \sqrt y ##
3) It is a theorem: Once you set up an ordered basis, there is a well-defined bijection between matrices and linear transformations.

1) So linear transformation = linear operator = linear mapping?
2) The examples you gave are non linear functions and are also nonlinear operators/transformations, since you said that operators are functions defined using other functions?
3) Also, why is there a unique term for functions defined on functions? Does this all become apparent once I start linear algebra?
 
  • #16
JC2000 said:
1) So linear transformation = linear operator = linear mapping?
2) The examples you gave are non linear functions and are also nonlinear operators/transformations, since you said that operators are functions defined using other functions?
1)Yes. But you see, there is no uniformity of notation/usage in Mathematics, so I don't want to give you a definitive answer. Integration, differentiation are linear operators. Inversion, i.e., ## f \rightarrow 1/f ## ( assuming ## f \neq 0 )##,is not a linear operator.
2) Considering the answer in 1), yes.
 
  • Like
Likes JC2000
  • #17
epenguin said:
Maybe you should think the rotation again. I mean I think you have got the correct formula for a general rotation which will be useful in future.
But a rotation through 90° is really very simple – off the back of your head almost you could say what does the point (a, b) relative to the original x, y axes, become relative to the rotated axes?

This would serve you as a check, and in getting habit of looking for simple solutions even if you can also get them longhand.

$$P(x,y) → P'(x-1 ; y+2) → P''( -(y+2); x-1) $$
 

1. What are the basic formulas for rotation and translation?

The basic formulas for rotation and translation are:

  • Rotation: x' = xcosθ - ysinθ, y' = xsinθ + ycosθ
  • Translation: x' = x + tx, y' = y + ty

2. How do I rotate an object around a specific point?

To rotate an object around a specific point, you can use the following formula:

  • x' = (x - cx)cosθ - (y - cy)sinθ + cx
  • y' = (x - cx)sinθ + (y - cy)cosθ + cy

Where (cx, cy) is the center point of rotation.

3. What is the difference between 2D and 3D rotation?

The main difference between 2D and 3D rotation is the number of dimensions involved. In 2D rotation, objects rotate around a single axis, while in 3D rotation, objects can rotate around multiple axes.

4. Can I use the same formula for both rotation and translation?

No, rotation and translation are two different transformations and require different formulas. The formula for rotation involves trigonometric functions, while the formula for translation only involves adding or subtracting a constant value.

5. How do I combine rotation and translation in a single transformation?

To combine rotation and translation, you can use the following formula:

  • x' = (x - cx)cosθ - (y - cy)sinθ + cx + tx
  • y' = (x - cx)sinθ + (y - cy)cosθ + cy + ty

This formula first rotates the object around the center point (cx, cy) and then translates it by (tx, ty).

Similar threads

  • Classical Physics
Replies
7
Views
722
  • Precalculus Mathematics Homework Help
Replies
9
Views
2K
  • Advanced Physics Homework Help
Replies
4
Views
381
  • Classical Physics
Replies
1
Views
526
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
20
Views
2K
Replies
8
Views
244
Replies
2
Views
988
  • Precalculus Mathematics Homework Help
Replies
8
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
2K
Back
Top