diagrams-lib-1.4.2.2: Embedded domain-specific language for declarative graphics

Copyright (c) 2014 diagrams team (see LICENSE) BSD-style (see LICENSE) diagrams-discuss@googlegroups.com None Haskell2010

Diagrams.Transform.Matrix

Description

Functions for converting between Transformations and matricies.

Synopsis

# Documentation

mkMat :: (HasBasis v, Num n) => Transformation v n -> v (v n) Source #

Build a matrix from a Transformation, ignoring the translation.

mkMatHomo :: Num n => Transformation V3 n -> M44 n Source #

Build a 3D transformation matrix in homogeneous coordinates from a 'Transformation V3'.

fromMat22 :: Floating n => M22 n -> V2 n -> T2 n Source #

Make a 2D transformation from a 2x2 transform matrix and a translation vector. Does not check if the matrix is not invertible (in which case the T2 will be invalid).

fromMat33 :: Floating n => M33 n -> V3 n -> T3 n Source #

Make a 3D transformation from a 3x3 transform matrix and a translation vector. Does not check if the matrix is not invertible (in which case the T3 will be invalid).

Arguments

 :: (Additive v, Distributive v, Foldable v, Num n) => v (v n) matrix -> v (v n) inverse -> v n translation -> Transformation v n

Build a transform with a maxtrix along with its inverse.

mat22 :: Floating n => Iso' (M22 n, V2 n) (T2 n) Source #

Prism onto a 2D transformation from a 2x2 transform matrix and translation vector. Does not check if the matrix is invertible (in which case the T2 will be invalid).

mat33 :: Floating n => Iso' (M33 n, V3 n) (T3 n) Source #

Prism onto a 3D transformation from a 3x3 transform matrix and translation vector. Does not check if the matrix is invertible (in which case the T3 will be invalid).