CCcheck | R Documentation |
Check for counter-clockwise orientation for polygons. Positive is counterclockwise.
CCcheck(Z)
Z |
list(x,y) |
Uses sign of the area of the polygon to determine polarity.
j |
sign of area |
Based on the idea calculated area of a polygon.
Jonathan M. Lees<jonathan.lees@unc.edu>
Y=list()
Y$x=c(170,175,184,191,194,190,177,166,162,164)
Y$y=c(-54,-60,-60,-50,-26,8,34,37,10,-15)
plot(c(160, 200),c(-85, 85), type='n')
points(Y)
lines(Y)
CCcheck(Y)
Z = list(x=rev(Y$x), y=rev(Y$y))
CCcheck(Z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.