produce a list of x and y coordinates of "discrete lines" with specified numbers of points, forming a quadrilateral with vertices given by input coordinates

makequad(
  x1 = 4,
  y1 = 4,
  x2 = 10,
  y2 = 10,
  x3 = 11,
  y3 = 14,
  x4 = 15,
  y4 = 0,
  npts = 30,
  make_open = TRUE
)

Arguments

x1

numeric(1)

y1

numeric(1)

x2

numeric(1)

y2

numeric(1)

x3

numeric(1)

y3

numeric(1)

x4

numeric(1)

y4

numeric(1)

npts

numeric(1) tells number of points to fill for each side

Note

chull is used to ensure sides do not cross

Examples

str(makequad())
#> List of 2
#>  $ x: num [1:120] 15 14.6 14.2 13.9 13.5 ...
#>  $ y: num [1:120] 0 0.138 0.276 0.414 0.552 ...