Find area of Triangle(A) and area of Polygon with these four points(B)

if A<B point lies outside triangle
if A>B point lies inside triangle
else on  if they are equal, it lies on triangle.

On Mon, Sep 20, 2010 at 10:39 PM, Nikhil Agarwal
<nikhil.bhoja...@gmail.com>wrote:

>
> Method 1:
> Yes you can do by writing equation of 3 lines taking 2 points at a time
> and finding the sign with the third point.
>
> Suppose: ax+by+c=0 is your first line and (x,y) is the third point then
> find out the sign of the 3rd point satisfying it on the line. suppose this
> sign is S (for +ve)
>
> Similarly calculate for signs for other 2 lines.
>
> Now give a point(p,q) should give the same signs for all the 3 lines .If it
> gives the same sign for all the 3 lines that means it lies btwn all the 3
> lines and all the 3 points.hence proved.
>
> Method 2: Area mentioned by praveen
>
> Method 3:
> http://en.wikipedia.org/wiki/Barycentric_coordinates_(mathematics)#Determining_if_a_point_is_inside_a_triangle
>
> You can choose the best method.
>
> On Mon, Sep 20, 2010 at 9:18 PM, Nicolae Titus 
> <nicolaetitu...@gmail.com>wrote:
>
>> there are some approximations involved there, it should be (area(big) -
>> sum(area small)) < error
>> a better approach would be to find if the point is on the proper side of
>> each edge
>> take all the edges clockwise and calculate the sinus between each edge and
>> the point, if they are all positive, the point is inside.
>>
>> Titus
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algoge...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Thanks & Regards
> Nikhil Agarwal
> Senior Undergraduate
> Computer Science & Engineering,
> National Institute Of Technology, Durgapur,India
> http://tech-nikk.blogspot.com
> http://beta.freshersworld.com/communities/nitd
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
<<Bharath>>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to