 LocatePoint - Maple Help

PolyhedralSets

 LocatePoint
 find maximal dimensional face containing a point Calling Sequence LocatePoint(point, polyset) Parameters

 point - list of rationals, a point in the coordinate system of polyset polyset - polyhedral set Description

 • This command finds the highest dimensional face of polyset that contains point.  A point in a set's interior will return polyset, while a point not in the set will return the empty set. Examples

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

A point inside the cube belongs to the trivial face that is the cube itself.

 > $c≔\mathrm{ExampleSets}:-\mathrm{Cube}\left(\right);$$\mathrm{origin_location}≔\mathrm{LocatePoint}\left(\left[0,0,0\right],c\right)$
 ${c}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{{x}}_{{3}}{\le }{1}{,}{{x}}_{{3}}{\le }{1}{,}{-}{{x}}_{{2}}{\le }{1}{,}{{x}}_{{2}}{\le }{1}{,}{-}{{x}}_{{1}}{\le }{1}{,}{{x}}_{{1}}{\le }{1}\right]\end{array}$
 ${\mathrm{origin_location}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{{x}}_{{3}}{\le }{1}{,}{{x}}_{{3}}{\le }{1}{,}{-}{{x}}_{{2}}{\le }{1}{,}{{x}}_{{2}}{\le }{1}{,}{-}{{x}}_{{1}}{\le }{1}{,}{{x}}_{{1}}{\le }{1}\right]\end{array}$ (1)

A point on the side of the cube returns the face with dimension 2 that includes the point.

 > $\mathrm{cube_face}≔\mathrm{LocatePoint}\left(\left[0,0,1\right],c\right)$
 ${\mathrm{cube_face}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{3}}{=}{1}{,}{-}{{x}}_{{2}}{\le }{1}{,}{{x}}_{{2}}{\le }{1}{,}{-}{{x}}_{{1}}{\le }{1}{,}{{x}}_{{1}}{\le }{1}\right]\end{array}$ (2)
 > $\mathrm{Dimension}\left(\mathrm{cube_face}\right)$
 ${2}$ (3)

A point outside of the cube returns the empty set.

 > $\mathrm{outside_cube}≔\mathrm{LocatePoint}\left(\left[2,1,1\right],c\right)$
 ${\mathrm{outside_cube}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}\right]\\ {\mathrm{Relations}}& {:}& \left[{0}{\le }{-1}\right]\end{array}$ (4)
 > $\mathrm{IsEmpty}\left(\mathrm{outside_cube}\right)$
 ${\mathrm{true}}$ (5) Compatibility

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