$onpoly

From Scriptwiki
Revision as of 19:46, 11 May 2008 by Aca20031 (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Returns $true if the two polygons overlap. $false otherwise.

$onpoly(n1,n2,x,y,x,y,...)
  • n1 is the number of points in the first polygon
  • n2 is the number of points in the second polygon
  • The rest of the parameters are the polygon points. If n1 = 5 and n2 = 3, there must be 8 X coordinates and 8 Y coordinates

Example

$onpoly(3,3,1,1,5,5,10,0,2,2,4,4,9,0)

Returns: $true (The two triangles overlap)