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

Copyright(c) 2014 diagrams team (see LICENSE)
LicenseBSD-style (see LICENSE)
Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone
LanguageHaskell2010

Diagrams.ThreeD.Projection

Contents

Description

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.

Synopsis

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.

lookingAt Source

Arguments

:: (Epsilon n, Floating n) 
=> P3 n

Eye

-> P3 n

Center

-> Direction V3 n

Up

-> AffineMap V3 V2 n 

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.