On 4/8/2009 11:17 AM, Alain Guillet wrote:
Hi,

I drew an ellipse with the package ellipse. Now I would like to know if a point is inside the ellipse. Is any R functions to do it without computing the equation of the ellipse manually? Thanks.

For example, if I do "plot(ellipse(0.8), type = 'l')", I would like to know if (0,1) belongs to the drawn ellipse.

It's probably too late by then, but if you saved the result of the call to ellipse(0.8), and treat it as a polygon, there is the function point.in.polygon in the sp package, or pip in splancs, or inside in RFOC, or inside in GEOmap, etc.

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to