diagrams/diagrams-lib — pull request #148 by bergey (2014-01-24 15:05:13+00:00)
Title: Projections - non-affine transformations

This is a proposal for non-affine transformations, which I've provisionally called Projections. It depends on https://github.com/diagrams/diagrams-core/pull/50

Before this is ready to merge, we should choose a better name for applying a Projection. The obvious choice `project` conflicts with `Data.VectorSpace.project`. A couple of thoughts; I hope someone has better ideas:
* warp
* distort
* stretch

Should this new type represent only projective transforms, or something more general? Either is fine with me, but I'd like to make it more clear in the docs. I originally set out to provide projective transforms, per #108. The current implementation is more general. The `Projection` type supports any spatial map, though small wiggles will probably be missed in the segment subdivision / approximation.

The answer to that might help inform the function name, and also whether it's semantically sensible to use `Data.LinearMap` inside `Projection`. I used `LinearMap` in an earlier version, and I'm happy to put it back in.

The use-cases I have in mind are illustrations of perspective, and quick-and-dirty 3D wireframes by transforming `Path`s in 3D, transforming to 2D, and using the 2D Backends. The latter requires 3D Paths and https://github.com/diagrams/diagrams-lib/issues/117