Skip to content

Is a point into an ellipse

2 messages · Alain Guillet, Duncan Murdoch

#
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.


Regards,
Alain
#
On 4/8/2009 11:17 AM, Alain Guillet wrote:
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