Within my CAD-like application I have different kinds of 2D polygons. They can be concave or convex, and they can be drawn clockwise or counter-clockwise.
Now I want to find out where the inner side of such a polygon is, means at its beginning I want to add a a vector which has a 90 degree angle to the following one but which points to the inner side of the polygon.
So: any idea how I can calculate this and find the inner side for this additional vector?
Thanks!
Given the n edge vectors v_1, ..., v_n of the polygon you can find the inner side as follows:
If the sum is 2pi/-2pi (or 360/-360 degrees) the inner side lies "to the right/left"