PlotIntegerPoints3d - Maple Help

PolyhedralSets[ZPolyhedralSets]

 PlotIntegerPoints3d
 plot the integer points of a 3-D polyhedron

 Calling Sequence PlotIntegerPoints3d(zpoly)

Parameters

 zpoly -

Description

 • PlotIntegerPoints3d(zpoly) plots the integer points of zpoly.
 • This requires zpoly to be non-parametric, three-dimensional, and bounded. If one of these assumptions does not hold, then an error is raised.

Examples

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

Plot a three-dimensional Z-Polyhedral set.

 > $\mathrm{ineqs}≔\left[0\le -16+2y+z,0\le -72+4x+4y+3z,0\le 2y-z,0\le -24+4x+4y-3z,0\le -4x+4y+3z,0\le 48-4x+4y-3z,0\le 48-4x-4y+3z,0\le 8-2y+z,0\le -24+4x-4y+3z,0\le 24-2y-z,0\le 24+4x-4y-3z,0\le 96-4x-4y-3z\right]$
 ${\mathrm{ineqs}}{≔}\left[{0}{\le }{-}{16}{+}{2}{}{y}{+}{z}{,}{0}{\le }{-}{72}{+}{4}{}{x}{+}{4}{}{y}{+}{3}{}{z}{,}{0}{\le }{2}{}{y}{-}{z}{,}{0}{\le }{-}{24}{+}{4}{}{x}{+}{4}{}{y}{-}{3}{}{z}{,}{0}{\le }{-}{4}{}{x}{+}{4}{}{y}{+}{3}{}{z}{,}{0}{\le }{48}{-}{4}{}{x}{+}{4}{}{y}{-}{3}{}{z}{,}{0}{\le }{48}{-}{4}{}{x}{-}{4}{}{y}{+}{3}{}{z}{,}{0}{\le }{8}{-}{2}{}{y}{+}{z}{,}{0}{\le }{-}{24}{+}{4}{}{x}{-}{4}{}{y}{+}{3}{}{z}{,}{0}{\le }{24}{-}{2}{}{y}{-}{z}{,}{0}{\le }{24}{+}{4}{}{x}{-}{4}{}{y}{-}{3}{}{z}{,}{0}{\le }{96}{-}{4}{}{x}{-}{4}{}{y}{-}{3}{}{z}\right]$ (1)
 > $\mathrm{ps}≔\mathrm{PolyhedralSet}\left(\mathrm{ineqs}\right);$$\mathrm{PolyhedralSets}:-\mathrm{Plot}\left(\mathrm{ps}\right)$
 ${\mathrm{ps}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{y}{-}\frac{{z}}{{2}}{\le }{-8}{,}{-}{y}{+}\frac{{z}}{{2}}{\le }{0}{,}{y}{-}\frac{{z}}{{2}}{\le }{4}{,}{y}{+}\frac{{z}}{{2}}{\le }{12}{,}{-}{x}{-}{y}{-}\frac{{3}{}{z}}{{4}}{\le }{-18}{,}{-}{x}{-}{y}{+}\frac{{3}{}{z}}{{4}}{\le }{-6}{,}{-}{x}{+}{y}{-}\frac{{3}{}{z}}{{4}}{\le }{-6}{,}{-}{x}{+}{y}{+}\frac{{3}{}{z}}{{4}}{\le }{6}{,}{x}{-}{y}{-}\frac{{3}{}{z}}{{4}}{\le }{0}{,}{x}{-}{y}{+}\frac{{3}{}{z}}{{4}}{\le }{12}{,}{\mathrm{and 2 more constraints}}\right]\end{array}$
 > $L≔\mathrm{Lattice}\left(\mathrm{Matrix}\left(\left[\left[1,0,2\right],\left[0,-1,1\right],\left[0,0,2\right]\right]\right),\mathrm{Vector}\left(\left[0,0,1\right]\right)\right)$
 ${L}{≔}{\mathrm{Lattice}}{}\left(\left[\begin{array}{ccc}{1}& {0}& {2}\\ {0}& {-1}& {1}\\ {0}& {0}& {2}\end{array}\right]{,}\left[\begin{array}{c}{0}\\ {0}\\ {1}\end{array}\right]\right)$ (2)
 > $\mathrm{vars}≔\left[x,y,z\right]$
 ${\mathrm{vars}}{≔}\left[{x}{,}{y}{,}{z}\right]$ (3)
 > $\mathrm{zp}≔\mathrm{ZPolyhedralSet}\left(\mathrm{ineqs},\mathrm{vars},':-\mathrm{lattice}'=L\right)$
 ${\mathrm{zp}}{≔}\left\{\begin{array}{lll}{\text{Relations}}& {:}& \left\{\begin{array}{:}{0}{\le }{2}{}{y}{-}{z}\\ {0}{\le }{-}{16}{+}{2}{}{y}{+}{z}\\ {0}{\le }{8}{-}{2}{}{y}{+}{z}\\ {0}{\le }{24}{-}{2}{}{y}{-}{z}\\ {0}{\le }{-}{4}{}{x}{+}{4}{}{y}{+}{3}{}{z}\\ {0}{\le }{-}{72}{+}{4}{}{x}{+}{4}{}{y}{+}{3}{}{z}\\ {0}{\le }{-}{24}{+}{4}{}{x}{-}{4}{}{y}{+}{3}{}{z}\\ {0}{\le }{-}{24}{+}{4}{}{x}{+}{4}{}{y}{-}{3}{}{z}\\ {0}{\le }{24}{+}{4}{}{x}{-}{4}{}{y}{-}{3}{}{z}\\ {0}{\le }{48}{-}{4}{}{x}{-}{4}{}{y}{+}{3}{}{z}\\ {0}{\le }{48}{-}{4}{}{x}{+}{4}{}{y}{-}{3}{}{z}\\ {0}{\le }{96}{-}{4}{}{x}{-}{4}{}{y}{-}{3}{}{z}\end{array}\right\\\ {\text{Variables}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\text{Parameters}}& {:}& \left[\right]\\ {\text{ParameterConstraints}}& {:}& \left\{\begin{array}{}\end{array}\right\\\ {\text{Lattice}}& {:}& {\text{ZSpan}}\left(\left[\begin{array}{ccc}{1}& {0}& {2}\\ {0}& {-1}& {1}\\ {0}& {0}& {2}\end{array}\right]{,}{,}{,}\left[\begin{array}{c}{0}\\ {0}\\ {1}\end{array}\right]\right)\end{array}\right\$ (4)
 > $\mathrm{PlotIntegerPoints3d}\left(\mathrm{zp}\right)$

Trying to plot a Z-Polyhedral set which is not three-dimensional.

 > $\mathrm{ineqs}≔\left[x+\frac{2y}{3}\le 4,-x+y\le 1,\frac{1x}{11}+\frac{24}{11}\le y\right]$
 ${\mathrm{ineqs}}{≔}\left[{x}{+}\frac{{2}{}{y}}{{3}}{\le }{4}{,}{-}{x}{+}{y}{\le }{1}{,}\frac{{x}}{{11}}{+}\frac{{24}}{{11}}{\le }{y}\right]$ (5)
 > $\mathrm{zp}≔\mathrm{ZPolyhedralSet}\left(\mathrm{ineqs},\left[x,y\right]\right)$
 > $\mathrm{PlotIntegerPoints3d}\left(\mathrm{zp}\right)$

Compatibility

 • The PolyhedralSets:-ZPolyhedralSets:-PlotIntegerPoints3d command was introduced in Maple 2023.