mtimes

Purpose

Multiply two polyhedra, or a polyhedron with a matrix or scalar.

Syntax

Q = P*S
Q = M*P
Q = a*P
Q = P*a

Description

  1. ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes1.png where ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes2.png and ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes3.png are Polyhedra. Computes the product of the two polyhedra:

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

  2. ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes4.png where ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes5.png is a Polyhedron and ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes6.png a matrix Computes the affine mapping P.affineMap(M)
  3. ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes7.png or ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes8.png where ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes9.png is a Polyhedron and ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes10.png is a scalar Computes the scaling

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

Note that only single polyhedron S can be provided to compute a product.

Input Arguments

P

Polyhedron in any format

Class: Polyhedron

S

Polyhedron in any format

Class: Polyhedron

M

Matrix of size ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes11.png

Class: double matrix

a

Scaling factor

Class: double

Output Arguments

Q

Polyhedron: Either ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes12.png, ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes13.png or ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mtimes14.png depending on the input

Class: Polyhedron

Example(s)

Example 1

Create two polyhedra and take their product:
P = Polyhedron('V',[-1;0]);

S = Polyhedron('V',[1;2]);

plot([P S],'linewidth',2,'color','b'); hold on; plot(P*S); axis([-2 3 -2 3]);

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

Example 2

Compute affine mapping:
P = Polyhedron('lb',-[1;1],'ub',[1;1]); 

Q = randn(3,2)*P;

plot([P Q]);

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

Example 3

Compute scaling:
P = ExamplePoly.poly3d_sin;

plot([1.5*P P P*0.5]);

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

References

[1] Fukuda: PolyFaq

See Also

affinemap


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