affineMap

Purpose

Compute the affine map of the Polyhedron.

Syntax

Q = P.affineMap(T)
Q = P.affineMap(T,method)
Q = affineMap(P,T,method)

Description

Computes an affine map ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/affinemap1.png of polyhedron P to polyhedron Q based on the transformation matrix ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/affinemap2.png. The polyhedron Q is given by

../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/affinemap6.png

The matrix T must be real with n rows and d columns.

Input Arguments

P

Polyhedron in any format.

Class: Polyhedron

T

Transformation matrix.

Class: double

method

Specific method to use in projection operation. Allowed methods are "vrep", "fourier", and "mplp". For details type "help Polyhedron/projection".

Class: string

Output Arguments

Q

Polyhedron representing the affine map in H- or V-representation.

Class: Polyhedron

Example(s)

Example 1

Projection of the rectangle described in 2D.Define the rectangle P in V-representation.
P = Polyhedron([0 0; 5 0; 5 3; 0 3]);
Compute the affine map of the rectangle with the matrix [-1 0.5] 
Q = P.affineMap([-1 0.5]) 
Polyhedron in R^1 with representations:
    H-rep               : Unknown (call computeHRep() to compute)
    V-rep (redundant)   : Vertices   4 | Rays   0
Functions : none
We can see that Q is in dimension 1 while P is in dimension 2.
plot([P,Q],'LineWidth',3); axis([-6 6 -1 4]); 

../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/affinemap_img_1.png

Example 2

Rotation of the rectangle described in 2D.Compute the affine map of the rectangle with the matrix [-1 0.5; -2 3]
R = P.affineMap([-1 0.5; -2 3]) 
Polyhedron in R^2 with representations:
    H-rep               : Unknown (call computeHRep() to compute)
    V-rep (redundant)   : Vertices   4 | Rays   0
Functions : none
We can see that Q remains in dimension 2.
plot([P,R]); 

../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/affinemap_img_2.png

Example 3

Lifting of the rectangle described in 2D.Compute the affine map of the rectangle with the matrix [-1 0.5; -2 3; 0.8 -1.4]
S = P.affineMap([-1 0.5; -2 3;-4 5]) 
Polyhedron in R^3 with representations:
    H-rep               : Unknown (call computeHRep() to compute)
    V-rep (redundant)   : Vertices   4 | Rays   0
Functions : none
We can see that S is in dimension 3.
plot([P,S]); 

../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/affinemap_img_3.png

See Also

projection, affinehull


© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch