Copyright | (c) 2014 diagrams team (see LICENSE) |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | diagrams-discuss@googlegroups.com |
Safe Haskell | None |
Language | Haskell2010 |
3D projections are a way of viewing a three-dimensional objects on a two-dimensional plane.
This module can be used with the functions in Linear.Projection.
Disclaimer: This module should be considered experimental and is likely to change.
- facingXY :: (Epsilon n, Floating n) => AffineMap V3 V2 n
- facingXZ :: (Epsilon n, Floating n) => AffineMap V3 V2 n
- facingYZ :: (Epsilon n, Floating n) => AffineMap V3 V2 n
- isometricApply :: (InSpace V3 n a, InSpace V2 n b, AffineMappable a b, Floating n, Epsilon n) => Direction V3 n -> a -> b
- isometric :: (Floating n, Epsilon n) => Direction V3 n -> AffineMap V3 V2 n
- lookingAt :: (Epsilon n, Floating n) => P3 n -> P3 n -> Direction V3 n -> AffineMap V3 V2 n
- m44AffineApply :: (InSpace V3 n a, InSpace V2 n b, AffineMappable a b) => M44 n -> a -> b
- m44AffineMap :: Num n => M44 n -> AffineMap V3 V2 n
- m33AffineApply :: (InSpace V3 n a, InSpace V2 n b, AffineMappable a b) => M33 n -> V2 n -> a -> b
- m33AffineMap :: Num n => M33 n -> V2 n -> AffineMap V3 V2 n
- m44Deformation :: Fractional n => M44 n -> Deformation V3 V2 n
- module Linear.Projection
Orthographic projections
Orthographic projections are a form of parallel projections where are projection lines are orthogonal to the projection plane.
facingXY :: (Epsilon n, Floating n) => AffineMap V3 V2 n Source #
Look at the xy-plane with y as the up direction.
facingXZ :: (Epsilon n, Floating n) => AffineMap V3 V2 n Source #
Look at the xz-plane with z as the up direction.
facingYZ :: (Epsilon n, Floating n) => AffineMap V3 V2 n Source #
Look at the yz-plane with z as the up direction.
axonometric
Axonometric projections are a type of orthographic projection where the object is rotated along one or more of its axes relative to the plane of projection.
Isometric projections
Isometric projections are when the scale along each axis of the projection is the same and the angle between any axis is 120 degrees.
isometricApply :: (InSpace V3 n a, InSpace V2 n b, AffineMappable a b, Floating n, Epsilon n) => Direction V3 n -> a -> b Source #
Apply an isometric projection given the up direction
isometric :: (Floating n, Epsilon n) => Direction V3 n -> AffineMap V3 V2 n Source #
Make an isometric affine map with the given up direction.
Affine maps
m44AffineApply :: (InSpace V3 n a, InSpace V2 n b, AffineMappable a b) => M44 n -> a -> b Source #
Apply the affine part of a homogeneous matrix.
m44AffineMap :: Num n => M44 n -> AffineMap V3 V2 n Source #
Create an AffineMap
from a 4x4 homogeneous matrix, ignoring any
perspective transforms.
m33AffineApply :: (InSpace V3 n a, InSpace V2 n b, AffineMappable a b) => M33 n -> V2 n -> a -> b Source #
Apply a transformation matrix and translation.
m33AffineMap :: Num n => M33 n -> V2 n -> AffineMap V3 V2 n Source #
Create an AffineMap
from a 3x3 transformation matrix and a
translation vector.
Perspective projections
Perspective projections are when closer objects appear bigger.
m44Deformation :: Fractional n => M44 n -> Deformation V3 V2 n Source #
Make a deformation from a 4x4 homogeneous matrix.
module Linear.Projection