Learn R Programming

PlaneGeometry (version 1.1.0)

EllipseFromFivePoints: Ellipse from five points

Description

Return an ellipse from five given points on this ellipse.

Usage

EllipseFromFivePoints(P1, P2, P3, P4, P5)

Arguments

P1, P2, P3, P4, P5

the five points

Value

An Ellipse object.

Examples

Run this code
# NOT RUN {
ell <- Ellipse$new(c(2,3), 5, 4, 30)
set.seed(666)
pts <- ell$randomPoints(5, "on")
ell2 <- EllipseFromFivePoints(pts[1,],pts[2,],pts[3,],pts[4,],pts[5,])
ell$isEqual(ell2)
# }

Run the code above in your browser using DataLab