ellipse: Compute the coordinates of points on an ellipse

View source: R/ellipse.R

ellipseR Documentation

Compute the coordinates of points on an ellipse

Description

Compute the coordinates of points on an ellipse

Usage

ellipse(major, minor, alpha = 0, x = 0, y = 0, n = 100)

Arguments

major, minor

length of the major and minor axis

alpha

angle, in trigonometric convention (from the horizontal, positive counter-clockwise, in radians).

x, y

coordinates of the center of the ellipse (around which the rotation is computed if alpha is not 0).

n

number of points to compute on the ellipse.

Examples

plot(ellipse(10, 5), asp=1)
plot(ellipse(10, 5, alpha=pi/4), asp=1)
plot(ellipse(10, 5, alpha=pi/4, x=3, y=4, n=200), asp=1)

jiho/morphr documentation built on May 11, 2024, 9:32 p.m.