Hi!
Let's do Edsons solution step by step:
Does Line0_Line1 intersect with
P0_P1: no
P1_P2: yes --> Inter1
P2_P3: no
P3_P0: yes --> Inter2
Polygon1 := [P0, P1, Inter1, Inter2];
Polygon2 := [P2, P3, Inter2, Inter1];
A global solution is more complicated.
You have to keep track which polygon lines intersect with Line0_Line1.
Winni