Learn R Programming

geophys (version 1.2-1)

lipper: Ellipse calculator

Description

Return parametric version of ellipse from equation of an ellipse.

Usage

lipper(a, b, c, d = 0, f = 0, g = -1)

Arguments

a
numeric
b
numeric
c
numeric
d
numeric
f
numeric
g
numeric

Value

  • vector=c(ap, bp, phi)

Details

General quadratic equation is, $a x^2 + 2 b x y + c y^2 + 2 d x + 2 f y + g = 0$

References

http://mathworld.wolfram.com/Ellipse.html

Examples

Run this code
LIP = lipper(10, 3, 9)

theta  = seq(from=0, to=2*pi, length=360)

        phi = LIP[3]
        px = LIP[1]*cos(theta)*cos(phi)-  LIP[2]*sin(theta)*sin(phi)
        py = LIP[1]*cos(theta)*sin(phi) + LIP[2]*sin(theta)*cos(phi)


plot(px, py, type='p', asp=1)
lines(px, py)

Run the code above in your browser using DataLab