Jump to content
  • Advertisement
Sign in to follow this  
terryeverlast

Change of coordinate matrix

This topic is 1238 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do I do what is in the picture?

2unvsxd.jpg

 

I took the point * change of coordinate matrix * scale matrix but it didn't work.

 

[1,1,0,1] * [1 0 0 0, 0 1 0 0, 0 0 1 0, 2 2 0 1] * [2 0 0 0, 0 1 0 0, 0 0 1 0, 0 0 0 1]

 

this didn't work.

 

Share this post


Link to post
Share on other sites
Advertisement
You need to apply a translation to move the point (2,2) to the origin, then do the scaling, then undo the translation.

http://www.wolframalpha.com/input/?i={{1%2C0%2C2}%2C{0%2C1%2C2}%2C{0%2C0%2C1}}.{{2%2C0%2C0}%2C{0%2C1%2C0}%2C{0%2C0%2C1}}.{{1%2C0%2C-2}%2C{0%2C1%2C-2}%2C{0%2C0%2C1}}

EDIT: Sorry, I follow the convention that points and vectors are columns, not rows. Transpose everything if you wish. Edited by Álvaro

Share this post


Link to post
Share on other sites

Ok. after I multiply all these matrix with the point, will one matrix do it all for all four points of the box. or do I have to change the coordinate of the points .that is one negative x value and the other positive .

 

like in order to make [1,1,0]  to [4,1,0]......I use point [1,1,0]

to make [1,1,0] to [0,1,0]..I use point [-1,1,0]

Share this post


Link to post
Share on other sites
Yes, one matrix is used to transform all the points.

The matrix I provided is used in the following way: If you multiply it by the column (1,1,1) on the right, you'll get the column (0,1,1) back. Similarly, if you multiply it by the column (3,3,1), you'll get (4,3,1) back.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!