CreatePolygon: Creates a matrix to represent the polygon that connects...

Description Usage Arguments Value Examples

View source: R/CreatePolygon.R

Description

CreatePolygon creates a matrix to represent the polygon that connects several points

Usage

1

Arguments

...

An undetermined number of points introduced by the user in the form of vectors

Value

Returns a matrix which contains the points of the polygon. Each row represents one of the points

Examples

1
2
3
4
P1 <- c(0,0)
P2 <- c(1,1)
P3 <- c(2,0) 
Poly <- CreatePolygon(P1, P2, P3)

Example output

[1] "Some of the inserted points are collinear. This could lead to a defective polygon."

LearnGeom documentation built on July 14, 2020, 5:06 p.m.