Learn R Programming

fellov (version 0.1)

is_feasible_point: Determine If A Point Is In Ellipse Overlap

Description

is_feasible_point will determine if a given point is in the interior of the intersection of one or more fully specified ellipes.

Usage

is_feasible_point(point, ell)

Arguments

point

a numeric of length equal to the dimensions of the ellipses in ell.

ell

a list of at least one ellipse; see wrangle_ellipse.

Value

is_feasible_point returns an object of class "is_feasible_point". This object is a list containing the following components:

point

the inputted point.

fasible

logical; is TRUE when the point x is in the interior of all ellipses.

distance

a data.frame with the distance from x to the center of each ellipse, the radius of each ellipse and a logical indicator, which is TRUE when x is an element in the ellipse.

call

the match call.

Details

Given a point is_feasible_point will check if this point is in the intersection of the list of ellipses ell. Note that this function will not check if the intersection is non-empty.

See Also

wrangle_ellipse for detailed on ellipse parameterization.

Examples

Run this code
# NOT RUN {
e1 <- list("c" = c(1,1), "P" = matrix(c(3,1,1,2), ncol = 2), "r" = 2)
e2 <- list("c" = c(0,2), "S" = matrix(c(4,1,1,1), ncol = 2), "r" = 3)

is_feasible_point(c(1.1,0.9), e1)
is_feasible_point(c(1,0), list(e1, e2))

# }

Run the code above in your browser using DataLab