Skip to content

Function to extract matrix coefficients from a Transformation #22

Closed
@fryguybob

Description

@fryguybob

(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:

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions