Matrix division?
i searched a little, and couldn''t find anything on dividing matrices. i''m working on a matrix stack, and i thought it''d be way better if i could simply divide the transform by the matrix being popped to update the transform, instead of having to use a function that rebuilds the whole thing (possibly many matrices). i checked the matrix and quaternion faq, it didn''t have anything.
I''m taking linear algebra right now, and as far as I know you cannot divide by a matrix.
-YoshiXGXCX ''99
I don''t think such an operation is common as i haven''t heard of a use for it before. But doing some thinking if you want to divide matrix A by matrix B, then multiplying A by the inverse of B will give the desired result.
GSACP: GameDev Society Against Crap PostingTo join: Put these lines in your signature and don't post crap!
to divide by a matrix you would indeed multiply by its inverse. But don''t. The way matrix stacks work is that, when you "push" the matrix, a copy of it is saved in an array. you can then perform some transformations, render some triangles, then "pop" that saved version back from the stack. It doesn''t rebuild the matrix from all previouse transformations, it simply copies the saved version back to the active matrix. It is a whole lot faster than calculating an inverse matrix and multiplying by it.
i thought a matrix stack was for things like bone animation, where you would push say the chest, then the upper leg, then lower leg, then foot, etc. to insure that they are ordered correctly. maybe i programmed something else on accident, lol.
can the problem be approached by angular realignment of vectors?
the matrix is like this isnt it?
Xx Yx Zx
Xy Yy Zy
Xz Yz Zz
I did a slow 3d system that didnt use matricies like this that might work.
the aims is to select an axis and rotate it, and all the others so that the vector becomes
100
010
001 and that you store the ''derotation'' angles a,b,c
firstly I''d find ''a'' by de-rotating Z around the X axis,
then ''b'' by de-rotating X around the Y axis
and finaly, ''c'' by de-rotating X around the Z axis
then you have 3 angles, a,b,c. To get the old set of vectors you rotate the vectors in the order c,b,a around the z axis, y axis and x axis.
Now this sort of works it was an alternative to matricies since at the time i didnt understand them - and I''d generated the necessary inverse by doing -c,-b,-a.... ...but now I wonder what:
a/k,b/k,c/k means?
I wonder if this would be a reasonable transition matrix? obviously, when k=1 it would be the same set of vectors/matrix that we had before, but would a on those angles reconstructing k/2 be the same as matrix M/k?
the matrix is like this isnt it?
Xx Yx Zx
Xy Yy Zy
Xz Yz Zz
I did a slow 3d system that didnt use matricies like this that might work.
the aims is to select an axis and rotate it, and all the others so that the vector becomes
100
010
001 and that you store the ''derotation'' angles a,b,c
firstly I''d find ''a'' by de-rotating Z around the X axis,
then ''b'' by de-rotating X around the Y axis
and finaly, ''c'' by de-rotating X around the Z axis
then you have 3 angles, a,b,c. To get the old set of vectors you rotate the vectors in the order c,b,a around the z axis, y axis and x axis.
Now this sort of works it was an alternative to matricies since at the time i didnt understand them - and I''d generated the necessary inverse by doing -c,-b,-a.... ...but now I wonder what:
a/k,b/k,c/k means?
I wonder if this would be a reasonable transition matrix? obviously, when k=1 it would be the same set of vectors/matrix that we had before, but would a on those angles reconstructing k/2 be the same as matrix M/k?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement