As promised, here is an explanation of the coordinate transform part of the lecture I gave on viewing...
As you may recall, we used the following example to visualize what we were trying to do:
Point p could be written in terms of either the xy-coordinate system or the uv-coordinate system.
Let's say we have point p in terms of uv. We would write that as (up,vp), as in the u and v coordinates of point p. We want a matrix that can give us that point in terms of xy: (xp,yp). An easy way to do this is find the linear combination of the basis vectors u and v, but with those vectors written with their coordinates relative to xy.
To make life even easier, we can imagine temporarily translating u and v so that the point e lines up with the xy-coordinate system's origin o:
Then we can easily write u and v with xy coordinates: u=(xu,yu) and v=(xv,yv). That's what gives us the first matrix we multiplied (up,vp) by in the coordinate transform:
This matrix multiplication results in the same linear combination of u and v we had before, except now we are multiplying p with the xy coordinates of these basis vectors rather than their usual uv values.
The result will almost be the point p in xy coordinates... we just have to compensate for the fact that we moved u and v to overlap with x and y. Since we know we translated the basis vectors by the distance from o to e, we can move our resulting point to its proper home by translating it back. That distance in xy-coordinates is xe and ye.
This will hopefully make sense to you all now (it finally makes sense to
me! heh), but please feel free to ask further questions in the comments
or via email if I can clarify any little bit of it.
Note: While I'm sure the slides will be posted on the course webpage/WebCT, you can download them here now if you'd like. Remember that there are explanations in the notes section.
No comments:
Post a Comment