Learn R Programming

PlaneGeometry (version 1.6.0)

EllipseFromFivePoints: Ellipse from five points

Description

Return an ellipse from five given points on this ellipse.

Usage

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

Value

An Ellipse object.

Arguments

P1, P2, P3, P4, P5

the five points

Examples

Run this code
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