powered by
Used for determining if points are in polygons.
ccw(p0, p1, p2)
returns 1 or 0 depending on position of points
point 0
point 1
point 2
Jonathan M. Lees <jonathan.lees@unc.edu>
Lintersect
l1 = list(p1=list(x=0, y=0), p2=list(x=1,y=1)) l2 = list(p1=list(x=6, y=4), p2=list(x=-1,y=-12)) ccw(l1$p1, l1$p2, l2$p1)
Run the code above in your browser using DataLab