Skip to contents

Generates vertex coordinates for a rectangle with dimensions given through dims param.

Usage

rectVertices(dims)

Arguments

dims

named vector in the style of c(x = numeric, y = numeric) that defines the width (x) and height (y) of the generated rectangle polygon.

Value

a data.table of rectangle vertices

See also

generate_grid

Other polygon stamping: circleVertices(), hexVertices(), polyStamp()

Examples

rectVertices(c(x = 1, y = 2))
#>        x     y
#>    <num> <num>
#> 1:     0     0
#> 2:     0     2
#> 3:     1     2
#> 4:     1     0