If I have a 2D line given in polar coordinates (i.e. rho distance from the origin and theta angle from the x-axis) how can I determine which on which side of the line a point lies? Specifically, how would I take two points and determine if they are on the same side or opposite sides of this line?
Thanks!
Such line has equation:
-x*cos(theta)+y*sin(theta)-rho=0 [1]
Distance from point (x0, y0) to this line is
Dist = -x0*cos(theta)+y0*sin(theta)-rho [2]
Important thing: sign of Dist depends on which side of the line a point lies (positive when this point and coordinate origin lie on the different sides of line, and negative otherwise).
So it is enough to calc and compare the signs of the [2] expressions for two needed points