ellipse_grid: Ellipse grid

Description Usage Arguments Details Value Examples

View source: R/ellipse_grid.R

Description

Create a grid of points within an ellipse.

Usage

1
ellipse_grid(N, radius, center = c(0, 0))

Arguments

N

The number of subintervals to divide the smaller radius into.

radius

A vector of length two giving the radius of each length.

center

A vector of length two giving the center of the ellipse.

Details

Code taken from https://people.sc.fsu.edu/~jburkardt/cpp_src/ellipse_grid/ellipse_grid.html.

Value

Returns a matrix with the x and y positions of each point in the grid.

Examples

1
2
p = shapegrid::ellipse_grid(25, c(1,1), c(0,0))
plot(p)

daffp/shapegrid documentation built on Aug. 2, 2020, 12:49 a.m.