The original vector is the (x, y) pair. For example, let’s say that we have a triangle defined by three points (1, 2), (2, 2), (2, 3). To mirror in the y axis, we simply multiply each point by the mirroring matrix to get (-1, 2), (-2, 2), (-2, 3). Of course, this is a really easy example, and as you have pointed out, the same effect can be achieved by simply negating the x co-ordinate. Matrices really become useful when you have to mirror in an arbitrary line, for instance.
Sorry about that. Here is a 2 X 2 example worked to to illustrate the first method. No doubt it isn’t a lot easier this way than to just eliminate one of the unknowns in the original simultaneous equations for such a simple case. However as things get more complex th matrix solution gains some advantage. And, as others have pointed the matrix method is well suited to computer programming.
If you have any questions about what is going on ask for clarification. If I can understand the basics of matrix manipulation believe me, anyone can.
That you understand something is no indication somebody else will, Dave. You seem to have a damned good handle on anything you post on.
Well, let me offer a little insight into how matrices are used in 3d graphics. Basically, the movement (transformation) of an object can be described by a the rotation of the object around the origin (0, 0, 0), the enlargement or reduction of the size of the object (scaling) and a final offset (called the translation) of the object following the rotation. The rotation and scaling can be described together by a 3x3 matrix, and the translation can be described with a 3-element vector. For convenience’s sake, we define every point as a 4-vector, with the element x, y, z and 1 appended to the end, and we define the transformation matrix as a 4x4 matrix with the 3x3 matrix in the top left corner, the translation vector directly below that 3x3 matrix, and in the 4th column put the column-vector (0, 0, 0, 1).
Now, by defining things this way, we gain a lot of utility. There is the ability to use a matrix hierarchy to simulate an object “skeleton”. For instance, there is the simulation of a person’s skeleton. The person has the ability to move about in the world and rotate about its own center of mass. The shoulder itself can rotate around the point where it connects to the torso. We can represent each transformation by a 4x4 matrix and multiply them together (called the concatenation) to get the transformation of the arm into the world. We can further define the movement of the elbow relative to the shoulder, the wrist relative to the elbow, and the movement of an object that was thrown from the hand relative to the wrist. By concatenating each of these matrices in turn, we can calculate the location of that object in the world by transforming all of the points in that object by the resulting matrix. We call that final matrix the transformation from “object space” to “world space”.
We can also represent the location and direction of the viewpoint by a 4x4 matrix, which we call the transformation of world space into “eye space”. Concatenating that to the world space matrix gives the transformation from object space to eye space. Finally, there is a kind of funky matrix that transforms an eye space point to a screen space point, representing the position on the screen that a point will be placed and how far away from the observer the point is, for representing which points are the closest to the observer for determining which point isn’t hidden by any others at that position on the screen.
Well, I don’t have any particular talent that is lacking in most. If you want to get a grasp on the rudiments of subjects like this it helps to get out a paper an pencil and go through the explanations, copying down the steps and drawing pictures if need be. Such material can’t be skimmed through like a comic book.
Matrices are at bottom nothing but a compact way of writing a set of simultaneous equations, or at least the useful ones are. There are rules about addition, subtraction and multiplication that are straightforward and for the basics that’s really all you need.
Of course, you can go as far into the subject as you like from there on.
Okay, as it was used to describe an action I make my computer perform many times a day, I sorta got that. I don’t yet get why it is more convenient to tack a random 1 on it to make it a 4-vector, what good it does to add an extra dimension when CAD only cares about three, or, for that matter, how a point can be a vector, lacking, as it does, direction, but I’m getting there.
Because otherwise every move will have the point (0,0,0) fixed.
Really we’re not considering all of 4-dimensional space here, but just a 3-dimensional “plane” that’s a little off from the origin. This allows us to slide the space around or to rotate around any point we want, not just some arbitrary origin.
Well, here’s the thing: it isn’t. However, when you pick an origin point (arbitrarily) then every point has a vector from the origin to it. Often, the point and the vector are sloppily identified.
Incidentally, the two questions are more deeply related than you may think. The whole point of pushing away from the origin in 4-d space is to not have that arbitrary “special” origin point in the 3-d space you’re looking at.
Ohhhhhh, you are talking about my present location as given and the starting point of the vector and the point we are defining in the matrix being the next location, describing the vector if you (or Punoqllads) tacks on the 1 as the magnitude (since magnitude isn’t used in CAD, 1 is as good a number as any and, I suppose, better than most). I get that part now and the rest I can get from online tutorials, saving the cost of the class. Thanks!
Not quite…
Here, drop a dimension down so you can visualize it. Consider the regular x-y plane, and say you want to move any point one unit to the right.
(x,y) -> (x+1,y)
This isn’t possible with 2x2 matrix calculations because all of those send (0,0) to itself; never to (1,0). But what if we give ourselves a little extra “wiggle room” by using a third number, 1.
(x,y,1) -> (x+1,y,1)
Now this is possible with 3x3 matrices.
[1 0 1] [x] [x+1]
[0 1 0] * [y] = [ y ]
[0 0 1] [1] [ 1 ]
In general, these operations look like
[a b c] [x] [ax + by + c]
[d e f] * [y] = [dx + ey + f]
[0 0 1] [1] [ 1 ]
See how the last entry stays 1. If c and f are both 0, then we can get back everything we could do with 2x2 matrices, now pushing around points on the plane of points with z-coordinate 1 in normal x-y-z space. If a and e are 1 while b and d are 0, we can slide these points around – something we couldn’t do with just 2x2 matrices.
Everything I’ve said raises up to the 3x3 case being expanded to 4x4 operations to include sliding space around.