From: bob_williamson@my-deja.com Subject: Re: Is a given point in an ellipse? Date: 2 Sep 1999 13:06:43 -0400 Newsgroups: alt.math.recreational,comp.graphics.algorithms,geometry.college,sci.math To: geometry-college@moderators.isc.org Keywords: spherical geometry, pointers to mapmaking In article <7qk090$3k4$1@nnrp1.deja.com>, barbarin@my-deja.com wrote: > Is a given point in an ellipse? > > Given an ellipse, and a coordinate point, I need > to know if the coord is within the bounds of the ellipse. > > Unfortunately, I cannot say: > > if (a^2 x^2+b^2 y^2 < 1) > the point is inside the ellipse > else > the point is outside the ellipse > > because the ellipse is on the sphere of the earth. > What you're asking for apparently involves map projection -- projecting the surface of the Earth onto a flat surface and then defining your ellipse in reference to that surface. Depending on the orientation and the size of the area being projected, you would want to use different surfaces for your map. Probably the easiest to compute would be a transverse mercatur, which wraps a cylinder around a line of longitude and projects features of the globe onto the cylinder normal (i.e., perpendicular) to the surface of the globe. The distortion for a map that's wider than 6 to 8 degrees of arc is probably unacceptable. (Remember those old wall maps in school that showed Greenland three times the size of North America?) Anyway, so tell us how large an area you're concerned with. There are many references on map projection and if what you're looking for happens to be something I've already written (in C) I'll gladly share. Bob Here are a few starters: Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.