# point inside an area

• Mar 28th 2011, 03:04 AM
jazzmcd
point inside an area
hi, im using excel to calculate if a plane is within limits (cog) and im nearly finished. Im trying to set a warning for when it goes outside limits, represented on a graph, i need a formula to find if a point is within a givin area, i have the points of the area say, A,B,C,D it is not a perfect square or a rectangle. so if anyone can help i would greatly appreciate it.
• Mar 28th 2011, 06:27 AM
Wilmer
Quote:

Originally Posted by jazzmcd
i have the points of the area say, A,B,C,D it is not a perfect square or a rectangle.

Well, what's given? In this case, the coordinates of A, B, C and D?
As a start, google "point inside triangle".
• Mar 28th 2011, 07:00 AM
jazzmcd
its not a triangle it has 6 points, i know the co-ordinates of each, and have 5 points that make up a line that are to be plotted, for each of those plotted points i need a formula to find if those points are in the area of the 6-pointed shape, i have co-ordinates of all points mentioned.
• Mar 28th 2011, 08:31 AM
Wilmer
Quote:

Originally Posted by jazzmcd
its not a triangle it has 6 points, i know the co-ordinates of each, and have 5 points that make up a line that are to be plotted, for each of those plotted points i need a formula to find if those points are in the area of the 6-pointed shape, i have co-ordinates of all points mentioned.

6 points usually result in a hexagon; many weird shapes possible; see here:
Hexagon - Wikipedia, the free encyclopedia

But not always a hexagon; like, if 3 points are collinear, you end up with a pentagon;
but I guess that's beside the point...

All to say that I don't know! I'll guarantee it won't be something simple (Crying)

On the positive side, there are geometrical whizzes here: perhaps they'll step in
and save the day (Cool)
• Mar 28th 2011, 08:36 AM
jazzmcd
• Mar 28th 2011, 09:09 AM
Wilmer
Well, if it restricted to a convex hexagon (as your diagram seems to indicate),
then perhaps the way to go is divide the hexagon in 4 triangles (easy enough),
then check if each point is inside one of these triangles...Oh Archie, where art thou?!