PolyhedralSets - Maple Programming Help

Home : Support : Online Help : Mathematics : Geometry : Polyhedral Sets : Transforming Sets : PolyhedralSets/Project

PolyhedralSets

 Project
 project a polyhedral set to a lower coordinate dimension

 Calling Sequence Project(polyset, coords) Project(polyset, coords, reducespace) Project(polyset, M, coords) Project(polyset, eqs)

Parameters

 polyset - polyhedral set coords - list of names, coordinates of the projected set M - matrix with rational coefficients eqs - list of equations; subspace onto which the set is to be projected

Description

 • The call sequence Project(polyset, coords) projects the set polyset onto the coordinate axes given in coords.  The projected set will have the same ambient space as polyset unless the reducespace option is given, in which case coords will be the ambient space for the new set.
 • A projection matrix M can be given with the call sequence Project(polyset, M, coords).  The matrix M is of size $n&xm$, where $n$ is the number of coordinates in coords and $m$ is the number of coordinates in Coordinates(polyset).  It defines a transformation of the form $x=My$, where $x$ are the coordinates of polyset and $y$ the coordinates specified in coords.  coords must be a subset of the coordinates of polyset.  coords may optionally be omitted in this case to retain the same coordinate names.
 • The projection may also be specified by giving the subspace onto which the set should be projected in the form of a list of equations.  The set will be projected onto this subspace and the projected set will have the same ambient space as the original set.

Examples

 > $\mathrm{with}\left(\mathrm{PolyhedralSets}\right):$

Construct a pyramid with a square base

 > $\mathrm{pyramid}≔\mathrm{PolyhedralSet}\left(\left[\left[1,1,0\right],\left[-1,1,0\right],\left[-1,-1,0\right],\left[1,-1,0\right],\left[0,0,1\right]\right],\left[x,y,z\right]\right)$
 ${\mathrm{pyramid}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{z}{\le }{0}{,}{-}{y}{+}{z}{\le }{1}{,}{y}{+}{z}{\le }{1}{,}{-}{x}{+}{z}{\le }{1}{,}{x}{+}{z}{\le }{1}\right]\end{array}$ (1)
 > $\mathrm{Plot}\left(\mathrm{pyramid},\mathrm{orientation}=\left[38,76,0\right]\right)$

A top down projection is obtained by eliminating the $z$ coordinate, which gives a square

 > $\mathrm{pyramid_top}≔\mathrm{Project}\left(\mathrm{pyramid},\left[x,y\right]\right)$
 ${\mathrm{pyramid_top}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\mathrm{Relations}}& {:}& \left[{z}{=}{0}{,}{-}{y}{\le }{1}{,}{y}{\le }{1}{,}{-}{x}{\le }{1}{,}{x}{\le }{1}\right]\end{array}$ (2)
 > $\mathrm{Plot}\left(\mathrm{pyramid_top}\right)$

A projection matrix can be used to define a side-view projection

 > $M≔⟨⟨1|0⟩,⟨0|0⟩,⟨0|1⟩⟩$
 ${M}{≔}\left[\begin{array}{rr}{1}& {0}\\ {0}& {0}\\ {0}& {1}\end{array}\right]$ (3)
 > $\mathrm{pyramid_side}≔\mathrm{Project}\left(\mathrm{pyramid},\left[a,b\right],M\right)$
 ${\mathrm{pyramid_side}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{a}{,}{b}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{b}{\le }{0}{,}{b}{-}{a}{\le }{1}{,}{a}{+}{b}{\le }{1}\right]\end{array}$ (4)
 > $\mathrm{Plot}\left(\mathrm{pyramid_side}\right)$

The pyramid can also be projected onto the subspace defined by the equation

 > $\mathrm{projection_subspace}≔\left[-2x-z=4\right]$
 ${\mathrm{projection_subspace}}{≔}\left[{-}{2}{}{x}{-}{z}{=}{4}\right]$ (5)
 > $\mathrm{plane}≔\mathrm{PolyhedralSet}\left(\mathrm{projection_subspace},\left[x,y,z\right]\right)$
 ${\mathrm{plane}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\mathrm{Relations}}& {:}& \left[{x}{+}\frac{{z}}{{2}}{=}{-2}\right]\end{array}$ (6)
 > $\mathrm{pyramid_oblique}≔\mathrm{Project}\left(\mathrm{pyramid},\mathrm{projection_subspace}\right)$
 ${\mathrm{pyramid_oblique}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{z}{\le }\frac{{6}}{{5}}{,}{-}{y}{\le }{1}{,}{-}{y}{+}\frac{{5}{}{z}}{{2}}{\le }{0}{,}{y}{\le }{1}{,}{y}{+}\frac{{5}{}{z}}{{2}}{\le }{0}{,}{x}{+}\frac{{z}}{{2}}{=}{-2}\right]\end{array}$ (7)
 > $\mathrm{Plot}\left(\mathrm{pyramid},\mathrm{plane},\mathrm{pyramid_oblique},\mathrm{orientation}=\left[38,76,0\right],\mathrm{transparency}=\left[0.0,0.1,0.3\right],\mathrm{scaling}=\mathrm{constrained},\mathrm{view}=\left[-\frac{9}{4}..\frac{3}{2},-\frac{3}{2}..\frac{3}{2},-\frac{7}{4}..\frac{3}{2}\right]\right)$

Compatibility

 • The PolyhedralSets[Project] command was introduced in Maple 2015.