seedhi Posted November 10, 2010 Posted November 10, 2010 from the link i have given ' date=' if u can do the integration thats given below which needs basic knowledge of complex analysis , u yourself also can arrive at the result[/quote']Well if you want to do integration then you can very well do a surface integral over the net electrical flux entering the body from the given point (consider it as a unit positive charge) - this will be zero if and only if the point is outside the body. This works in any dimension as well.
kabira Posted November 10, 2010 Author Posted November 10, 2010 now how would I do integration using PHP LOL
seedhi Posted November 10, 2010 Posted November 10, 2010 now how would I do integration using PHP LOLDont do any integration .. thats just absurd.
kabira Posted November 10, 2010 Author Posted November 10, 2010 Number the boundary points of the region in (clockwise or anticlockwise..doesn't matter) order..starting from P1 to PN' date=' where N is the number of total points making the boundary. Lets say the point you are checking is Q. Now look at angle P1-Q-P2, then P2-Q-P3, ....till PN-1 - Q- PN and finally PN-Q-P1. Add all the angles, and they should sum upto 360 for the point Q to be inside a polygon with vertices P1,P2,...PN.[/quote'] I am using this and seems to be working well, getting some errors, Khota, can you pm me your email. I need your help please.
Recommended Posts