Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to extract matrix coefficients from a Transformation #22

Closed
fryguybob opened this issue Aug 4, 2012 · 0 comments · Fixed by #36
Closed

Function to extract matrix coefficients from a Transformation #22

fryguybob opened this issue Aug 4, 2012 · 0 comments · Fixed by #36

Comments

@fryguybob
Copy link
Member

(Imported from http://code.google.com/p/diagrams/issues/detail?id=81. Original issue from byor...@gmail.com 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:

http://hackage.haskell.org/packages/archive/diagrams-cairo/0.5.0.1/doc/html/src/Diagrams-Backend-Cairo-Internal.html#cairoTransf

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants