

Self-crossing shapes are a nightmare for a lot of vector based algorithms. Now, after hard work, I can transform any self-crossing shape in a set of non self-crossing shapes keeping the original math properties.
The example is simple on purpose. It shows a very clear case of simplification.
First image shows the original polygon. Second image shows the result after using my algorithm. Each resulting polygon has a different border color.