I am interested in coloring the regions formed by a single self-intersecting polygon.
I was hoping that this would do it
S(1).P.x = [0,5,5,2,2,4,4,1,1,3,3,0];
S(1).P.y = [0,0,5,5,2,2,1,1,3,3,4,4];
S(1).P.hole = 0;
Display_result = 1;
Accuracy = 1e-6;
However, using this function the region that is double-covered is not colored. Can the author (or anyone else) recommend an algorithm to accomplish a single coloring of all regions of N-covering?
I have to compute intersections between thousands of 2D triangles and "Polygons_intersection" takes an infinite amount of time to perform the task,I was wondering if there would be a way to improve greatly the computational time of the algorithm? Thanks a lot since I really need that function working at enhanced speed.
As mentioned by m4 Chrennikov, I've faced similar problems when using Polygon_intersection function.
It seems like in some cases, the function do not work properly, it returns structure with zeros areas (All P-s in each struct are empty ). Can you please let me know how to fix this problem?
Thank you very much
I solved my problem by playing with the relative accuracy of the algorithm, thank you again for this fantastic function.