Scaling the matrix


RE: Scaling the matrix
#11
(2019-11-06, 9:33)Owen Dive Wrote: No - at least, not necessarily. Rotate a part about some arbitrary axis and you'll see all 9 numbers in the matrix change.

I don't remember what the mathematical terminology is (and I may even get some of this completely wrong!) but it goes something like this:
Imagine you have a part and you want to describe its position and orientation relative to some coordinate system. Position is easy, you say "the centre of the part is at so many units along the x axis, so many along the y axis, and so many along the z axis". But orientation is not so clear. You have to say something like "If I start at the centre of the part, and go forward one unit relative to the part, I'll end up at position x1, y1, z1, and if I go left one unit relative to the part, I end up at position x2, y2, z2, and if I go up one unit, I end up at x3, y3, z3". The 9 numbers in the matrix are the coordinates of these three points.

Now suppose I want to scale in the (say) front/back axis, by a factor of 2. I can start at the centre of the part and move _2_ units forward. I'll end up at position 2*x1, 2*y1, 2*z1. If I put those numbers in my matrix, the rendering engine will assume that those coordinates were generated at 1 unit distance, and draw all the pixels two times further forward than before.

Does that make it any clearer? Or have I just made it more confusing?

Edit: Actually, on re-reading this thread, I suspect that you probably understand all that. If I could delete my post, I would.

Yeah, I guess what I was asking was more like what each separate box can be said to represent. The boxes themselves aren't complete coordinates, but factors—amounts of change, I guess? And you're right, when you combine transformations (such as rotating around multiple axes), you'll end up populating more boxes than with a single operation (and combining the values of some boxes together).

But is there a simply way to say, for example, the top-left box represents the ratio of an original x value to its new x position, and so forth?
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Scaling the matrix - by N. W. Perry - 2019-11-04, 17:30
RE: Scaling the matrix - by Johann Eisner - 2019-11-04, 20:32
RE: Scaling the matrix - by Travis Cobbs - 2019-11-04, 22:05
RE: Scaling the matrix - by Johann Eisner - 2019-11-04, 22:19
RE: Scaling the matrix - by N. W. Perry - 2019-11-05, 11:47
RE: Scaling the matrix - by Philippe Hurbain - 2019-11-05, 17:35
RE: Scaling the matrix - by Roland Melkert - 2019-11-05, 19:41
RE: Scaling the matrix - by Philippe Hurbain - 2019-11-05, 20:10
RE: Scaling the matrix - by N. W. Perry - 2019-11-06, 6:00
RE: Scaling the matrix - by Owen Dive - 2019-11-06, 9:33
RE: Scaling the matrix - by N. W. Perry - 2019-11-08, 15:35
RE: Scaling the matrix - by Travis Cobbs - 2019-11-08, 21:11
RE: Scaling the matrix - by Roland Melkert - 2019-11-08, 21:34
RE: Scaling the matrix - by N. W. Perry - 2019-11-09, 5:11
RE: Scaling the matrix - by N. W. Perry - 2020-03-28, 2:04
RE: Scaling the matrix - by Roland Melkert - 2020-03-28, 2:38
RE: Scaling the matrix - by N. W. Perry - 2020-03-28, 5:08
RE: Scaling the matrix - by Roland Melkert - 2020-03-28, 19:21
RE: Scaling the matrix - by N. W. Perry - 2020-03-28, 20:53
RE: Scaling the matrix - by Roland Melkert - 2020-03-28, 21:59
RE: Scaling the matrix - by N. W. Perry - 2020-03-29, 1:28

Forum Jump:


Users browsing this thread: 1 Guest(s)