Skip to contents

Create an elliptic geometry.

Usage

ellipse(x = 0, y = 0, radiusX = 1, radiusY = radiusX, nPoints = 100)

Arguments

x, y

centre coordinates.

radiusX, radiusY

horizontal and vertical radius.

nPoints

number of points used to approximate the ellipse.

Value

An object inheriting from class "ellipseGeometry".

Details

Use rotate() to rotate the resulting geometry.

See also

Other geometry.structures: arc(), band(), bezier(), circle(), polygonX(), regPolygon(), ring()

Examples

canvas(xlim = c(-2, 2))

e <- ellipse(radiusX = 1.8, radiusY = 0.8)
polygonX(e, col = "lightblue")

# the same ellipse, rotated by 45 degrees
polygonX(rotate(e, theta = pi/4), border = "red")