is_anticlockwise: Testing for anti-clockwise ordering of points of a convex...

View source: R/is_anticlockwise.R

is_anticlockwiseR Documentation

Testing for anti-clockwise ordering of points of a convex hull.

Description

Given a polygon, test if the polygon is a convex hull and if it is, if the vertices are listed in an anti-clockwise order.

Usage

is_anticlockwise(x)

Arguments

x

sccm_pg object.

See Also

polygon convex_hull is_convex_hull

Examples

square1 <- polygon(c(-1, 1, 1, -1), c(-1, -1, 1, 1))
square2 <- polygon(c(1, 1, -1, -1), c(-1, 1, 1, -1))
square3 <- polygon(c(-1, 1, 1, -1), c(1, 1, -1, -1))

is_anticlockwise(square1)
is_anticlockwise(square2)
is_anticlockwise(square3)


dewittpe/sccm documentation built on Feb. 2, 2024, 5:25 p.m.