Re: Extracting The Scaling Component Of A Matrix

Arjen Nienhuis <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAG6W84JJ7t447jK29gSnZNcN_Dh2rPC6_h3ZZsztpjBfiBRehg@mail.gmail.com>
> Yeah... You have to define what exactly you want.  A 2D matrix like the ones
> cairo uses can always be decomposed into a concatenation of the following
> matrices:
>
>   - transform

transform is what cairo calls translate right?

>   - rotate
>   - skew
>   - scale
>
> This has many useful properties, and you can derive those four transformations
> from an arbitrary matrix easily.  Here's my derivation:
>
> https://readable-email.org/list/www-style/topic/better-matrix-decomposition-for-animation
>
> This also describes the benefits of such decompositions:
>
> http://research.cs.wisc.edu/graphics/Courses/838-s2002/Papers/polar-decomp.pdf
>
> If you transform a circle with a matrix, you get an ellipse.  If you are
> interested in the major and minor axes of that ellipse, that's a Singular
> Value Decomposition of the 2D matrix.  I've put code here for doing that:
>
> https://github.com/behdad/cairo/blob/color-emoji/doc/tutorial/src/singular.c
>
> Cheers,
>
> behdad
> --
> cairo mailing list
> [email protected]
> http://lists.cairographics.org/mailman/listinfo/cairo
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.