Hi Regina,

On 18.11.2013 23:45, Regina Henschel wrote:
Hi all,

the B3DHomMatrix has a method decompose(...) which results tuples rScale, rTranslate, rRotate and rShear.

I do not understand the meaning of rShear. How are the rShear values used to re-compose the original matrix? When I decompose a matrix with only scale and rotation following the algorithm, then re-compose works. But I have no idea how it is intended to work with shearing.

Please have a look at http://en.wikipedia.org/wiki/Shear_matrix for shearing in general. You might think of it as 'bending' the geometry 'out of the right angle'... In 2D, the composition is scale, shear, rotate, translate. In 3D it's the same, but we have three shear values (x against Y, Y against Z, Z against X), thus the order may vary, but should be the same as at decomposition. In B3DHomMatrix::decompose the order of shear extraction is: ShearXY, ShearXZ and ShearYZ, thus the linear combination should be vice versa; all in all for 3D it should be: scale(x,y,z), shearYZ, ShearXZ, ShearXY, rotate(x,y,z), translate(x,y,z). Btw: 2D has 6 deg of freedom and decompose gives ShearX. It would also be possible to get ShearY, these two values are not linearly independent. More can be found in the book 'Computer Graphics: Principles and Practice' from James D. /Foley/, Andries van Dam, Steven K. /Feiner/, John F. /Hughes/ which I can recommend.

HTH!


There seem to be no code currently, which uses shearing; at least I do not find anything. But because a transformation matrix can include shearing, I want to know, how it works, and hope someone can give me a tip.

Kind regards
Regina


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

--
ALG

Reply via email to