PointInPolygon - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


ComputationalGeometry

  

PointInPolygon

  

determine if a point lies within the polygon formed by a list of points

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

PointInPolygon( P, Q )

Parameters

P

-

a point in real 2-D space given as a list or rtable of coordinates

Q

-

a list of points in real 2-D space

Description

• 

This command returns a string describing the orientation of the point P relative to the polygon formed by the points Q. If P is inside the polygon then the command returns "inside". If P is outside then "outside" is returned. If P lies on the boundary of the polygon, then "boundary" is returned.

Examples

withComputationalGeometry:

Q1.1180,0.36327,0.,1.1756,1.1180,0.36327,0.69098,0.95106,0.69098,0.95106

Q1.1180,0.36327,0.,1.1756,−1.1180,0.36327,−0.69098,−0.95106,0.69098,−0.95106

(1)

a0.,0.:b1.,1.:c0.5Q1+0.5Q2:

plots:-displayplottools:-pointa,b,c,symbolsize=20,plots:-textplota,a,align=above,left,plots:-textplotb,b,align=above,left,plots:-textplotc,c,align=below,left,plottools:-polygonQ,style=line,axes=box

PointInPolygona,Q

inside

(2)

PointInPolygonb,Q

outside

(3)

PointInPolygonc,Q

boundary

(4)

PointInPolygonQ1,Q

boundary

(5)

PointInPolygonArraya,ArrayQ

inside

(6)

PointInPolygonArrayc,ArrayQ

boundary

(7)

Compatibility

• 

The ComputationalGeometry[PointInPolygon] command was introduced in Maple 2020.

• 

For more information on Maple 2020 changes, see Updates in Maple 2020.

See Also

ComputationalGeometry[PointOrientation]