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

Diagrams.ThreeD.Projection

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 #

Look at the xy-plane with y as the up direction.

facingXZ :: (Epsilon n, Floating n) => AffineMap V3 V2 n #

Look at the xz-plane with z as the up direction.

facingYZ :: (Epsilon n, Floating n) => AffineMap V3 V2 n #

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 #

Apply an isometric projection given the up direction

isometric :: (Floating n, Epsilon n) => Direction V3 n -> AffineMap V3 V2 n #

Make an isometric affine map with the given up direction.

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 #

Apply the affine part of a homogeneous matrix.

m44AffineMap :: Num n => M44 n -> AffineMap V3 V2 n #

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 #

Apply a transformation matrix and translation.

m33AffineMap :: Num n => M33 n -> V2 n -> AffineMap V3 V2 n #

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 #

Make a deformation from a 4x4 homogeneous matrix.