Description
(Imported from http://code.google.com/p/diagrams/issues/detail?id=81. Original issue from [email protected] on April 29, 2012, 02:28:27 AM UTC)
The Transform module in diagrams-core ought to export function(s) for converting a Transformation into a matrix form. It's generally useful and not difficult. See the cairo backend for an example of how it's done for T2:
To make it work generically over the vector space requires a tiny bit more work -- i.e. get a list of basis vectors and then apply the transformation to them. Maybe it ought to result in a Map from basis vectors to result vectors, plus an extra vector representing translation.
We can then also put a specialized version for T2 (and for T3) into diagrams-lib.