Rotating Points using a Matrix

Al Borland

New member
Joined
Apr 7, 2011
Messages
4
I'm having issues with an assignment my teacher gave me. I thought I had everything going well until I plotted it out. I found that my coordinates for the plotted points turned into an entirely different shape instead of just rotating it.

Here is the problem that I was requested to do:

On paper, draw the “house” object defined by the 5 points:
(-1,0), (1,0), (1,2), (0,3) and (-1,2).

Then do the following steps by hand:
a. Write down the matrices R and T that apply a rotation by 60º and a translation
by <4, 2> respectively.

b. Apply R to each point, and then with the result of this first multiplication, apply
T. i.e. For each point, calculate p’ = Rp and graph the result as accurately as you
can. Then calculate p’’ = Tp’ for each of the points you just calculated, and
graph the result. Your graph should show three versions of the house.

For Part A i created the matrix

R = { xcos(60) - ysin(60) }
{ xsin(60) + ycos(60) }
as far as I know for non homogeneous lines this is what we do. The plot points I get for reach one keep turning out wrong though and not maintaining a shape. I went through all my points again and came up with the same answer for each point's value.

Can anyone help me figure out where I am going wrong here?
 
Al Borland said:
R = { xcos(60º) - ysin(60º) }
{ xsin(60º) + ycos(60º) }

This is not matrix R.

Instead, this is what you get after matrix multiplication of R times an original point (x, y).

Remove the variables x and y from your matrix above.

In other words, after rotating the coordinate system 60º, the coordinates of the new points (X, Y) are:

X = x cos(60º) - y sin(60º)

Y = x sin(60º) + y cos(60º)

I applied the rotation, and I get the image below.

 

Attachments

  • Hurricane.JPG
    Hurricane.JPG
    24.7 KB · Views: 58
okay I am having an issue here when i try to input in (3,0) I'm not getting the same last coordinate here as you are mine is giving me like (1.5, 2.5) whats going on here?
 
Sorry for the multiple posts but i cant see and edit them till they are approved. I figured out what I was doing wrong i reversed the (0,3) and made it (3,0) for some reason.
 
Top