polyVert: Generate regular 2D shapes by defining the number of sides...

View source: R/polyVert.R

polyVertR Documentation

Generate regular 2D shapes by defining the number of sides and the radius

Description

Generate regular 2D shapes by defining the number of sides and the radius

Usage

polyVert(nsides, radius, centre = c(0, 0), angle = 0)

Arguments

nsides

number of sides/vertices

radius

radius of shape

centre

numeric vector of length 2, defining the x,y coordinates of the shape centre

angle

starting angle for first vertex

Value

dataframe of vertices bounding the shape

Examples

polyVert(5, 10)
polyVert(4, 5, centre = c(10, 1), angle = 45)


johngodlee/JLGMisc documentation built on June 29, 2024, 9:15 p.m.