Learn R Programming

BayesBD (version 1.2)

ellipse: Generate ellipse boundaries

Description

Generate general ellipse boundaries with semidiameters a and b, centered at (r0, theta0), with the a axis rotated by phi relative to the polar axis.

Usage

ellipse(a, b, r0 = 0, theta0 = 0, phi = 0)

Arguments

a, b

semidiameter parameters where a > b.

r0, theta0

the polar form of the center of the ellipse

phi

the angle rotated by the major axis.

Examples

Run this code
# NOT RUN {
gamma.fun = ellipse(a = 0.35, b = 0.25)
theta.plot = seq(from = 0, to = 2*pi, length.out = 200)
x = gamma.fun(theta.plot)*cos(theta.plot)
y = gamma.fun(theta.plot)*sin(theta.plot)
plot(x,y,type = 'l', axes=TRUE, frame.plot=FALSE)
# }

Run the code above in your browser using DataLab