blob: 063b92113d099104fca7732f536bb157d7164e6d [file] [log] [blame]
caryclark@google.comf839c032012-10-26 21:03:50 +00001<html>
2<head>
3<div style="height:0">
4
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005<div id="cubicOp36u">
6 SimplifyNew_Test [cubicOp36u]
7{{0,1}, {1,6}, {2,0}, {5,1}},
8{{5,1}, {0,1}},
9op union
10{{0,2}, {1,5}, {1,0}, {6,1}},
11{{6,1}, {0,2}},
12debugShowCubicIntersection no self intersect {{0,2}, {1,5}, {1,0}, {6,1}}
13debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {1,5}, {1,0}, {6,1}} {{0,2}} wtTs[1]=0.633333333 {{2.2208888888888882,1.6298518518518521}} wtTs[2]=1 {{6,1}} wnTs[0]=1 {{6,1}, {0,2}} wnTs[1]=0.629851852 wnTs[2]=0
14debugShowCubicIntersection wtTs[0]=0.281761651 {{0,2}, {1,5}, {1,0}, {6,1}} {{0.74132978521392334,2.9436691246202122}} wtTs[1]=0.83051493 {{3.8593908381032738,0.94043932231067462}} wtTs[2]=0.830515061 {{3.8593922073023155,0.94043907360367252}} wtTs[3]=0.867315861 {{4.2597986321159249,0.88613622701319239}} wtTs[4]=0.867316009 {{4.2598003089230945,0.88613607359480184}} wnTs[0]=0.23811 {{0,1}, {1,6}, {2,0}, {5,1}} wnTs[1]=0.860977989 wnTs[2]=0.860978176 wnTs[3]=0.912837717 wnTs[4]=0.912837923
15debugShowCubicLineIntersection wtTs[0]=0.803214143 {{0,2}, {1,5}, {1,0}, {6,1}} {{3.5833594368204942,1}} wnTs[0]=0.283328 {{5,1}, {0,1}}
16debugShowCubicLineIntersection wtTs[0]=0.0764226429 {{0,1}, {1,6}, {2,0}, {5,1}} {{0.23016060940409022,1.9616398984326517}} wtTs[1]=0.691654855 {{2.7367211708698314,1.543879804855028}} wnTs[0]=0.96164 {{6,1}, {0,2}} wnTs[1]=0.543879805
17debugShowLineIntersection no intersect {{6,1}, {0,2}} {{5,1}, {0,1}}
18debugShowCubicIntersection no self intersect {{0,1}, {1,6}, {2,0}, {5,1}}
19debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {1,6}, {2,0}, {5,1}} {{0,1}} wtTs[1]=0.833333333 {{3.6574074074074132,0.99999999999999789}} wtTs[2]=1 {{5,1}} wnTs[0]=1 {{5,1}, {0,1}} wnTs[1]=0.268518519 wnTs[2]=0
20debugShowActiveSpans id=3 (0,2 1,5 1,0 6,1) t=0 (0,2) tEnd=0.281761651 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
21debugShowActiveSpans id=3 (0,2 1,5 1,0 6,1) t=0.281761651 (0.741329789,2.94366908) tEnd=0.633333333 other=1 otherT=0.238109917 otherIndex=2 windSum=? windValue=1 oppValue=0
22debugShowActiveSpans id=3 (0,2 1,5 1,0 6,1) t=0.633333333 (2.22088885,1.62985182) tEnd=0.803214143 other=4 otherT=0.629851852 otherIndex=2 windSum=? windValue=1 oppValue=0
23debugShowActiveSpans id=3 (0,2 1,5 1,0 6,1) t=0.803214143 (3.58335948,1) tEnd=0.83051493 other=2 otherT=0.283328113 otherIndex=2 windSum=? windValue=1 oppValue=0
24debugShowActiveSpans id=3 (0,2 1,5 1,0 6,1) t=0.83051493 (3.85939074,0.940439343) tEnd=0.830515061 other=1 otherT=0.860977989 otherIndex=5 windSum=? windValue=1 oppValue=0
25debugShowActiveSpans id=3 (0,2 1,5 1,0 6,1) t=0.830515061 (3.85939217,0.940439045) tEnd=0.867315861 other=1 otherT=0.860978176 otherIndex=6 windSum=? windValue=1 oppValue=0
26debugShowActiveSpans id=3 (0,2 1,5 1,0 6,1) t=0.867315861 (4.25979853,0.886136234) tEnd=0.867316009 other=1 otherT=0.912837717 otherIndex=7 windSum=? windValue=1 oppValue=0
27debugShowActiveSpans id=3 (0,2 1,5 1,0 6,1) t=0.867316009 (4.25980043,0.886136055) tEnd=1 other=1 otherT=0.912837923 otherIndex=8 windSum=? windValue=1 oppValue=0
28debugShowActiveSpans id=4 (6,1 0,2) t=0 (6,1) tEnd=0.543879805 other=3 otherT=1 otherIndex=8 windSum=? windValue=1 oppValue=0
29debugShowActiveSpans id=4 (6,1 0,2) t=0.543879805 (2.73672128,1.54387975) tEnd=0.629851852 other=1 otherT=0.691654855 otherIndex=3 windSum=? windValue=1 oppValue=0
30debugShowActiveSpans id=4 (6,1 0,2) t=0.629851852 (2.22088885,1.62985182) tEnd=0.961639898 other=3 otherT=0.633333333 otherIndex=2 windSum=? windValue=1 oppValue=0
31debugShowActiveSpans id=4 (6,1 0,2) t=0.961639898 (0.230160609,1.96163988) tEnd=1 other=1 otherT=0.0764226429 otherIndex=1 windSum=? windValue=1 oppValue=0
32debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0 (0,1) tEnd=0.0764226429 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
33debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0.0764226429 (0.230160609,1.96163988) tEnd=0.238109917 other=4 otherT=0.961639898 otherIndex=3 windSum=? windValue=1 oppValue=0
34debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0.238109917 (0.741329789,2.94366908) tEnd=0.691654855 other=3 otherT=0.281761651 otherIndex=1 windSum=? windValue=1 oppValue=0
35debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0.691654855 (2.73672128,1.54387975) tEnd=0.833333333 other=4 otherT=0.543879805 otherIndex=1 windSum=? windValue=1 oppValue=0
36debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0.833333333 (3.65740752,1) tEnd=0.860977989 other=2 otherT=0.268518519 otherIndex=1 windSum=? windValue=1 oppValue=0
37debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0.860977989 (3.85939074,0.940439343) tEnd=0.860978176 other=3 otherT=0.83051493 otherIndex=4 windSum=? windValue=1 oppValue=0
38debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0.860978176 (3.85939217,0.940439045) tEnd=0.912837717 other=3 otherT=0.830515061 otherIndex=5 windSum=? windValue=1 oppValue=0
39debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0.912837717 (4.25979853,0.886136234) tEnd=0.912837923 other=3 otherT=0.867315861 otherIndex=6 windSum=? windValue=1 oppValue=0
40debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0.912837923 (4.25980043,0.886136055) tEnd=1 other=3 otherT=0.867316009 otherIndex=7 windSum=? windValue=1 oppValue=0
41debugShowActiveSpans id=2 (5,1 0,1) t=0 (5,1) tEnd=0.268518519 other=1 otherT=1 otherIndex=9 windSum=? windValue=1 oppValue=0
42debugShowActiveSpans id=2 (5,1 0,1) t=0.268518519 (3.65740752,1) tEnd=0.283328113 other=1 otherT=0.833333333 otherIndex=4 windSum=? windValue=1 oppValue=0
43debugShowActiveSpans id=2 (5,1 0,1) t=0.283328113 (3.58335948,1) tEnd=1 other=3 otherT=0.803214143 otherIndex=3 windSum=? windValue=1 oppValue=0
44findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
45debugShowSort [0] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=1 tEnd=0.867316009 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
46debugShowSort [1] {{6,1}, {0,2}} tStart=0 tEnd=0.543879805 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
47findTop xyE=(6,1) xyS=(4.25980043,0.886136055)
48findTop dxyE=(15,3) dxyS=(11.3363714,-1.03721189) cross=-49.5672913 bumpsUp=true
49markWinding id=3 (0,2 1,5 1,0 6,1) t=0.867316009 [7] (4.25980043,0.886136055) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
50markWinding id=4 (6,1 0,2) t=0 [0] (6,1) tEnd=0.543879805 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
51markWinding id=3 (0,2 1,5 1,0 6,1) t=0.867316009 [7] (4.25980043,0.886136055) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
52activeOp op=union miFrom=0 miTo=0 suFrom=1 suTo=0 result=1
caryclark@google.com4aaaaea2013-02-28 16:12:39 +000053findNextOp simple
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +000054markDoneBinary id=3 (0,2 1,5 1,0 6,1) t=0.867316009 [7] (4.25980043,0.886136055) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
55bridgeOp current id=3 from=(4.25980043,0.886136055) to=(6,1)
56path.moveTo(4.25980043,0.886136055);
57path.cubicTo(4.76118517,0.840262294, 5.33658028,0.867316008, 6,1);
58findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
59debugShowSort [0] {{6,1}, {0,2}} tStart=0.543879805 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
60debugShowSort [1] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.691654855 tEnd=0.833333333 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
61debugShowSort [2] {{6,1}, {0,2}} tStart=0.543879805 tEnd=0.629851852 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
62debugShowSort [3] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.691654855 tEnd=0.238109917 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
caryclark@google.com4aaaaea2013-02-28 16:12:39 +000063findNextOp firstIndex=[0] sign=1
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +000064activeOp op=union miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
65markDoneBinary id=1 (0,1 1,6 2,0 5,1) t=0.691654855 [3] (2.73672128,1.54387975) tEnd=0.833333333 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
66findNextOp chase.append id=1
67activeOp op=union miFrom=1 miTo=1 suFrom=1 suTo=0 result=0
68markDoneBinary id=4 (6,1 0,2) t=0.543879805 [1] (2.73672128,1.54387975) tEnd=0.629851852 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
69findNextOp chase.append id=4
70activeOp op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
71markWinding id=1 (0,1 1,6 2,0 5,1) t=0.238109917 [2] (0.741329789,2.94366908) tEnd=0.691654855 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
72findNextOp chase.append id=1
caryclark@google.com1304bb22013-03-13 20:29:41 +000073markDoneBinary id=4 (6,1 0,2) t=0 [0] (6,1) tEnd=0.543879805 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +000074findNextOp from:[4] to:[1] start=3 end=2
75bridgeOp current id=4 from=(6,1) to=(2.73672128,1.54387975)
76findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
77debugShowSort [3] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.238109917 tEnd=0.691654855 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
78debugShowSort [0] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.281761651 tEnd=0.633333333 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
79debugShowSort [1] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.238109917 tEnd=0.0764226429 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
80debugShowSort [2] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.281761651 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
81findNextOp firstIndex=[3] sign=-1
82activeOp op=union miFrom=1 miTo=1 suFrom=0 suTo=1 result=0
83markDoneBinary id=3 (0,2 1,5 1,0 6,1) t=0.281761651 [1] (0.741329789,2.94366908) tEnd=0.633333333 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
84findNextOp chase.append id=3
85activeOp op=union miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
86markDoneBinary id=1 (0,1 1,6 2,0 5,1) t=0.0764226429 [1] (0.230160609,1.96163988) tEnd=0.238109917 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
87findNextOp chase.append id=1
88activeOp op=union miFrom=0 miTo=0 suFrom=1 suTo=0 result=1
89markWinding id=3 (0,2 1,5 1,0 6,1) t=0 [0] (0,2) tEnd=0.281761651 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
90markWinding id=4 (6,1 0,2) t=0.961639898 [3] (0.230160609,1.96163988) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
91findNextOp chase.append id=4
92markDoneBinary id=1 (0,1 1,6 2,0 5,1) t=0.238109917 [2] (0.741329789,2.94366908) tEnd=0.691654855 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
93findNextOp from:[1] to:[3] start=1 end=0
94bridgeOp current id=1 from=(2.73672128,1.54387975) to=(0.741329789,2.94366908)
95path.lineTo(2.73672128,1.54387975);
96path.cubicTo(1.84923673,2.27202392, 1.2463032,3.29839373, 0.741329789,2.94366908);
97findNextOp simple
98markDoneBinary id=3 (0,2 1,5 1,0 6,1) t=0 [0] (0,2) tEnd=0.281761651 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
99bridgeOp current id=3 from=(0.741329789,2.94366908) to=(0,2)
100path.cubicTo(0.484133661,3.05545282, 0.281761646,2.84528494, 0,2);
101findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
102debugShowSort [2] {{6,1}, {0,2}} tStart=0.961639898 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
103debugShowSort [3] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.0764226429 tEnd=0.238109917 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
104debugShowSort [0] {{6,1}, {0,2}} tStart=0.961639898 tEnd=0.629851852 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
105debugShowSort [1] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.0764226429 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
106findNextOp firstIndex=[2] sign=-1
107activeOp op=union miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
108activeOp op=union miFrom=1 miTo=1 suFrom=1 suTo=0 result=0
109markDoneBinary id=4 (6,1 0,2) t=0.629851852 [2] (2.22088885,1.62985182) tEnd=0.961639898 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
110findNextOp chase.append id=4
111activeOp op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
112markWinding id=1 (0,1 1,6 2,0 5,1) t=0 [0] (0,1) tEnd=0.0764226429 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
113markWinding id=2 (5,1 0,1) t=0.283328113 [2] (3.58335948,1) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
114findNextOp chase.append id=2
115markDoneBinary id=4 (6,1 0,2) t=0.961639898 [3] (0.230160609,1.96163988) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
116findNextOp from:[4] to:[1] start=1 end=0
117bridgeOp current id=4 from=(0,2) to=(0.230160609,1.96163988)
118findNextOp simple
119markDoneBinary id=1 (0,1 1,6 2,0 5,1) t=0 [0] (0,1) tEnd=0.0764226429 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
120bridgeOp current id=1 from=(0.230160609,1.96163988) to=(0,1)
121path.lineTo(0.230160609,1.96163988);
122path.cubicTo(0.152845293,1.69998181, 0.0764226392,1.38211322, 0,1);
123findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
124debugShowSort [1] {{5,1}, {0,1}} tStart=0.283328113 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
125debugShowSort [2] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.803214143 tEnd=0.633333333 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
126debugShowSort [3] {{5,1}, {0,1}} tStart=0.283328113 tEnd=0.268518519 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
127debugShowSort [0] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.803214143 tEnd=0.83051493 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
128findNextOp firstIndex=[1] sign=-1
129activeOp op=union miFrom=1 miTo=1 suFrom=0 suTo=1 result=0
130markDoneBinary id=3 (0,2 1,5 1,0 6,1) t=0.633333333 [2] (2.22088885,1.62985182) tEnd=0.803214143 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
131findNextOp chase.append id=3
132activeOp op=union miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
133markDoneBinary id=2 (5,1 0,1) t=0.268518519 [1] (3.65740752,1) tEnd=0.283328113 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
134findNextOp chase.append id=2
135activeOp op=union miFrom=0 miTo=0 suFrom=1 suTo=0 result=1
136markWinding id=3 (0,2 1,5 1,0 6,1) t=0.803214143 [3] (3.58335948,1) tEnd=0.83051493 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
137findNextOp chase.append id=3
138markDoneBinary id=2 (5,1 0,1) t=0.283328113 [2] (3.58335948,1) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
139findNextOp from:[2] to:[3] start=3 end=4
140bridgeOp current id=2 from=(0,1) to=(3.58335948,1)
141findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
142debugShowSort [0] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.83051493 tEnd=0.803214143 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
143debugShowSort [1] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.860977989 tEnd=0.833333333 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
144debugShowSort [2] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.860977989 tEnd=0.860978176 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
145debugShowSort [3] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.83051493 tEnd=0.830515061 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
146findNextOp firstIndex=[0] sign=1
147activeOp op=union miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
148markDoneBinary id=1 (0,1 1,6 2,0 5,1) t=0.833333333 [4] (3.65740752,1) tEnd=0.860977989 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
149findNextOp chase.append id=1
150activeOp op=union miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
151markDoneBinary id=1 (0,1 1,6 2,0 5,1) t=0.860977989 [5] (3.85939074,0.940439343) tEnd=0.860978176 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
152findNextOp chase.append id=1
153activeOp op=union miFrom=0 miTo=0 suFrom=1 suTo=0 result=1
154markWinding id=3 (0,2 1,5 1,0 6,1) t=0.83051493 [4] (3.85939074,0.940439343) tEnd=0.830515061 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
155findNextOp chase.append id=3
156markDoneBinary id=3 (0,2 1,5 1,0 6,1) t=0.803214143 [3] (3.58335948,1) tEnd=0.83051493 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
157findNextOp from:[3] to:[3] start=4 end=5
158bridgeOp current id=3 from=(3.58335948,1) to=(3.85939074,0.940439343)
159path.lineTo(3.58335948,1);
160path.cubicTo(3.67248249,0.97763288, 3.76445246,0.957684338, 3.85939074,0.940439343);
161findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
162debugShowSort [2] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.830515061 tEnd=0.83051493 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
163debugShowSort [3] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.860978176 tEnd=0.860977989 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
164debugShowSort [0] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.830515061 tEnd=0.867315861 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
165debugShowSort [1] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.860978176 tEnd=0.912837717 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
caryclark@google.com4aaaaea2013-02-28 16:12:39 +0000166findNextOp firstIndex=[2] sign=1
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +0000167activeOp op=union miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
168activeOp op=union miFrom=1 miTo=1 suFrom=1 suTo=0 result=0
169markDoneBinary id=3 (0,2 1,5 1,0 6,1) t=0.830515061 [5] (3.85939217,0.940439045) tEnd=0.867315861 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
170findNextOp chase.append id=3
171activeOp op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
172markWinding id=1 (0,1 1,6 2,0 5,1) t=0.860978176 [6] (3.85939217,0.940439045) tEnd=0.912837717 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
173findNextOp chase.append id=1
174markDoneBinary id=3 (0,2 1,5 1,0 6,1) t=0.83051493 [4] (3.85939074,0.940439343) tEnd=0.830515061 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
175findNextOp from:[3] to:[1] start=6 end=7
176bridgeOp current id=3 from=(3.85939074,0.940439343) to=(3.85939217,0.940439045)
177path.cubicTo(3.85939145,0.940439224, 3.85939169,0.940439165, 3.85939217,0.940439045);
178findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
179debugShowSort [0] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.912837717 tEnd=0.860978176 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
180debugShowSort [1] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.867315861 tEnd=0.830515061 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
181debugShowSort [2] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.912837717 tEnd=0.912837923 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
182debugShowSort [3] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.867315861 tEnd=0.867316009 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
183findNextOp firstIndex=[0] sign=1
184activeOp op=union miFrom=1 miTo=1 suFrom=0 suTo=1 result=0
185activeOp op=union miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
186markDoneBinary id=1 (0,1 1,6 2,0 5,1) t=0.912837717 [7] (4.25979853,0.886136234) tEnd=0.912837923 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
187findNextOp chase.append id=1
188activeOp op=union miFrom=0 miTo=0 suFrom=1 suTo=0 result=1
189markWinding id=3 (0,2 1,5 1,0 6,1) t=0.867315861 [6] (4.25979853,0.886136234) tEnd=0.867316009 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
190findNextOp chase.append id=3
191markDoneBinary id=1 (0,1 1,6 2,0 5,1) t=0.860978176 [6] (3.85939217,0.940439045) tEnd=0.912837717 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
192findNextOp from:[1] to:[3] start=6 end=7
193bridgeOp current id=1 from=(3.85939217,0.940439045) to=(4.25979853,0.886136234)
194path.cubicTo(3.98813701,0.909405351, 4.12151289,0.890467525, 4.25980043,0.886136055);
195path.close();
196debugShowActiveSpans id=3 (0,2 1,5 1,0 6,1) t=0.867315861 (4.25979853,0.886136234) tEnd=0.867316009 other=1 otherT=0.912837717 otherIndex=7 windSum=-1 windValue=1 oppValue=0
197debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0.912837923 (4.25980043,0.886136055) tEnd=1 other=3 otherT=0.867316009 otherIndex=7 windSum=? windValue=1 oppValue=0
198debugShowActiveSpans id=2 (5,1 0,1) t=0 (5,1) tEnd=0.268518519 other=1 otherT=1 otherIndex=9 windSum=? windValue=1 oppValue=0
199activeOp op=union miFrom=0 miTo=0 suFrom=0 suTo=1 result=1
200findNextOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
201debugShowSort [3] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.867315861 tEnd=0.867316009 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
202debugShowSort [0] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.912837717 tEnd=0.860978176 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
203debugShowSort [1] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.867315861 tEnd=0.830515061 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
204debugShowSort [2] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.912837717 tEnd=0.912837923 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
205findNextOp firstIndex=[3] sign=-1
206activeOp op=union miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
207activeOp op=union miFrom=1 miTo=1 suFrom=0 suTo=1 result=0
208activeOp op=union miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
209markDoneBinary id=3 (0,2 1,5 1,0 6,1) t=0.867315861 [6] (4.25979853,0.886136234) tEnd=0.867316009 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
210findNextOp from:[3] to:[1] start=7 end=6
211bridgeOp current id=3 from=(4.25980043,0.886136055) to=(4.25979853,0.886136234)
212path.moveTo(4.25980043,0.886136055);
213path.cubicTo(4.25979948,0.886136115, 4.25979948,0.886136174, 4.25979853,0.886136234);
214findNextOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
215debugShowSort [1] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.860978176 tEnd=0.912837717 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
216debugShowSort [2] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.830515061 tEnd=0.83051493 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
217debugShowSort [3] {{0,1}, {1,6}, {2,0}, {5,1}} tStart=0.860978176 tEnd=0.860977989 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
218debugShowSort [0] {{0,2}, {1,5}, {1,0}, {6,1}} tStart=0.830515061 tEnd=0.867315861 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
219findNextOp firstIndex=[1] sign=-1
220activeOp op=union miFrom=0 miTo=0 suFrom=0 suTo=1 result=1
221activeOp op=union miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
222activeOp op=union miFrom=1 miTo=1 suFrom=1 suTo=0 result=0
223findNextOp from:[1] to:[3] start=5 end=4
224bridgeOp current id=1 from=(4.25979853,0.886136234) to=(3.85939217,0.940439045)
225path.cubicTo(4.12151289,0.890467525, 3.98813701,0.909405351, 3.85939217,0.940439045);
226debugShowActiveSpans id=1 (0,1 1,6 2,0 5,1) t=0.912837923 (4.25980043,0.886136055) tEnd=1 other=3 otherT=0.867316009 otherIndex=7 windSum=? windValue=1 oppValue=0
227debugShowActiveSpans id=2 (5,1 0,1) t=0 (5,1) tEnd=0.268518519 other=1 otherT=1 otherIndex=9 windSum=? windValue=1 oppValue=0
228</div>
229
230<div id="cubicOp35da">
231{{x = 0.44618727783085621, y = 2.2840286415243063}, {x = 0.51170845243761109, y = 2.4044088819954914}, {x = 0.57783675570457882, y = 2.4985733182515446}, {x = 0.64483584772311509, y = 2.5694222112973661}}
232{{x = 0.64244110111854291, y = 2.5673840215265367}, {x = 0.63479413812245555, y = 2.5620057200094775}, {x = 0.64115438240274059, y = 2.533597555954064}, {x = 0.6620248993310307, y = 2.4876932484482714}}
caryclark@google.com4aaaaea2013-02-28 16:12:39 +0000233</div>
234
caryclark@google.com1304bb22013-03-13 20:29:41 +0000235<div id="cubicOp38d">
236 SimplifyNew_Test [cubicOp38d]
237{{0,1}, {0,6}, {3,2}, {4,1}},
238{{4,1}, {0,1}},
239op difference
240{{2,3}, {1,4}, {1,0}, {6,0}},
241{{6,0}, {2,3}},
242debugShowCubicIntersection no self intersect {{2,3}, {1,4}, {1,0}, {6,0}}
243debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {1,4}, {1,0}, {6,0}} {{2,3}} wtTs[1]=1 {{6,0}} wnTs[0]=1 {{6,0}, {2,3}} wnTs[1]=0
244debugShowCubicIntersection no intersect {{2,3}, {1,4}, {1,0}, {6,0}} {{0,1}, {0,6}, {3,2}, {4,1}}
245debugShowCubicLineIntersection wtTs[0]=0.666666667 {{2,3}, {1,4}, {1,0}, {6,0}} {{2.518518518518519,0.99999999999999967}} wnTs[0]=0.37037 {{4,1}, {0,1}}
246debugShowCubicLineIntersection no intersect {{0,1}, {0,6}, {3,2}, {4,1}} {{6,0}, {2,3}}
247debugShowLineIntersection no intersect {{6,0}, {2,3}} {{4,1}, {0,1}}
248debugShowCubicIntersection no self intersect {{0,1}, {0,6}, {3,2}, {4,1}}
249debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {0,6}, {3,2}, {4,1}} {{0,1}} wtTs[1]=1 {{4,1}} wnTs[0]=1 {{4,1}, {0,1}} wnTs[1]=0
250debugShowActiveSpans id=3 (2,3 1,4 1,0 6,0) t=0 (2,3) tEnd=0.666666667 other=4 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0
251debugShowActiveSpans id=3 (2,3 1,4 1,0 6,0) t=0.666666667 (2.51851845,1) tEnd=1 other=2 otherT=0.37037037 otherIndex=1 windSum=? windValue=1 oppValue=0
252debugShowActiveSpans id=4 (6,0 2,3) t=0 (6,0) tEnd=1 other=3 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
253debugShowActiveSpans id=1 (0,1 0,6 3,2 4,1) t=0 (0,1) tEnd=1 other=2 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
254debugShowActiveSpans id=2 (4,1 0,1) t=0 (4,1) tEnd=0.37037037 other=1 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0
255debugShowActiveSpans id=2 (4,1 0,1) t=0.37037037 (2.51851845,1) tEnd=1 other=3 otherT=0.666666667 otherIndex=1 windSum=? windValue=1 oppValue=0
256findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
257debugShowSort [0] {{2,3}, {1,4}, {1,0}, {6,0}} tStart=1 tEnd=0.666666667 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
258debugShowSort [1] {{6,0}, {2,3}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
259findTop xyE=(6,0) xyS=(2.51851845,1)
260findTop dxyE=(15,0) dxyS=(6.33333349,-5) cross=-75 bumpsUp=false
261markWinding id=3 (2,3 1,4 1,0 6,0) t=0.666666667 [1] (2.51851845,1) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
262markWinding id=4 (6,0 2,3) t=0 [0] (6,0) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
263markWinding id=3 (2,3 1,4 1,0 6,0) t=0 [0] (2,3) tEnd=0.666666667 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
264markWinding id=3 (2,3 1,4 1,0 6,0) t=0.666666667 [1] (2.51851845,1) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
265activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
266markDoneBinary id=3 (2,3 1,4 1,0 6,0) t=0.666666667 [1] (2.51851845,1) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
267markDoneBinary id=4 (6,0 2,3) t=0 [0] (6,0) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
268markDoneBinary id=3 (2,3 1,4 1,0 6,0) t=0 [0] (2,3) tEnd=0.666666667 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
269findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
270debugShowSort [0] {{2,3}, {1,4}, {1,0}, {6,0}} tStart=0.666666667 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
271debugShowSort [1] {{4,1}, {0,1}} tStart=0.37037037 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
272debugShowSort [2] {{2,3}, {1,4}, {1,0}, {6,0}} tStart=0.666666667 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
273debugShowSort [3] {{4,1}, {0,1}} tStart=0.37037037 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
274findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
275debugShowSort [0] {{2,3}, {1,4}, {1,0}, {6,0}} tStart=0.666666667 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
276debugShowSort [1] {{4,1}, {0,1}} tStart=0.37037037 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
277debugShowSort [2] {{2,3}, {1,4}, {1,0}, {6,0}} tStart=0.666666667 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
278debugShowSort [3] {{4,1}, {0,1}} tStart=0.37037037 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
279markWinding id=2 (4,1 0,1) t=0.37037037 [1] (2.51851845,1) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
280markWinding id=1 (0,1 0,6 3,2 4,1) t=0 [0] (0,1) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
281markWinding id=2 (4,1 0,1) t=0 [0] (4,1) tEnd=0.37037037 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
282markWinding id=2 (4,1 0,1) t=0 [0] (4,1) tEnd=0.37037037 newWindSum=1 newOppSum=-1 oppSum=0 windSum=1 windValue=1
283</div>
284
285<div id="cubicOp38da">
286 {{0,1}, {0,6}, {3,2}, {4,1}},
287 {{2,3}, {1,4}, {1,0}, {6,0}},
288computed quadratics set 2
289 {{2,3}, {1.46296296,3.41666667}, {1.48148148,2.66666667}},
290 {{1.48148148,2.66666667}, {1.5,1.91666667}, {2.51851852,1}},
291 {{2.51851852,1}, {3.53703704,0.0833333333}, {6,0}},
292computed quadratics set 1
293 {{0,1}, {0.0311951689,3.11686153}, {0.643808143,3.37716704}},
294 {{0.643808143,3.37716704}, {1.25642112,3.63747255}, {2.07610987,2.9396429}},
295 {{2.07610987,2.9396429}, {2.89579862,2.24181325}, {3.54822112,1.48426931}},
296 {{3.54822112,1.48426931}, {3.81269436,1.19058669}, {4,1}},
297</div>
298
299<div id="cubicOp39d">
300 SimplifyNew_Test [cubicOp39d]
301{{0,1}, {2,3}, {5,1}, {4,3}},
302{{4,3}, {0,1}},
303op difference
304{{1,5}, {3,4}, {1,0}, {3,2}},
305{{3,2}, {1,5}},
306debugShowCubicIntersection no self intersect {{0,1}, {2,3}, {5,1}, {4,3}}
307debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {2,3}, {5,1}, {4,3}} {{0,1}} wtTs[1]=0.285714286 {{1.8425655976676385,1.9212827988338192}} wtTs[2]=1 {{4,3}} wnTs[0]=1 {{4,3}, {0,1}} wnTs[1]=0.539358601 wnTs[2]=0
308debugShowCubicIntersection wtTs[0]=0.311007457 {{0,1}, {2,3}, {5,1}, {4,3}} {{2.005809685956442,1.9459962410665144}} wnTs[0]=0.589885 {{1,5}, {3,4}, {1,0}, {3,2}}
309debugShowCubicLineIntersection no intersect {{0,1}, {2,3}, {5,1}, {4,3}} {{3,2}, {1,5}}
310debugShowCubicLineIntersection wtTs[0]=0.576935809 {{1,5}, {3,4}, {1,0}, {3,2}} {{2.0036431374219883,2.0018215687109939}} wnTs[0]=0.499089 {{4,3}, {0,1}}
311debugShowLineIntersection wtTs[0]=0.3125 {{4,3}, {0,1}} {{2.75,2.375}} wnTs[0]=0.125 {{3,2}, {1,5}}
312debugShowCubicIntersection no self intersect {{1,5}, {3,4}, {1,0}, {3,2}}
313debugShowCubicLineIntersection wtTs[0]=0 {{1,5}, {3,4}, {1,0}, {3,2}} {{1,5}} wtTs[1]=0.285714286 {{1.9212827988338184,3.6180758017492725}} wtTs[2]=1 {{3,2}} wnTs[0]=1 {{3,2}, {1,5}} wnTs[1]=0.539358601 wnTs[2]=0
314debugShowActiveSpans id=1 (0,1 2,3 5,1 4,3) t=0 (0,1) tEnd=0.285714286 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
315debugShowActiveSpans id=1 (0,1 2,3 5,1 4,3) t=0.285714286 (1.84256566,1.92128277) tEnd=0.311007457 other=2 otherT=0.539358601 otherIndex=3 windSum=? windValue=1 oppValue=0
316debugShowActiveSpans id=1 (0,1 2,3 5,1 4,3) t=0.311007457 (2.00580978,1.94599628) tEnd=1 other=3 otherT=0.589885081 otherIndex=3 windSum=? windValue=1 oppValue=0
317debugShowActiveSpans id=2 (4,3 0,1) t=0 (4,3) tEnd=0.3125 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
318debugShowActiveSpans id=2 (4,3 0,1) t=0.3125 (2.75,2.375) tEnd=0.499089216 other=4 otherT=0.125 otherIndex=1 windSum=? windValue=1 oppValue=0
319debugShowActiveSpans id=2 (4,3 0,1) t=0.499089216 (2.00364304,2.00182152) tEnd=0.539358601 other=3 otherT=0.576935809 otherIndex=2 windSum=? windValue=1 oppValue=0
320debugShowActiveSpans id=2 (4,3 0,1) t=0.539358601 (1.84256566,1.92128277) tEnd=1 other=1 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0
321debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0 (1,5) tEnd=0.285714286 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
322debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.285714286 (1.92128277,3.61807585) tEnd=0.576935809 other=4 otherT=0.539358601 otherIndex=2 windSum=? windValue=1 oppValue=0
323debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.576935809 (2.00364304,2.00182152) tEnd=0.589885081 other=2 otherT=0.499089216 otherIndex=2 windSum=? windValue=1 oppValue=0
324debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.589885081 (2.00580978,1.94599628) tEnd=1 other=1 otherT=0.311007457 otherIndex=2 windSum=? windValue=1 oppValue=0
325debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
326debugShowActiveSpans id=4 (3,2 1,5) t=0.125 (2.75,2.375) tEnd=0.539358601 other=2 otherT=0.3125 otherIndex=1 windSum=? windValue=1 oppValue=0
327debugShowActiveSpans id=4 (3,2 1,5) t=0.539358601 (1.92128277,3.61807585) tEnd=1 other=3 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0
328findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
329debugShowSort [0] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0 tEnd=0.285714286 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
330debugShowSort [1] {{4,3}, {0,1}} tStart=1 tEnd=0.539358601 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
331findTop xyE=(0,1) xyS=(1.84256566,1.92128277)
332findTop dxyE=(6,6) dxyS=(6.48979568,1.10204077) cross=-32.3265305 bumpsUp=false
333markWinding id=1 (0,1 2,3 5,1 4,3) t=0 [0] (0,1) tEnd=0.285714286 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
334markWinding id=2 (4,3 0,1) t=0.539358601 [3] (1.84256566,1.92128277) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
335markWinding id=1 (0,1 2,3 5,1 4,3) t=0 [0] (0,1) tEnd=0.285714286 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
336activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
337findNextOp simple
338markDoneBinary id=1 (0,1 2,3 5,1 4,3) t=0 [0] (0,1) tEnd=0.285714286 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
339bridgeOp current id=1 from=(1.84256566,1.92128277) to=(0,1)
340path.moveTo(1.84256566,1.92128277);
341path.cubicTo(1.22448969,1.8163265, 0.571428597,1.57142854, 0,1);
342findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
343debugShowSort [0] {{4,3}, {0,1}} tStart=0.539358601 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
344debugShowSort [1] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.285714286 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
345debugShowSort [2] {{4,3}, {0,1}} tStart=0.539358601 tEnd=0.499089216 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
346debugShowSort [3] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.285714286 tEnd=0.311007457 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
347findNextOp firstIndex=[0] sign=-1
348activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
349activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
350markWinding id=2 (4,3 0,1) t=0.499089216 [2] (2.00364304,2.00182152) tEnd=0.539358601 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
351findNextOp chase.append id=2
352activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
353markWinding id=1 (0,1 2,3 5,1 4,3) t=0.285714286 [1] (1.84256566,1.92128277) tEnd=0.311007457 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
354findNextOp chase.append id=1
355markDoneBinary id=2 (4,3 0,1) t=0.539358601 [3] (1.84256566,1.92128277) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
356findNextOp from:[2] to:[1] start=1 end=2
357bridgeOp current id=2 from=(0,1) to=(1.84256566,1.92128277)
358path.lineTo(1.84256566,1.92128277);
359path.close();
360debugShowActiveSpans id=1 (0,1 2,3 5,1 4,3) t=0.285714286 (1.84256566,1.92128277) tEnd=0.311007457 other=2 otherT=0.539358601 otherIndex=3 windSum=-1 windValue=1 oppValue=0
361debugShowActiveSpans id=1 (0,1 2,3 5,1 4,3) t=0.311007457 (2.00580978,1.94599628) tEnd=1 other=3 otherT=0.589885081 otherIndex=3 windSum=? windValue=1 oppValue=0
362debugShowActiveSpans id=2 (4,3 0,1) t=0 (4,3) tEnd=0.3125 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
363debugShowActiveSpans id=2 (4,3 0,1) t=0.3125 (2.75,2.375) tEnd=0.499089216 other=4 otherT=0.125 otherIndex=1 windSum=? windValue=1 oppValue=0
364debugShowActiveSpans id=2 (4,3 0,1) t=0.499089216 (2.00364304,2.00182152) tEnd=0.539358601 other=3 otherT=0.576935809 otherIndex=2 windSum=-1 windValue=1 oppValue=0
365debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0 (1,5) tEnd=0.285714286 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
366debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.285714286 (1.92128277,3.61807585) tEnd=0.576935809 other=4 otherT=0.539358601 otherIndex=2 windSum=? windValue=1 oppValue=0
367debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.576935809 (2.00364304,2.00182152) tEnd=0.589885081 other=2 otherT=0.499089216 otherIndex=2 windSum=? windValue=1 oppValue=0
368debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0.589885081 (2.00580978,1.94599628) tEnd=1 other=1 otherT=0.311007457 otherIndex=2 windSum=? windValue=1 oppValue=0
369debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
370debugShowActiveSpans id=4 (3,2 1,5) t=0.125 (2.75,2.375) tEnd=0.539358601 other=2 otherT=0.3125 otherIndex=1 windSum=? windValue=1 oppValue=0
371debugShowActiveSpans id=4 (3,2 1,5) t=0.539358601 (1.92128277,3.61807585) tEnd=1 other=3 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0
372activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
373findNextOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
374debugShowSort [3] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.285714286 tEnd=0.311007457 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
375debugShowSort [0] {{4,3}, {0,1}} tStart=0.539358601 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
376debugShowSort [1] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.285714286 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
377debugShowSort [2] {{4,3}, {0,1}} tStart=0.539358601 tEnd=0.499089216 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
378findNextOp firstIndex=[3] sign=-1
379activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
380activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
381activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
382markDoneBinary id=1 (0,1 2,3 5,1 4,3) t=0.285714286 [1] (1.84256566,1.92128277) tEnd=0.311007457 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
383findNextOp from:[1] to:[2] start=3 end=2
384bridgeOp current id=1 from=(2.00580978,1.94599628) to=(1.84256566,1.92128277)
385path.moveTo(2.00580978,1.94599628);
386path.cubicTo(1.9517231,1.93876874, 1.89728141,1.93057418, 1.84256566,1.92128277);
387findNextOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
388debugShowSort [1] {{4,3}, {0,1}} tStart=0.499089216 tEnd=0.539358601 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
389debugShowSort [2] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.576935809 tEnd=0.285714286 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
390debugShowSort [3] {{4,3}, {0,1}} tStart=0.499089216 tEnd=0.3125 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
391debugShowSort [0] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.576935809 tEnd=0.589885081 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
392findNextOp firstIndex=[1] sign=-1
393activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
394markDoneBinary id=3 (1,5 3,4 1,0 3,2) t=0.285714286 [1] (1.92128277,3.61807585) tEnd=0.576935809 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
395findNextOp chase.append id=3
396activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
397markDoneBinary id=2 (4,3 0,1) t=0.3125 [1] (2.75,2.375) tEnd=0.499089216 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
398findNextOp chase.append id=2
399activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
400markWinding id=3 (1,5 3,4 1,0 3,2) t=0.576935809 [2] (2.00364304,2.00182152) tEnd=0.589885081 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
401findNextOp chase.append id=3
402markDoneBinary id=2 (4,3 0,1) t=0.499089216 [2] (2.00364304,2.00182152) tEnd=0.539358601 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
403findNextOp from:[2] to:[3] start=2 end=3
404bridgeOp current id=2 from=(1.84256566,1.92128277) to=(2.00364304,2.00182152)
405findNextOp debugShowSort contourWinding=0 oppContourWinding=-1 sign=1
406debugShowSort [2] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.589885081 tEnd=0.576935809 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
407debugShowSort [3] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.311007457 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
408debugShowSort [0] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.589885081 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
409debugShowSort [1] {{0,1}, {2,3}, {5,1}, {4,3}} tStart=0.311007457 tEnd=0.285714286 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
410findNextOp firstIndex=[2] sign=1
411activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
412markDoneBinary id=1 (0,1 2,3 5,1 4,3) t=0.311007457 [2] (2.00580978,1.94599628) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
413markDoneBinary id=2 (4,3 0,1) t=0 [0] (4,3) tEnd=0.3125 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
414findNextOp chase.append id=2
415activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
416markDoneBinary id=3 (1,5 3,4 1,0 3,2) t=0.589885081 [3] (2.00580978,1.94599628) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
417markDoneBinary id=4 (3,2 1,5) t=0 [0] (3,2) tEnd=0.125 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
418findNextOp chase.append id=4
419activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
420markDoneBinary id=3 (1,5 3,4 1,0 3,2) t=0.576935809 [2] (2.00364304,2.00182152) tEnd=0.589885081 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
421findNextOp from:[3] to:[1] start=2 end=1
422bridgeOp current id=3 from=(2.00364304,2.00182152) to=(2.00580978,1.94599628)
423path.lineTo(2.00364304,2.00182152);
424path.cubicTo(2.00425649,1.98283899, 2.0049727,1.96422386, 2.00580978,1.94599628);
425path.close();
426findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
427debugShowSort [0] {{3,2}, {1,5}} tStart=0.125 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
428debugShowSort [1] {{4,3}, {0,1}} tStart=0.3125 tEnd=0.499089216 sign=-1 windValue=1 windSum=-1 0->1 (max=1) done=1 tiny=0 opp=1
429debugShowSort [2] {{3,2}, {1,5}} tStart=0.125 tEnd=0.539358601 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
430debugShowSort [3] {{4,3}, {0,1}} tStart=0.3125 tEnd=0 sign=1 windValue=1 windSum=-1 1->0 (max=1) done=1 tiny=0 opp=1
431findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
432debugShowSort [0] {{3,2}, {1,5}} tStart=0.125 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
433debugShowSort [1] {{4,3}, {0,1}} tStart=0.3125 tEnd=0.499089216 sign=-1 windValue=1 windSum=-1 0->1 (max=1) done=1 tiny=0 opp=1
434debugShowSort [2] {{3,2}, {1,5}} tStart=0.125 tEnd=0.539358601 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
435debugShowSort [3] {{4,3}, {0,1}} tStart=0.3125 tEnd=0 sign=1 windValue=1 windSum=-1 1->0 (max=1) done=1 tiny=0 opp=1
436markWinding id=4 (3,2 1,5) t=0.125 [1] (2.75,2.375) tEnd=0.539358601 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
437debugShowActiveSpans id=3 (1,5 3,4 1,0 3,2) t=0 (1,5) tEnd=0.285714286 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
438debugShowActiveSpans id=4 (3,2 1,5) t=0.125 (2.75,2.375) tEnd=0.539358601 other=2 otherT=0.3125 otherIndex=1 windSum=-1 windValue=1 oppValue=0
439debugShowActiveSpans id=4 (3,2 1,5) t=0.539358601 (1.92128277,3.61807585) tEnd=1 other=3 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0
440activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
441findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1
442debugShowSort [0] {{3,2}, {1,5}} tStart=0.539358601 tEnd=0.125 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
443debugShowSort [1] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.285714286 tEnd=0.576935809 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
444debugShowSort [2] {{3,2}, {1,5}} tStart=0.539358601 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
445debugShowSort [3] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.285714286 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
446findNextOp firstIndex=[0] sign=1
447activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
448activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
449markWinding id=4 (3,2 1,5) t=0.539358601 [2] (1.92128277,3.61807585) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
450markWinding id=3 (1,5 3,4 1,0 3,2) t=0 [0] (1,5) tEnd=0.285714286 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
451findNextOp chase.append id=3
452activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
453markDoneBinary id=4 (3,2 1,5) t=0.125 [1] (2.75,2.375) tEnd=0.539358601 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
454findNextOp from:[4] to:[3] start=1 end=0
455bridgeOp current id=4 from=(2.75,2.375) to=(1.92128277,3.61807585)
456findNextOp simple
457markDoneBinary id=3 (1,5 3,4 1,0 3,2) t=0 [0] (1,5) tEnd=0.285714286 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
458bridgeOp current id=3 from=(1.92128277,3.61807585) to=(1,5)
459path.moveTo(2.75,2.375);
460path.lineTo(1.92128277,3.61807585);
461path.cubicTo(1.8163265,4.18367338, 1.57142854,4.71428585, 1,5);
462findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=-1
463debugShowSort [2] {{3,2}, {1,5}} tStart=0.539358601 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
464debugShowSort [3] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.285714286 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
465debugShowSort [0] {{3,2}, {1,5}} tStart=0.539358601 tEnd=0.125 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
466debugShowSort [1] {{1,5}, {3,4}, {1,0}, {3,2}} tStart=0.285714286 tEnd=0.576935809 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
467findNextOp firstIndex=[2] sign=-1
468activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
469activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
470activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
471markDoneBinary id=4 (3,2 1,5) t=0.539358601 [2] (1.92128277,3.61807585) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
472findNextOp from:[4] to:[3] start=1 end=2
473bridgeOp current id=4 from=(1,5) to=(1.92128277,3.61807585)
474</div>
475
476<div id="cubicOp39da">
477computed quadratics given
478 {{2.512,1.571}, {2.64,1.66}, {2.8,1.8}, {3,2}},
479 {{2.41818762,1.98497726}, {2.82699049,2.00933065}, {3.20046793,1.99420472}, {3.49861995,2.00359946}},
480computed quadratics set 1
481 {{2.512,1.571}, {2.702,1.70225}, {3,2}},
482computed quadratics set 2
483 {{2.41818762,1.98497726}, {2.79879886,2.00375569}, {3.125,2}},
484 {{3.125,2}, {3.32670858,1.99910014}, {3.49861995,2.00359946}},
485</div>
486
487<div id="cubicOp40d">
488 SimplifyNew_Test [cubicOp40d]
489{{0,1}, {1,5}, {3,2}, {4,2}},
490{{4,2}, {0,1}},
491op difference
492{{2,3}, {2,4}, {1,0}, {5,1}},
493{{5,1}, {2,3}},
494debugShowCubicIntersection no self intersect {{2,3}, {2,4}, {1,0}, {5,1}}
495debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {2,4}, {1,0}, {5,1}} {{2,3}} wtTs[1]=1 {{5,1}} wnTs[0]=1 {{5,1}, {2,3}} wnTs[1]=0
496debugShowCubicIntersection wtTs[0]=0 {{2,3}, {2,4}, {1,0}, {5,1}} {{2,3}} wtTs[1]=0.226611502 {{1.915764455286163,3.0259142027140675}} wnTs[0]=0.5 {{0,1}, {1,5}, {3,2}, {4,2}} wnTs[1]=0.481278074
497debugShowCubicLineIntersection wtTs[0]=0.601219833 {{2,3}, {2,4}, {1,0}, {5,1}} {{2.2195247359544519,1.554881183988613}} wnTs[0]=0.445119 {{4,2}, {0,1}}
498debugShowCubicLineIntersection wtTs[0]=0.5 {{0,1}, {1,5}, {3,2}, {4,2}} {{2.0000000000000009,2.9999999999999996}} wnTs[0]=1 {{5,1}, {2,3}}
499debugShowLineIntersection wtTs[0]=0.454545455 {{5,1}, {2,3}} {{3.6363636363636362,1.9090909090909089}} wnTs[0]=0.0909091 {{4,2}, {0,1}}
500debugShowCubicIntersection no self intersect {{0,1}, {1,5}, {3,2}, {4,2}}
501debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {1,5}, {3,2}, {4,2}} {{0,1}} wtTs[1]=1 {{4,2}} wnTs[0]=1 {{4,2}, {0,1}} wnTs[1]=0
502debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0 (2,3) tEnd=0.226611502 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
503debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0.226611502 (1.91576445,3.02591419) tEnd=0.601219833 other=1 otherT=0.481278074 otherIndex=1 windSum=? windValue=1 oppValue=0
504debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0.601219833 (2.21952462,1.55488122) tEnd=1 other=2 otherT=0.445118816 otherIndex=2 windSum=? windValue=1 oppValue=0
505debugShowActiveSpans id=4 (5,1 2,3) t=0 (5,1) tEnd=0.454545455 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
506debugShowActiveSpans id=4 (5,1 2,3) t=0.454545455 (3.63636374,1.90909088) tEnd=1 other=2 otherT=0.0909090909 otherIndex=1 windSum=? windValue=1 oppValue=0
507debugShowActiveSpans id=4 (5,1 2,3) t=1 (2,3) tEnd=1 other=1 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
508debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0 (0,1) tEnd=0.481278074 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
509debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.481278074 (1.91576445,3.02591419) tEnd=0.5 other=3 otherT=0.226611502 otherIndex=2 windSum=? windValue=1 oppValue=0
510debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=3 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0
511debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
512debugShowActiveSpans id=2 (4,2 0,1) t=0 (4,2) tEnd=0.0909090909 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
513debugShowActiveSpans id=2 (4,2 0,1) t=0.0909090909 (3.63636374,1.90909088) tEnd=0.445118816 other=4 otherT=0.454545455 otherIndex=1 windSum=? windValue=1 oppValue=0
514debugShowActiveSpans id=2 (4,2 0,1) t=0.445118816 (2.21952462,1.55488122) tEnd=1 other=3 otherT=0.601219833 otherIndex=3 windSum=? windValue=1 oppValue=0
515findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
516debugShowSort [0] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=1 tEnd=0.601219833 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
517debugShowSort [1] {{5,1}, {2,3}} tStart=0 tEnd=0.454545455 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
518findTop xyE=(5,1) xyS=(2.21952462,1.55488122)
519findTop dxyE=(12,3) dxyS=(2.8990562,-4.19263649) cross=-59.0088043 bumpsUp=true
520markWinding id=3 (2,3 2,4 1,0 5,1) t=0.601219833 [3] (2.21952462,1.55488122) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
521markWinding id=4 (5,1 2,3) t=0 [0] (5,1) tEnd=0.454545455 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
522markWinding id=3 (2,3 2,4 1,0 5,1) t=0.601219833 [3] (2.21952462,1.55488122) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
523activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
524markDoneBinary id=3 (2,3 2,4 1,0 5,1) t=0.601219833 [3] (2.21952462,1.55488122) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
525markDoneBinary id=4 (5,1 2,3) t=0 [0] (5,1) tEnd=0.454545455 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
526findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
527debugShowSort [0] {{5,1}, {2,3}} tStart=0.454545455 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
528debugShowSort [1] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0.445118816 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
529debugShowSort [2] {{5,1}, {2,3}} tStart=0.454545455 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
530debugShowSort [3] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
531findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
532debugShowSort [0] {{5,1}, {2,3}} tStart=0.454545455 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
533debugShowSort [1] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0.445118816 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
534debugShowSort [2] {{5,1}, {2,3}} tStart=0.454545455 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
535debugShowSort [3] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
536markWinding id=2 (4,2 0,1) t=0.0909090909 [1] (3.63636374,1.90909088) tEnd=0.445118816 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
537markWinding id=4 (5,1 2,3) t=0.454545455 [1] (3.63636374,1.90909088) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
538markWinding id=2 (4,2 0,1) t=0 [0] (4,2) tEnd=0.0909090909 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
539markWinding id=1 (0,1 1,5 3,2 4,2) t=0.5 [2] (2,3) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
540markWinding id=1 (0,1 1,5 3,2 4,2) t=0.5 [3] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
541debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0 (2,3) tEnd=0.226611502 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
542debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0.226611502 (1.91576445,3.02591419) tEnd=0.601219833 other=1 otherT=0.481278074 otherIndex=1 windSum=? windValue=1 oppValue=0
543debugShowActiveSpans id=4 (5,1 2,3) t=0.454545455 (3.63636374,1.90909088) tEnd=1 other=2 otherT=0.0909090909 otherIndex=1 windSum=-1 windValue=1 oppValue=0
544debugShowActiveSpans id=4 (5,1 2,3) t=1 (2,3) tEnd=1 other=1 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
545debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0 (0,1) tEnd=0.481278074 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
546debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.481278074 (1.91576445,3.02591419) tEnd=0.5 other=3 otherT=0.226611502 otherIndex=2 windSum=? windValue=1 oppValue=0
547debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=3 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0
548debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=1 windValue=1 oppValue=0
549debugShowActiveSpans id=2 (4,2 0,1) t=0 (4,2) tEnd=0.0909090909 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0
550debugShowActiveSpans id=2 (4,2 0,1) t=0.0909090909 (3.63636374,1.90909088) tEnd=0.445118816 other=4 otherT=0.454545455 otherIndex=1 windSum=1 windValue=1 oppValue=0
551debugShowActiveSpans id=2 (4,2 0,1) t=0.445118816 (2.21952462,1.55488122) tEnd=1 other=3 otherT=0.601219833 otherIndex=3 windSum=? windValue=1 oppValue=0
552activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
553markDoneBinary id=2 (4,2 0,1) t=0.0909090909 [1] (3.63636374,1.90909088) tEnd=0.445118816 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
554findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
555debugShowSort [0] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
556debugShowSort [1] {{4,2}, {0,1}} tStart=0.445118816 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
557debugShowSort [2] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=0.226611502 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
558debugShowSort [3] {{4,2}, {0,1}} tStart=0.445118816 tEnd=0.0909090909 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
559findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
560debugShowSort [0] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
561debugShowSort [1] {{4,2}, {0,1}} tStart=0.445118816 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
562debugShowSort [2] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=0.226611502 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
563debugShowSort [3] {{4,2}, {0,1}} tStart=0.445118816 tEnd=0.0909090909 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
564markWinding id=2 (4,2 0,1) t=0.445118816 [2] (2.21952462,1.55488122) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
565markWinding id=1 (0,1 1,5 3,2 4,2) t=0 [0] (0,1) tEnd=0.481278074 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
566markWinding id=3 (2,3 2,4 1,0 5,1) t=0.226611502 [2] (1.91576445,3.02591419) tEnd=0.601219833 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
567debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0 (2,3) tEnd=0.226611502 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
568debugShowActiveSpans id=3 (2,3 2,4 1,0 5,1) t=0.226611502 (1.91576445,3.02591419) tEnd=0.601219833 other=1 otherT=0.481278074 otherIndex=1 windSum=-1 windValue=1 oppValue=0
569debugShowActiveSpans id=4 (5,1 2,3) t=0.454545455 (3.63636374,1.90909088) tEnd=1 other=2 otherT=0.0909090909 otherIndex=1 windSum=-1 windValue=1 oppValue=0
570debugShowActiveSpans id=4 (5,1 2,3) t=1 (2,3) tEnd=1 other=1 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
571debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0 (0,1) tEnd=0.481278074 other=2 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0
572debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.481278074 (1.91576445,3.02591419) tEnd=0.5 other=3 otherT=0.226611502 otherIndex=2 windSum=? windValue=1 oppValue=0
573debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=3 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0
574debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=1 windValue=1 oppValue=0
575debugShowActiveSpans id=2 (4,2 0,1) t=0 (4,2) tEnd=0.0909090909 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0
576debugShowActiveSpans id=2 (4,2 0,1) t=0.445118816 (2.21952462,1.55488122) tEnd=1 other=3 otherT=0.601219833 otherIndex=3 windSum=1 windValue=1 oppValue=0
577activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
578findNextOp simple
579markDoneBinary id=2 (4,2 0,1) t=0.445118816 [2] (2.21952462,1.55488122) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
580bridgeOp current id=2 from=(2.21952462,1.55488122) to=(0,1)
581findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
582debugShowSort [2] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.481278074 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
583debugShowSort [3] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.226611502 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
584debugShowSort [0] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.481278074 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
585debugShowSort [1] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.226611502 tEnd=0.601219833 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1
586findNextOp firstIndex=[2] sign=1
587activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
588markDoneBinary id=3 (2,3 2,4 1,0 5,1) t=0 [0] (2,3) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
589markDoneBinary id=3 (2,3 2,4 1,0 5,1) t=0 [1] (2,3) tEnd=0.226611502 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
590findNextOp chase.append id=3
591activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
592markDoneBinary id=1 (0,1 1,5 3,2 4,2) t=0.481278074 [1] (1.91576445,3.02591419) tEnd=0.5 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
593findNextOp chase.append id=1
594activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
595markDoneBinary id=1 (0,1 1,5 3,2 4,2) t=0 [0] (0,1) tEnd=0.481278074 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
596findNextOp from:[1] to:[3] start=2 end=3
597bridgeOp current id=1 from=(0,1) to=(1.91576445,3.02591419)
598path.moveTo(2.21952462,1.55488122);
599path.lineTo(0,1);
600path.cubicTo(0.481278062,2.92511225, 1.19418478,3.22882462, 1.91576445,3.02591419);
601findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1
602debugShowSort [2] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=0.226611502 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
603debugShowSort [3] {{4,2}, {0,1}} tStart=0.445118816 tEnd=0.0909090909 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
604debugShowSort [0] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0.601219833 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
605debugShowSort [1] {{4,2}, {0,1}} tStart=0.445118816 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
606findNextOp firstIndex=[2] sign=1
607activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
608activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
609activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
610markDoneBinary id=3 (2,3 2,4 1,0 5,1) t=0.226611502 [2] (1.91576445,3.02591419) tEnd=0.601219833 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
611findNextOp from:[3] to:[2] start=2 end=3
612bridgeOp current id=3 from=(1.91576445,3.02591419) to=(2.21952462,1.55488122)
613path.cubicTo(1.86140633,2.74398875, 1.8575213,2.07841325, 2.21952462,1.55488122);
614path.close();
615debugShowActiveSpans id=4 (5,1 2,3) t=0.454545455 (3.63636374,1.90909088) tEnd=1 other=2 otherT=0.0909090909 otherIndex=1 windSum=-1 windValue=1 oppValue=0
616debugShowActiveSpans id=4 (5,1 2,3) t=1 (2,3) tEnd=1 other=1 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
617debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=3 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0
618debugShowActiveSpans id=1 (0,1 1,5 3,2 4,2) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=1 windValue=1 oppValue=0
619debugShowActiveSpans id=2 (4,2 0,1) t=0 (4,2) tEnd=0.0909090909 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0
620activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
621findNextOp simple
622markDoneBinary id=1 (0,1 1,5 3,2 4,2) t=0.5 [2] (2,3) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
623markDoneBinary id=1 (0,1 1,5 3,2 4,2) t=0.5 [3] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
624bridgeOp current id=1 from=(2,3) to=(4,2)
625path.moveTo(2,3);
626path.cubicTo(2.75,2.75, 3.5,2, 4,2);
627findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
628debugShowSort [3] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
629debugShowSort [0] {{5,1}, {2,3}} tStart=0.454545455 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
630debugShowSort [1] {{4,2}, {0,1}} tStart=0.0909090909 tEnd=0.445118816 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
631debugShowSort [2] {{5,1}, {2,3}} tStart=0.454545455 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1
632findNextOp firstIndex=[3] sign=1
633activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
634activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
635activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
636markDoneBinary id=2 (4,2 0,1) t=0 [0] (4,2) tEnd=0.0909090909 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
637findNextOp from:[2] to:[4] start=1 end=2
638bridgeOp current id=2 from=(4,2) to=(3.63636374,1.90909088)
639findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1
640debugShowSort [1] {{5,1}, {2,3}} tStart=1 tEnd=0.454545455 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
641debugShowSort [2] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.5 tEnd=0.481278074 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
642debugShowSort [3] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0 tEnd=0.226611502 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
643debugShowSort [0] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
644findNextOp firstIndex=[1] sign=1
645activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
646activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
647activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
648markDoneBinary id=4 (5,1 2,3) t=0.454545455 [1] (3.63636374,1.90909088) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
649findNextOp from:[4] to:[1] start=3 end=4
650bridgeOp current id=4 from=(3.63636374,1.90909088) to=(2,3)
651path.lineTo(3.63636374,1.90909088);
652path.lineTo(2,3);
653path.close();
654debugShowActiveSpans id=4 (5,1 2,3) t=1 (2,3) tEnd=1 other=1 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
655findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
656debugShowSort [0] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
657debugShowSort [1] {{5,1}, {2,3}} tStart=1 tEnd=0.454545455 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
658debugShowSort [2] {{0,1}, {1,5}, {3,2}, {4,2}} tStart=0.5 tEnd=0.481278074 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
659debugShowSort [3] {{2,3}, {2,4}, {1,0}, {5,1}} tStart=0 tEnd=0.226611502 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
660</div>
661
662<div id="cubicOp41i">
663 SimplifyNew_Test [cubicOp41i]
664{{0,1}, {2,6}, {4,3}, {6,4}},
665{{6,4}, {0,1}},
666op intersect
667{{3,4}, {4,6}, {1,0}, {6,2}},
668{{6,2}, {3,4}},
669debugShowCubicIntersection no self intersect {{0,1}, {2,6}, {4,3}, {6,4}}
670debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {2,6}, {4,3}, {6,4}} {{0,1}} wtTs[1]=1 {{6,4}} wnTs[0]=1 {{6,4}, {0,1}} wnTs[1]=0
671debugShowCubicIntersection wtTs[0]=0.5 {{0,1}, {2,6}, {4,3}, {6,4}} {{2.9999999999509201,3.9999999999999996}} wtTs[1]=0.521137715 {{3.1268262924910069,3.9974325146613827}} wnTs[0]=0 {{3,4}, {4,6}, {1,0}, {6,2}} wnTs[1]=0.317571165
672debugShowCubicLineIntersection wtTs[0]=0.5 {{0,1}, {2,6}, {4,3}, {6,4}} {{3,4}} wnTs[0]=1 {{6,2}, {3,4}}
673debugShowCubicLineIntersection wtTs[0]=0.580941393 {{3,4}, {4,6}, {1,0}, {6,2}} {{3.0456725133851208,2.5228362566925604}} wnTs[0]=0.492388 {{6,4}, {0,1}}
674debugShowLineIntersection wtTs[0]=0.285714286 {{6,4}, {0,1}} {{4.2857142857142856,3.1428571428571428}} wnTs[0]=0.571429 {{6,2}, {3,4}}
675debugShowCubicIntersection no self intersect {{3,4}, {4,6}, {1,0}, {6,2}}
676debugShowCubicLineIntersection wtTs[0]=0 {{3,4}, {4,6}, {1,0}, {6,2}} {{3,4}} wtTs[1]=0.333333333 {{3.1111111111111116,3.9259259259259256}} wtTs[2]=1 {{6,2}} wnTs[0]=1 {{6,2}, {3,4}} wnTs[1]=0.962962963 wnTs[2]=0
677debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0 (0,1) tEnd=0.5 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
678debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.5 (3,4) tEnd=0.521137715 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
679debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.521137715 (3.12682629,3.99743247) tEnd=1 other=3 otherT=0.317571165 otherIndex=2 windSum=? windValue=1 oppValue=0
680debugShowActiveSpans id=2 (6,4 0,1) t=0 (6,4) tEnd=0.285714286 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
681debugShowActiveSpans id=2 (6,4 0,1) t=0.285714286 (4.28571415,3.14285707) tEnd=0.492387914 other=4 otherT=0.571428571 otherIndex=1 windSum=? windValue=1 oppValue=0
682debugShowActiveSpans id=2 (6,4 0,1) t=0.492387914 (3.04567242,2.52283621) tEnd=1 other=3 otherT=0.580941393 otherIndex=4 windSum=? windValue=1 oppValue=0
683debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0 (3,4) tEnd=0.317571165 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
684debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.317571165 (3.12682629,3.99743247) tEnd=0.333333333 other=1 otherT=0.521137715 otherIndex=3 windSum=? windValue=1 oppValue=0
685debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.333333333 (3.11111116,3.92592597) tEnd=0.580941393 other=4 otherT=0.962962963 otherIndex=2 windSum=? windValue=1 oppValue=0
686debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.580941393 (3.04567242,2.52283621) tEnd=1 other=2 otherT=0.492387914 otherIndex=2 windSum=? windValue=1 oppValue=0
687debugShowActiveSpans id=4 (6,2 3,4) t=0 (6,2) tEnd=0.571428571 other=3 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
688debugShowActiveSpans id=4 (6,2 3,4) t=0.571428571 (4.28571415,3.14285707) tEnd=0.962962963 other=2 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0
689debugShowActiveSpans id=4 (6,2 3,4) t=0.962962963 (3.11111116,3.92592597) tEnd=1 other=3 otherT=0.333333333 otherIndex=3 windSum=? windValue=1 oppValue=0
690findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
691debugShowSort [0] {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
692debugShowSort [1] {{6,4}, {0,1}} tStart=1 tEnd=0.492387914 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
693findTop xyE=(0,1) xyS=(3,4)
694findTop dxyE=(6,15) dxyS=(6,9.81599801e-11) cross=-90 bumpsUp=false
695markWinding id=1 (0,1 2,6 4,3 6,4) t=0 [0] (0,1) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
696markWinding id=2 (6,4 0,1) t=0.492387914 [2] (3.04567242,2.52283621) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
697markWinding id=1 (0,1 2,6 4,3 6,4) t=0 [0] (0,1) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
698activeOp op=sect miFrom=1 miTo=0 suFrom=0 suTo=0 result=0
699markDoneBinary id=1 (0,1 2,6 4,3 6,4) t=0 [0] (0,1) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
700markDoneBinary id=2 (6,4 0,1) t=0.492387914 [2] (3.04567242,2.52283621) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
701findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1
702debugShowSort [0] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
703debugShowSort [1] {{6,4}, {0,1}} tStart=0.492387914 tEnd=1 sign=-1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=1
704debugShowSort [2] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=0.333333333 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
705debugShowSort [3] {{6,4}, {0,1}} tStart=0.492387914 tEnd=0.285714286 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
706findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
707debugShowSort [1] {{6,4}, {0,1}} tStart=0.492387914 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
708debugShowSort [2] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=0.333333333 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
709debugShowSort [3] {{6,4}, {0,1}} tStart=0.492387914 tEnd=0.285714286 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
710debugShowSort [0] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
711markWinding id=3 (3,4 4,6 1,0 6,2) t=0.333333333 [3] (3.11111116,3.92592597) tEnd=0.580941393 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
712markWinding id=2 (6,4 0,1) t=0.285714286 [1] (4.28571415,3.14285707) tEnd=0.492387914 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
713markWinding id=3 (3,4 4,6 1,0 6,2) t=0.580941393 [4] (3.04567242,2.52283621) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
714markWinding id=4 (6,2 3,4) t=0 [0] (6,2) tEnd=0.571428571 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
715debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.5 (3,4) tEnd=0.521137715 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
716debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.521137715 (3.12682629,3.99743247) tEnd=1 other=3 otherT=0.317571165 otherIndex=2 windSum=? windValue=1 oppValue=0
717debugShowActiveSpans id=2 (6,4 0,1) t=0 (6,4) tEnd=0.285714286 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
718debugShowActiveSpans id=2 (6,4 0,1) t=0.285714286 (4.28571415,3.14285707) tEnd=0.492387914 other=4 otherT=0.571428571 otherIndex=1 windSum=1 windValue=1 oppValue=0
719debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0 (3,4) tEnd=0.317571165 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
720debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.317571165 (3.12682629,3.99743247) tEnd=0.333333333 other=1 otherT=0.521137715 otherIndex=3 windSum=? windValue=1 oppValue=0
721debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.333333333 (3.11111116,3.92592597) tEnd=0.580941393 other=4 otherT=0.962962963 otherIndex=2 windSum=-1 windValue=1 oppValue=0
722debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.580941393 (3.04567242,2.52283621) tEnd=1 other=2 otherT=0.492387914 otherIndex=2 windSum=-1 windValue=1 oppValue=0
723debugShowActiveSpans id=4 (6,2 3,4) t=0 (6,2) tEnd=0.571428571 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
724debugShowActiveSpans id=4 (6,2 3,4) t=0.571428571 (4.28571415,3.14285707) tEnd=0.962962963 other=2 otherT=0.285714286 otherIndex=1 windSum=? windValue=1 oppValue=0
725debugShowActiveSpans id=4 (6,2 3,4) t=0.962962963 (3.11111116,3.92592597) tEnd=1 other=3 otherT=0.333333333 otherIndex=3 windSum=? windValue=1 oppValue=0
726activeOp op=sect miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
727findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
728debugShowSort [1] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.333333333 tEnd=0.580941393 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
729debugShowSort [2] {{6,2}, {3,4}} tStart=0.962962963 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
730debugShowSort [3] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.333333333 tEnd=0.317571165 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
731debugShowSort [0] {{6,2}, {3,4}} tStart=0.962962963 tEnd=0.571428571 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
732findNextOp firstIndex=[1] sign=-1
733activeOp op=sect miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
734markWinding id=4 (6,2 3,4) t=0.962962963 [2] (3.11111116,3.92592597) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
735findNextOp chase.append id=4
736activeOp op=sect miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
737markWinding id=3 (3,4 4,6 1,0 6,2) t=0.317571165 [2] (3.12682629,3.99743247) tEnd=0.333333333 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
738findNextOp chase.append id=3
739activeOp op=sect miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
740markWinding id=4 (6,2 3,4) t=0.571428571 [1] (4.28571415,3.14285707) tEnd=0.962962963 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
741findNextOp chase.append id=4
742markDoneBinary id=3 (3,4 4,6 1,0 6,2) t=0.333333333 [3] (3.11111116,3.92592597) tEnd=0.580941393 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
743findNextOp from:[3] to:[4] start=2 end=3
744bridgeOp current id=3 from=(3.04567242,2.52283621) to=(3.11111116,3.92592597)
745path.moveTo(3.04567242,2.52283621);
746path.cubicTo(2.9460392,2.99209714, 3.02857494,3.54075789, 3.11111116,3.92592597);
747markUnsortable id=4 (6,2 3,4) t=0.962962963 [2] (3.11111116,3.92592597) tEnd=1 newWindSum=0 windSum=1 windValue=1
748markUnsortable id=1 (0,1 2,6 4,3 6,4) t=0.5 [2] (3,4) tEnd=0.521137715 newWindSum=0 windSum=? windValue=1
749markUnsortable id=1 (0,1 2,6 4,3 6,4) t=0.5 [1] (3,4) tEnd=0.5 newWindSum=0 windSum=? windValue=1
750markUnsortable id=3 (3,4 4,6 1,0 6,2) t=0 [1] (3,4) tEnd=0.317571165 newWindSum=0 windSum=? windValue=1
751findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1
752debugShowSort [0] {{6,2}, {3,4}} tStart=1 tEnd=0.962962963 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
753debugShowSort [1] {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.5 tEnd=0.521137715 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=1
754debugShowSort [2] *** UNSORTABLE *** {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.5 tEnd=0.5 sign=1 windValue=1 windSum=? 2->1 (max=2) done=1 tiny=1 opp=1
755debugShowSort [3] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0 tEnd=0.317571165 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
756markDoneBinary id=4 (6,2 3,4) t=0.962962963 [2] (3.11111116,3.92592597) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
757path.lineTo(3,4);
758debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.5 (3,4) tEnd=0.521137715 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
759debugShowActiveSpans id=1 (0,1 2,6 4,3 6,4) t=0.521137715 (3.12682629,3.99743247) tEnd=1 other=3 otherT=0.317571165 otherIndex=2 windSum=? windValue=1 oppValue=0
760debugShowActiveSpans id=2 (6,4 0,1) t=0 (6,4) tEnd=0.285714286 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
761debugShowActiveSpans id=2 (6,4 0,1) t=0.285714286 (4.28571415,3.14285707) tEnd=0.492387914 other=4 otherT=0.571428571 otherIndex=1 windSum=1 windValue=1 oppValue=0
762debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0 (3,4) tEnd=0.317571165 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
763debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.317571165 (3.12682629,3.99743247) tEnd=0.333333333 other=1 otherT=0.521137715 otherIndex=3 windSum=1 windValue=1 oppValue=0
764debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.580941393 (3.04567242,2.52283621) tEnd=1 other=2 otherT=0.492387914 otherIndex=2 windSum=-1 windValue=1 oppValue=0
765debugShowActiveSpans id=4 (6,2 3,4) t=0 (6,2) tEnd=0.571428571 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
766debugShowActiveSpans id=4 (6,2 3,4) t=0.571428571 (4.28571415,3.14285707) tEnd=0.962962963 other=2 otherT=0.285714286 otherIndex=1 windSum=-1 windValue=1 oppValue=0
767activeOp op=sect miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
768findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1
769debugShowSort [0] {{6,2}, {3,4}} tStart=0.962962963 tEnd=0.571428571 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
770debugShowSort [1] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.333333333 tEnd=0.580941393 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
771debugShowSort [2] {{6,2}, {3,4}} tStart=0.962962963 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
772debugShowSort [3] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.333333333 tEnd=0.317571165 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
773findNextOp firstIndex=[0] sign=1
774activeOp op=sect miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
775activeOp op=sect miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
776activeOp op=sect miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
777markDoneBinary id=4 (6,2 3,4) t=0.571428571 [1] (4.28571415,3.14285707) tEnd=0.962962963 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
778findNextOp from:[4] to:[3] start=3 end=2
779bridgeOp current id=4 from=(4.28571415,3.14285707) to=(3.11111116,3.92592597)
780findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=-1
781debugShowSort [1] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.317571165 tEnd=0.333333333 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
782debugShowSort [2] {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.521137715 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
783debugShowSort [3] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.317571165 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
784debugShowSort [0] {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.521137715 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
785findNextOp firstIndex=[1] sign=-1
786activeOp op=sect miFrom=1 miTo=0 suFrom=1 suTo=1 result=1
787markWinding id=1 (0,1 2,6 4,3 6,4) t=0.5 [2] (3,4) tEnd=0.521137715 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
788findNextOp chase.append id=1
789activeOp op=sect miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
790markDoneBinary id=3 (3,4 4,6 1,0 6,2) t=0 [0] (3,4) tEnd=0 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
791markDoneBinary id=3 (3,4 4,6 1,0 6,2) t=0 [1] (3,4) tEnd=0.317571165 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
792findNextOp chase.append id=3
793activeOp op=sect miFrom=0 miTo=1 suFrom=0 suTo=0 result=0
794markDoneBinary id=1 (0,1 2,6 4,3 6,4) t=0.521137715 [3] (3.12682629,3.99743247) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
795markDoneBinary id=2 (6,4 0,1) t=0 [0] (6,4) tEnd=0.285714286 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
796findNextOp chase.append id=2
797markDoneBinary id=3 (3,4 4,6 1,0 6,2) t=0.317571165 [2] (3.12682629,3.99743247) tEnd=0.333333333 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
798findNextOp from:[3] to:[1] start=3 end=2
799bridgeOp current id=3 from=(3.11111116,3.92592597) to=(3.12682629,3.99743247)
800path.moveTo(4.28571415,3.14285707);
801path.lineTo(3.11111116,3.92592597);
802path.cubicTo(3.11636519,3.9504447, 3.12161922,3.97430134, 3.12682629,3.99743247);
803setSpans unsortable [2] (3,4) [3] (3.12682629,3.99743247)
804setSpans unsortable [3] (3,4) [2] (3.11111116,3.92592597)
805markUnsortable id=1 (0,1 2,6 4,3 6,4) t=0.5 [2] (3,4) tEnd=0.521137715 newWindSum=0 windSum=1 windValue=1
806markUnsortable id=1 (0,1 2,6 4,3 6,4) t=0.5 [1] (3,4) tEnd=0.5 newWindSum=0 windSum=? windValue=1
807markUnsortable id=4 (6,2 3,4) t=0.962962963 [2] (3.11111116,3.92592597) tEnd=1 newWindSum=0 windSum=1 windValue=1
808findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=-1
809debugShowSort [0] *** UNSORTABLE *** {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.5 tEnd=0.521137715 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
810debugShowSort [1] *** UNSORTABLE *** {{0,1}, {2,6}, {4,3}, {6,4}} tStart=0.5 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=1 tiny=1 opp=0
811debugShowSort [2] *** UNSORTABLE *** {{6,2}, {3,4}} tStart=1 tEnd=0.962962963 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
812path.cubicTo(3.08455086,3.99910641, 3.04227543,4, 3,4);
813markDoneBinary id=1 (0,1 2,6 4,3 6,4) t=0.5 [2] (3,4) tEnd=0.521137715 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
814debugShowActiveSpans id=2 (6,4 0,1) t=0.285714286 (4.28571415,3.14285707) tEnd=0.492387914 other=4 otherT=0.571428571 otherIndex=1 windSum=1 windValue=1 oppValue=0
815debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.580941393 (3.04567242,2.52283621) tEnd=1 other=2 otherT=0.492387914 otherIndex=2 windSum=-1 windValue=1 oppValue=0
816debugShowActiveSpans id=4 (6,2 3,4) t=0 (6,2) tEnd=0.571428571 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
817activeOp op=sect miFrom=0 miTo=1 suFrom=1 suTo=1 result=1
818findNextOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1
819debugShowSort [3] {{6,4}, {0,1}} tStart=0.492387914 tEnd=0.285714286 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
820debugShowSort [0] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1
821debugShowSort [1] {{6,4}, {0,1}} tStart=0.492387914 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
822debugShowSort [2] {{3,4}, {4,6}, {1,0}, {6,2}} tStart=0.580941393 tEnd=0.333333333 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
823findNextOp firstIndex=[3] sign=1
824activeOp op=sect miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
825activeOp op=sect miFrom=0 miTo=1 suFrom=0 suTo=0 result=0
826activeOp op=sect miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
827markDoneBinary id=2 (6,4 0,1) t=0.285714286 [1] (4.28571415,3.14285707) tEnd=0.492387914 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
828findNextOp from:[2] to:[3] start=4 end=3
829bridgeOp current id=2 from=(4.28571415,3.14285707) to=(3.04567242,2.52283621)
830path.moveTo(4.28571415,3.14285707);
831path.lineTo(3.04567242,2.52283621);
832setSpans unsortable [1] (3,4) [2] (3.12682629,3.99743247)
833setSpans all tiny unsortable [1] (3,4) [0] (0,1)
834setSpans unsortable [3] (3,4) [2] (3.11111116,3.92592597)
835setSpans unsortable [2] (3,4) [3] (3.12682629,3.99743247)
836setSpans unsortable [1] (3,4) [2] (3.12682629,3.99743247)
837setSpans unsortable [3] (3,4) [2] (3.11111116,3.92592597)
838setSpans unsortable [3] (3,4) [2] (3.11111116,3.92592597)
839setSpans unsortable [2] (3,4) [3] (3.12682629,3.99743247)
840setSpans unsortable [1] (3,4) [2] (3.12682629,3.99743247)
841debugShowActiveSpans id=3 (3,4 4,6 1,0 6,2) t=0.580941393 (3.04567242,2.52283621) tEnd=1 other=2 otherT=0.492387914 otherIndex=2 windSum=-1 windValue=1 oppValue=0
842debugShowActiveSpans id=4 (6,2 3,4) t=0 (6,2) tEnd=0.571428571 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
843activeOp op=sect miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
844markDoneBinary id=3 (3,4 4,6 1,0 6,2) t=0.580941393 [4] (3.04567242,2.52283621) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
845markDoneBinary id=4 (6,2 3,4) t=0 [0] (6,2) tEnd=0.571428571 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
846</div>
847
848<div id="cubicOp42d">
849 SimplifyNew_Test [cubicOp42d]
850{{0,1}, {1,2}, {6,5}, {5,4}},
851{{5,4}, {0,1}},
852op difference
853{{5,6}, {4,5}, {1,0}, {2,1}},
854{{2,1}, {5,6}},
855debugShowCubicIntersection no self intersect {{5,6}, {4,5}, {1,0}, {2,1}}
856debugShowCubicLineIntersection wtTs[0]=0 {{5,6}, {4,5}, {1,0}, {2,1}} {{5,6}} wtTs[1]=1 {{2,1}} wnTs[0]=1 {{2,1}, {5,6}} wnTs[1]=0
857debugShowCubicIntersection no intersect {{5,6}, {4,5}, {1,0}, {2,1}} {{0,1}, {1,2}, {6,5}, {5,4}}
858debugShowCubicLineIntersection wtTs[0]=0.520955385 {{5,6}, {4,5}, {1,0}, {2,1}} {{2.6570733652881806,2.5942440191729084}} wnTs[0]=0.468585 {{5,4}, {0,1}}
859debugShowCubicLineIntersection wtTs[0]=0.520955385 {{0,1}, {1,2}, {6,5}, {5,4}} {{3.4057559808270916,3.3429266347118194}} wnTs[0]=0.468585 {{2,1}, {5,6}}
860debugShowLineIntersection wtTs[0]=0.375 {{2,1}, {5,6}} {{3.125,2.875}} wnTs[0]=0.375 {{5,4}, {0,1}}
861debugShowCubicIntersection no self intersect {{0,1}, {1,2}, {6,5}, {5,4}}
862debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {1,2}, {6,5}, {5,4}} {{0,1}} wtTs[1]=1 {{5,4}} wnTs[0]=1 {{5,4}, {0,1}} wnTs[1]=0
863debugShowActiveSpans id=3 (5,6 4,5 1,0 2,1) t=0 (5,6) tEnd=0.520955385 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
864debugShowActiveSpans id=3 (5,6 4,5 1,0 2,1) t=0.520955385 (2.65707326,2.594244) tEnd=1 other=2 otherT=0.468585327 otherIndex=2 windSum=? windValue=1 oppValue=0
865debugShowActiveSpans id=4 (2,1 5,6) t=0 (2,1) tEnd=0.375 other=3 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
866debugShowActiveSpans id=4 (2,1 5,6) t=0.375 (3.125,2.875) tEnd=0.468585327 other=2 otherT=0.375 otherIndex=1 windSum=? windValue=1 oppValue=0
867debugShowActiveSpans id=4 (2,1 5,6) t=0.468585327 (3.405756,3.34292674) tEnd=1 other=1 otherT=0.520955385 otherIndex=1 windSum=? windValue=1 oppValue=0
868debugShowActiveSpans id=1 (0,1 1,2 6,5 5,4) t=0 (0,1) tEnd=0.520955385 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
869debugShowActiveSpans id=1 (0,1 1,2 6,5 5,4) t=0.520955385 (3.405756,3.34292674) tEnd=1 other=4 otherT=0.468585327 otherIndex=2 windSum=? windValue=1 oppValue=0
870debugShowActiveSpans id=2 (5,4 0,1) t=0 (5,4) tEnd=0.375 other=1 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
871debugShowActiveSpans id=2 (5,4 0,1) t=0.375 (3.125,2.875) tEnd=0.468585327 other=4 otherT=0.375 otherIndex=1 windSum=? windValue=1 oppValue=0
872debugShowActiveSpans id=2 (5,4 0,1) t=0.468585327 (2.65707326,2.594244) tEnd=1 other=3 otherT=0.520955385 otherIndex=1 windSum=? windValue=1 oppValue=0
873findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
874debugShowSort [0] {{0,1}, {1,2}, {6,5}, {5,4}} tStart=0 tEnd=0.520955385 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
875debugShowSort [1] {{5,4}, {0,1}} tStart=1 tEnd=0.468585327 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
876findTop xyE=(0,1) xyS=(3.405756,3.34292674)
877findTop dxyE=(3,3) dxyS=(7.361094,4.36636353) cross=-8.98419189 bumpsUp=false
878markWinding id=1 (0,1 1,2 6,5 5,4) t=0 [0] (0,1) tEnd=0.520955385 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
879markWinding id=2 (5,4 0,1) t=0.468585327 [2] (2.65707326,2.594244) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
880markWinding id=1 (0,1 1,2 6,5 5,4) t=0 [0] (0,1) tEnd=0.520955385 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
881activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
882findNextOp simple
883markDoneBinary id=1 (0,1 1,2 6,5 5,4) t=0 [0] (0,1) tEnd=0.520955385 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
884bridgeOp current id=1 from=(3.405756,3.34292674) to=(0,1)
885path.moveTo(3.405756,3.34292674);
886path.cubicTo(2.12748885,2.58469963, 0.520955384,1.52095544, 0,1);
887findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
888debugShowSort [1] {{5,4}, {0,1}} tStart=0.468585327 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
889debugShowSort [2] {{5,6}, {4,5}, {1,0}, {2,1}} tStart=0.520955385 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
890debugShowSort [3] {{5,4}, {0,1}} tStart=0.468585327 tEnd=0.375 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
891debugShowSort [0] {{5,6}, {4,5}, {1,0}, {2,1}} tStart=0.520955385 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
892findNextOp firstIndex=[1] sign=-1
893activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
894markWinding id=3 (5,6 4,5 1,0 2,1) t=0 [0] (5,6) tEnd=0.520955385 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
895markWinding id=4 (2,1 5,6) t=0.468585327 [2] (3.405756,3.34292674) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
896findNextOp chase.append id=4
897activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
898markDoneBinary id=2 (5,4 0,1) t=0.375 [1] (3.125,2.875) tEnd=0.468585327 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
899findNextOp chase.append id=2
900activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
901markDoneBinary id=3 (5,6 4,5 1,0 2,1) t=0.520955385 [1] (2.65707326,2.594244) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
902markDoneBinary id=4 (2,1 5,6) t=0 [0] (2,1) tEnd=0.375 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
903findNextOp chase.append id=4
904markDoneBinary id=2 (5,4 0,1) t=0.468585327 [2] (2.65707326,2.594244) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
905findNextOp from:[2] to:[3] start=1 end=0
906bridgeOp current id=2 from=(0,1) to=(2.65707326,2.594244)
907findNextOp simple
908markDoneBinary id=3 (5,6 4,5 1,0 2,1) t=0 [0] (5,6) tEnd=0.520955385 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
909bridgeOp current id=3 from=(2.65707326,2.594244) to=(5,6)
910path.lineTo(2.65707326,2.594244);
911path.cubicTo(3.41530037,3.87251115, 4.47904444,5.47904444, 5,6);
912findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
913debugShowSort [2] {{2,1}, {5,6}} tStart=0.468585327 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
914debugShowSort [3] {{0,1}, {1,2}, {6,5}, {5,4}} tStart=0.520955385 tEnd=1 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=1
915debugShowSort [0] {{2,1}, {5,6}} tStart=0.468585327 tEnd=0.375 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
916debugShowSort [1] {{0,1}, {1,2}, {6,5}, {5,4}} tStart=0.520955385 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1
917findNextOp firstIndex=[2] sign=-1
918activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
919markDoneBinary id=1 (0,1 1,2 6,5 5,4) t=0.520955385 [1] (3.405756,3.34292674) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
920markDoneBinary id=2 (5,4 0,1) t=0 [0] (5,4) tEnd=0.375 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
921findNextOp chase.append id=2
922activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
923markWinding id=4 (2,1 5,6) t=0.375 [1] (3.125,2.875) tEnd=0.468585327 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1
924findNextOp chase.append id=4
925activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
926markDoneBinary id=4 (2,1 5,6) t=0.468585327 [2] (3.405756,3.34292674) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
927findNextOp from:[4] to:[4] start=2 end=1
928bridgeOp current id=4 from=(5,6) to=(3.405756,3.34292674)
929path.lineTo(3.405756,3.34292674);
930path.close();
931debugShowActiveSpans id=4 (2,1 5,6) t=0.375 (3.125,2.875) tEnd=0.468585327 other=2 otherT=0.375 otherIndex=1 windSum=-1 windValue=1 oppValue=0
932activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
933findNextOp debugShowSort contourWinding=0 oppContourWinding=2 sign=1
934debugShowSort [0] {{2,1}, {5,6}} tStart=0.468585327 tEnd=0.375 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
935debugShowSort [1] {{0,1}, {1,2}, {6,5}, {5,4}} tStart=0.520955385 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1
936debugShowSort [2] {{2,1}, {5,6}} tStart=0.468585327 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
937debugShowSort [3] {{0,1}, {1,2}, {6,5}, {5,4}} tStart=0.520955385 tEnd=1 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=1
938findNextOp firstIndex=[0] sign=1
939activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
940activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
941activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
942markDoneBinary id=4 (2,1 5,6) t=0.375 [1] (3.125,2.875) tEnd=0.468585327 newWindSum=-1 newOppSum=2 oppSum=2 windSum=-1 windValue=1
943findNextOp from:[4] to:[4] start=2 end=3
944bridgeOp current id=4 from=(3.125,2.875) to=(3.405756,3.34292674)
945</div>
946
947<div id="cubicOp42da">
948computed quadratics given
949 {{0,1}, {1,2}, {6,5}, {5,4}},
950 {{5,6}, {4,5}, {1,0}, {2,1}},
951computed quadratics set 1
952 {{0,1}, {0.4140625,1.3984375}, {1.34375,2.03125}},
953 {{1.34375,2.03125}, {2.2734375,2.6640625}, {3.25,3.25}},
954 {{3.25,3.25}, {4.2265625,3.8359375}, {4.78125,4.09375}},
955 {{4.78125,4.09375}, {5.3359375,4.3515625}, {5,4}},
956computed quadratics set 2
957 {{5,6}, {4.6015625,5.5859375}, {3.96875,4.65625}},
958 {{3.96875,4.65625}, {3.3359375,3.7265625}, {2.75,2.75}},
959 {{2.75,2.75}, {2.1640625,1.7734375}, {1.90625,1.21875}},
960 {{1.90625,1.21875}, {1.6484375,0.6640625}, {2,1}},
961</div>
962
963<div id="cubicOp42db">
964 {{1.34375,2.03125}, {2.2734375,2.6640625}, {3.25,3.25}},
965 {{3.96875,4.65625}, {3.3359375,3.7265625}, {2.75,2.75}},
966</div>
967
968<div id="cubicOp43d">
969 SimplifyNew_Test [cubicOp43d]
970{{0,2}, {1,2}, {4,0}, {3,1}},
971{{3,1}, {0,2}},
972op difference
973{{0,4}, {1,3}, {2,0}, {2,1}},
974{{2,1}, {0,4}},
975debugShowCubicIntersection no self intersect {{0,2}, {1,2}, {4,0}, {3,1}}
976debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {1,2}, {4,0}, {3,1}} {{0,2}} wtTs[1]=0.333333333 {{1.4444444444444446,1.5185185185185186}} wtTs[2]=1 {{3,1}} wnTs[0]=1 {{3,1}, {0,2}} wnTs[1]=0.518518519 wnTs[2]=0
977debugShowCubicIntersection wtTs[0]=0.345547542 {{0,2}, {1,2}, {4,0}, {3,1}} {{1.5055045552472988,1.4898786220870244}} wnTs[0]=0.560544 {{0,4}, {1,3}, {2,0}, {2,1}}
978debugShowCubicLineIntersection wtTs[0]=0.395188999 {{0,2}, {1,2}, {4,0}, {3,1}} {{1.7523027701818603,1.3715458447272095}} wnTs[0]=0.123849 {{2,1}, {0,4}}
979debugShowCubicLineIntersection wtTs[0]=0.558102564 {{0,4}, {1,3}, {2,0}, {2,1}} {{1.5004707573680853,1.4998430808773049}} wnTs[0]=0.499843 {{3,1}, {0,2}}
980debugShowLineIntersection wtTs[0]=0.428571429 {{3,1}, {0,2}} {{1.7142857142857142,1.4285714285714284}} wnTs[0]=0.142857 {{2,1}, {0,4}}
981debugShowCubicIntersection no self intersect {{0,4}, {1,3}, {2,0}, {2,1}}
982debugShowCubicLineIntersection wtTs[0]=0 {{0,4}, {1,3}, {2,0}, {2,1}} {{0,4}} wtTs[1]=0.333333333 {{0.96296296296296258,2.5555555555555562}} wtTs[2]=1 {{2,1}} wnTs[0]=1 {{2,1}, {0,4}} wnTs[1]=0.518518519 wnTs[2]=0
983debugShowActiveSpans id=1 (0,2 1,2 4,0 3,1) t=0 (0,2) tEnd=0.333333333 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
984debugShowActiveSpans id=1 (0,2 1,2 4,0 3,1) t=0.333333333 (1.44444442,1.51851857) tEnd=0.345547542 other=2 otherT=0.518518519 otherIndex=3 windSum=? windValue=1 oppValue=0
985debugShowActiveSpans id=1 (0,2 1,2 4,0 3,1) t=0.345547542 (1.50550461,1.48987865) tEnd=0.395188999 other=3 otherT=0.560544414 otherIndex=3 windSum=? windValue=1 oppValue=0
986debugShowActiveSpans id=1 (0,2 1,2 4,0 3,1) t=0.395188999 (1.75230277,1.37154579) tEnd=1 other=4 otherT=0.123848615 otherIndex=1 windSum=? windValue=1 oppValue=0
987debugShowActiveSpans id=2 (3,1 0,2) t=0 (3,1) tEnd=0.428571429 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
988debugShowActiveSpans id=2 (3,1 0,2) t=0.428571429 (1.71428573,1.42857146) tEnd=0.499843081 other=4 otherT=0.142857143 otherIndex=2 windSum=? windValue=1 oppValue=0
989debugShowActiveSpans id=2 (3,1 0,2) t=0.499843081 (1.50047076,1.49984312) tEnd=0.518518519 other=3 otherT=0.558102564 otherIndex=2 windSum=? windValue=1 oppValue=0
990debugShowActiveSpans id=2 (3,1 0,2) t=0.518518519 (1.44444442,1.51851857) tEnd=1 other=1 otherT=0.333333333 otherIndex=1 windSum=? windValue=1 oppValue=0
991debugShowActiveSpans id=3 (0,4 1,3 2,0 2,1) t=0 (0,4) tEnd=0.333333333 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
992debugShowActiveSpans id=3 (0,4 1,3 2,0 2,1) t=0.333333333 (0.962962985,2.55555558) tEnd=0.558102564 other=4 otherT=0.518518519 otherIndex=3 windSum=? windValue=1 oppValue=0
993debugShowActiveSpans id=3 (0,4 1,3 2,0 2,1) t=0.558102564 (1.50047076,1.49984312) tEnd=0.560544414 other=2 otherT=0.499843081 otherIndex=2 windSum=? windValue=1 oppValue=0
994debugShowActiveSpans id=3 (0,4 1,3 2,0 2,1) t=0.560544414 (1.50550461,1.48987865) tEnd=1 other=1 otherT=0.345547542 otherIndex=2 windSum=? windValue=1 oppValue=0
995debugShowActiveSpans id=4 (2,1 0,4) t=0 (2,1) tEnd=0.123848615 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
996debugShowActiveSpans id=4 (2,1 0,4) t=0.123848615 (1.75230277,1.37154579) tEnd=0.142857143 other=1 otherT=0.395188999 otherIndex=3 windSum=? windValue=1 oppValue=0
997debugShowActiveSpans id=4 (2,1 0,4) t=0.142857143 (1.71428573,1.42857146) tEnd=0.518518519 other=2 otherT=0.428571429 otherIndex=1 windSum=? windValue=1 oppValue=0
998debugShowActiveSpans id=4 (2,1 0,4) t=0.518518519 (0.962962985,2.55555558) tEnd=1 other=3 otherT=0.333333333 otherIndex=1 windSum=? windValue=1 oppValue=0
999findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
1000debugShowSort [0] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=1 tEnd=0.395188999 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1001debugShowSort [1] {{3,1}, {0,2}} tStart=0 tEnd=0.428571429 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
1002findTop xyE=(3,1) xyS=(1.75230277,1.37154579)
1003findTop dxyE=(-3,3) dxyS=(4.93112993,-2.39965272) cross=-7.59443188 bumpsUp=true
1004findTop cross bump disagree
1005findTop swap
1006markWinding id=1 (0,2 1,2 4,0 3,1) t=0.395188999 [3] (1.75230277,1.37154579) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1007markWinding id=1 (0,2 1,2 4,0 3,1) t=0.395188999 [3] (1.75230277,1.37154579) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1008markWinding id=2 (3,1 0,2) t=0 [0] (3,1) tEnd=0.428571429 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1009activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
1010findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
1011debugShowSort [0] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.395188999 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
1012debugShowSort [1] {{2,1}, {0,4}} tStart=0.123848615 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
1013debugShowSort [2] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.395188999 tEnd=0.345547542 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
1014debugShowSort [3] {{2,1}, {0,4}} tStart=0.123848615 tEnd=0.142857143 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
1015findNextOp firstIndex=[0] sign=-1
1016activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1017markWinding id=4 (2,1 0,4) t=0 [0] (2,1) tEnd=0.123848615 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1018markWinding id=3 (0,4 1,3 2,0 2,1) t=0.560544414 [3] (1.50550461,1.48987865) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1019findNextOp chase.append id=3
1020activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
1021markDoneBinary id=1 (0,2 1,2 4,0 3,1) t=0.345547542 [2] (1.50550461,1.48987865) tEnd=0.395188999 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1022findNextOp chase.append id=1
1023activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1024markDoneBinary id=4 (2,1 0,4) t=0.123848615 [1] (1.75230277,1.37154579) tEnd=0.142857143 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1025findNextOp chase.append id=4
1026markDoneBinary id=1 (0,2 1,2 4,0 3,1) t=0.395188999 [3] (1.75230277,1.37154579) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1027findNextOp from:[1] to:[4] start=1 end=0
1028bridgeOp current id=1 from=(3,1) to=(1.75230277,1.37154579)
1029path.moveTo(3,1);
1030path.cubicTo(3.60481095,0.395188987, 2.7464366,0.887767076, 1.75230277,1.37154579);
1031findNextOp simple
1032markDoneBinary id=4 (2,1 0,4) t=0 [0] (2,1) tEnd=0.123848615 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1033bridgeOp current id=4 from=(1.75230277,1.37154579) to=(2,1)
1034findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
1035debugShowSort [1] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.560544414 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1036debugShowSort [2] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.345547542 tEnd=0.333333333 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
1037debugShowSort [3] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.560544414 tEnd=0.558102564 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1038debugShowSort [0] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.345547542 tEnd=0.395188999 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
1039findNextOp firstIndex=[1] sign=-1
1040activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
1041markWinding id=1 (0,2 1,2 4,0 3,1) t=0.333333333 [1] (1.44444442,1.51851857) tEnd=0.345547542 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1042findNextOp chase.append id=1
1043activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
1044markDoneBinary id=3 (0,4 1,3 2,0 2,1) t=0.558102564 [2] (1.50047076,1.49984312) tEnd=0.560544414 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1045findNextOp chase.append id=3
1046activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1047markDoneBinary id=3 (0,4 1,3 2,0 2,1) t=0.560544414 [3] (1.50550461,1.48987865) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1048findNextOp from:[3] to:[1] start=2 end=1
1049bridgeOp current id=3 from=(2,1) to=(1.50550461,1.48987865)
1050path.lineTo(2,1);
1051path.cubicTo(2,0.560544431, 1.80687881,0.893573642, 1.50550461,1.48987865);
1052findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
1053debugShowSort [1] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.333333333 tEnd=0.345547542 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
1054debugShowSort [2] {{3,1}, {0,2}} tStart=0.518518519 tEnd=1 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=0
1055debugShowSort [3] {{0,2}, {1,2}, {4,0}, {3,1}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0
1056debugShowSort [0] {{3,1}, {0,2}} tStart=0.518518519 tEnd=0.499843081 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
1057findNextOp firstIndex=[1] sign=-1
1058activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1059markDoneBinary id=2 (3,1 0,2) t=0.518518519 [3] (1.44444442,1.51851857) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
1060markDoneBinary id=1 (0,2 1,2 4,0 3,1) t=0 [0] (0,2) tEnd=0.333333333 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
1061findNextOp chase.append id=1
1062activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1063activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
1064markWinding id=2 (3,1 0,2) t=0.499843081 [2] (1.50047076,1.49984312) tEnd=0.518518519 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1065findNextOp chase.append id=2
1066markDoneBinary id=1 (0,2 1,2 4,0 3,1) t=0.333333333 [1] (1.44444442,1.51851857) tEnd=0.345547542 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1067findNextOp from:[1] to:[2] start=3 end=2
1068bridgeOp current id=1 from=(1.50550461,1.48987865) to=(1.44444442,1.51851857)
1069path.cubicTo(1.48515844,1.49946892, 1.46480155,1.50901854, 1.44444442,1.51851857);
1070findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
1071debugShowSort [2] {{3,1}, {0,2}} tStart=0.499843081 tEnd=0.518518519 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
1072debugShowSort [3] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.558102564 tEnd=0.333333333 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
1073debugShowSort [0] {{3,1}, {0,2}} tStart=0.499843081 tEnd=0.428571429 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
1074debugShowSort [1] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.558102564 tEnd=0.560544414 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
1075findNextOp firstIndex=[2] sign=-1
1076activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1077markWinding id=3 (0,4 1,3 2,0 2,1) t=0.333333333 [1] (0.962962985,2.55555558) tEnd=0.558102564 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1078findNextOp chase.append id=3
1079activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
1080markDoneBinary id=2 (3,1 0,2) t=0.428571429 [1] (1.71428573,1.42857146) tEnd=0.499843081 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1081findNextOp chase.append id=2
1082activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1083markDoneBinary id=2 (3,1 0,2) t=0.499843081 [2] (1.50047076,1.49984312) tEnd=0.518518519 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1084findNextOp from:[2] to:[3] start=2 end=1
1085bridgeOp current id=2 from=(1.44444442,1.51851857) to=(1.50047076,1.49984312)
1086findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
1087debugShowSort [1] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.333333333 tEnd=0.558102564 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1088debugShowSort [2] {{2,1}, {0,4}} tStart=0.518518519 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
1089debugShowSort [3] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
1090debugShowSort [0] {{2,1}, {0,4}} tStart=0.518518519 tEnd=0.142857143 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1091findNextOp firstIndex=[1] sign=-1
1092activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1093markWinding id=4 (2,1 0,4) t=0.518518519 [3] (0.962962985,2.55555558) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
1094markWinding id=3 (0,4 1,3 2,0 2,1) t=0 [0] (0,4) tEnd=0.333333333 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
1095findNextOp chase.append id=3
1096activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1097activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1098markWinding id=4 (2,1 0,4) t=0.142857143 [2] (1.71428573,1.42857146) tEnd=0.518518519 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1099findNextOp chase.append id=4
1100markDoneBinary id=3 (0,4 1,3 2,0 2,1) t=0.333333333 [1] (0.962962985,2.55555558) tEnd=0.558102564 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1101findNextOp from:[3] to:[4] start=3 end=4
1102bridgeOp current id=3 from=(1.50047076,1.49984312) to=(0.962962985,2.55555558)
1103path.lineTo(1.50047076,1.49984312);
1104path.cubicTo(1.3457123,1.80632472, 1.16275787,2.18094015, 0.962962985,2.55555558);
1105findNextOp simple
1106markDoneBinary id=4 (2,1 0,4) t=0.518518519 [3] (0.962962985,2.55555558) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
1107bridgeOp current id=4 from=(0.962962985,2.55555558) to=(0,4)
1108findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1
1109debugShowSort [3] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
1110debugShowSort [0] {{2,1}, {0,4}} tStart=0.518518519 tEnd=0.142857143 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1111debugShowSort [1] {{0,4}, {1,3}, {2,0}, {2,1}} tStart=0.333333333 tEnd=0.558102564 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
1112debugShowSort [2] {{2,1}, {0,4}} tStart=0.518518519 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
1113findNextOp firstIndex=[3] sign=1
1114activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1115activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1116activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1117markDoneBinary id=3 (0,4 1,3 2,0 2,1) t=0 [0] (0,4) tEnd=0.333333333 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
1118findNextOp from:[3] to:[4] start=3 end=2
1119bridgeOp current id=3 from=(0,4) to=(0.962962985,2.55555558)
1120path.lineTo(0,4);
1121path.cubicTo(0.333333343,3.66666675, 0.666666627,3.11111116, 0.962962985,2.55555558);
1122findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
1123debugShowSort [3] {{2,1}, {0,4}} tStart=0.142857143 tEnd=0.518518519 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1124debugShowSort [0] {{3,1}, {0,2}} tStart=0.428571429 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=1
1125debugShowSort [1] {{2,1}, {0,4}} tStart=0.142857143 tEnd=0.123848615 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
1126debugShowSort [2] {{3,1}, {0,2}} tStart=0.428571429 tEnd=0.499843081 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
1127findNextOp firstIndex=[3] sign=-1
1128activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
1129activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
1130activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1131markDoneBinary id=4 (2,1 0,4) t=0.142857143 [2] (1.71428573,1.42857146) tEnd=0.518518519 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1132findNextOp from:[4] to:[2] start=1 end=0
1133bridgeOp current id=4 from=(0.962962985,2.55555558) to=(1.71428573,1.42857146)
1134findNextOp simple
1135markDoneBinary id=2 (3,1 0,2) t=0 [0] (3,1) tEnd=0.428571429 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1136bridgeOp current id=2 from=(1.71428573,1.42857146) to=(3,1)
1137path.lineTo(1.71428573,1.42857146);
1138path.lineTo(3,1);
1139path.close();
1140assemble
1141assemble contour start=(3,1) end=(3,1)
1142</div>
1143
1144<div id="cubicOp44d">
1145 SimplifyNew_Test [cubicOp44d]
1146{{0,2}, {3,6}, {4,0}, {3,2}},
1147{{3,2}, {0,2}},
1148op difference
1149{{0,4}, {2,3}, {2,0}, {6,3}},
1150{{6,3}, {0,4}},
1151debugShowCubicIntersection no self intersect {{0,2}, {3,6}, {4,0}, {3,2}}
1152debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {3,6}, {4,0}, {3,2}} {{0,2}} wtTs[1]=1 {{3,2}} wnTs[0]=1 {{3,2}, {0,2}} wnTs[1]=0
1153debugShowCubicIntersection wtTs[0]=0.135342164 {{0,2}, {3,6}, {4,0}, {3,2}} {{1.1081744689414279,3.1192052729330815}} wtTs[1]=0.754165096 {{3.3748959118747366,1.708000079031383}} wtTs[2]=0.93333707 {{3.1733251116708114,1.7013446943452044}} wnTs[0]=0.223477 {{0,4}, {2,3}, {2,0}, {6,3}} wnTs[1]=0.708782366 wnTs[2]=0.67692927
1154debugShowCubicLineIntersection no intersect {{0,2}, {3,6}, {4,0}, {3,2}} {{6,3}, {0,4}}
1155debugShowCubicLineIntersection wtTs[0]=0.5 {{0,4}, {2,3}, {2,0}, {6,3}} {{2.25,2}} wnTs[0]=0.25 {{3,2}, {0,2}}
1156debugShowCubicIntersection no self intersect {{0,4}, {2,3}, {2,0}, {6,3}}
1157debugShowCubicLineIntersection wtTs[0]=0 {{0,4}, {2,3}, {2,0}, {6,3}} {{0,4}} wtTs[1]=1 {{6,3}} wnTs[0]=1 {{6,3}, {0,4}} wnTs[1]=0
1158debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0 (0,2) tEnd=0.135342164 other=2 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
1159debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.135342164 (1.10817444,3.11920524) tEnd=0.754165096 other=3 otherT=0.223476766 otherIndex=1 windSum=? windValue=1 oppValue=0
1160debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.754165096 (3.37489581,1.70800006) tEnd=0.93333707 other=3 otherT=0.708782366 otherIndex=4 windSum=? windValue=1 oppValue=0
1161debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.93333707 (3.17332506,1.70134473) tEnd=1 other=3 otherT=0.67692927 otherIndex=3 windSum=? windValue=1 oppValue=0
1162debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.25 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
1163debugShowActiveSpans id=2 (3,2 0,2) t=0.25 (2.25,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
1164debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0 (0,4) tEnd=0.223476766 other=4 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0
1165debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.223476766 (1.10817444,3.11920524) tEnd=0.5 other=1 otherT=0.135342164 otherIndex=1 windSum=? windValue=1 oppValue=0
1166debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.5 (2.25,2) tEnd=0.67692927 other=2 otherT=0.25 otherIndex=1 windSum=? windValue=1 oppValue=0
1167debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.67692927 (3.17332506,1.70134473) tEnd=0.708782366 other=1 otherT=0.93333707 otherIndex=3 windSum=? windValue=1 oppValue=0
1168debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.708782366 (3.37489581,1.70800006) tEnd=1 other=1 otherT=0.754165096 otherIndex=2 windSum=? windValue=1 oppValue=0
1169debugShowActiveSpans id=4 (6,3 0,4) t=0 (6,3) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
1170findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
1171debugShowSort [0] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.67692927 tEnd=0.708782366 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
1172debugShowSort [1] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.93333707 tEnd=0.754165096 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
1173debugShowSort [2] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.67692927 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
1174debugShowSort [3] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.93333707 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
1175findTop swap
1176markWinding id=3 (0,4 2,3 2,0 6,3) t=0.67692927 [3] (3.17332506,1.70134473) tEnd=0.708782366 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1177markWinding id=3 (0,4 2,3 2,0 6,3) t=0.67692927 [3] (3.17332506,1.70134473) tEnd=0.708782366 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
1178activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1179markDoneBinary id=3 (0,4 2,3 2,0 6,3) t=0.67692927 [3] (3.17332506,1.70134473) tEnd=0.708782366 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
1180findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1
1181debugShowSort [0] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.93333707 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
1182debugShowSort [1] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=0.67692927 sign=1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1
1183debugShowSort [2] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.135342164 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
1184debugShowSort [3] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
1185findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
1186debugShowSort [1] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=0.67692927 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
1187debugShowSort [2] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.135342164 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
1188debugShowSort [3] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
1189debugShowSort [0] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.93333707 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
1190markWinding id=1 (0,2 3,6 4,0 3,2) t=0.135342164 [1] (1.10817444,3.11920524) tEnd=0.754165096 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
1191markWinding id=3 (0,4 2,3 2,0 6,3) t=0.708782366 [4] (3.37489581,1.70800006) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
1192markWinding id=4 (6,3 0,4) t=0 [0] (6,3) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
1193markWinding id=3 (0,4 2,3 2,0 6,3) t=0 [0] (0,4) tEnd=0.223476766 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
1194markWinding id=1 (0,2 3,6 4,0 3,2) t=0.754165096 [2] (3.37489581,1.70800006) tEnd=0.93333707 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1195debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0 (0,2) tEnd=0.135342164 other=2 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
1196debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.135342164 (1.10817444,3.11920524) tEnd=0.754165096 other=3 otherT=0.223476766 otherIndex=1 windSum=-1 windValue=1 oppValue=0
1197debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.754165096 (3.37489581,1.70800006) tEnd=0.93333707 other=3 otherT=0.708782366 otherIndex=4 windSum=-1 windValue=1 oppValue=0
1198debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.93333707 (3.17332506,1.70134473) tEnd=1 other=3 otherT=0.67692927 otherIndex=3 windSum=? windValue=1 oppValue=0
1199debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.25 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
1200debugShowActiveSpans id=2 (3,2 0,2) t=0.25 (2.25,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
1201debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0 (0,4) tEnd=0.223476766 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0
1202debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.223476766 (1.10817444,3.11920524) tEnd=0.5 other=1 otherT=0.135342164 otherIndex=1 windSum=? windValue=1 oppValue=0
1203debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.5 (2.25,2) tEnd=0.67692927 other=2 otherT=0.25 otherIndex=1 windSum=? windValue=1 oppValue=0
1204debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.708782366 (3.37489581,1.70800006) tEnd=1 other=1 otherT=0.754165096 otherIndex=2 windSum=-1 windValue=1 oppValue=0
1205debugShowActiveSpans id=4 (6,3 0,4) t=0 (6,3) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
1206activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1207markDoneBinary id=1 (0,2 3,6 4,0 3,2) t=0.135342164 [1] (1.10817444,3.11920524) tEnd=0.754165096 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
1208debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0 (0,2) tEnd=0.135342164 other=2 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
1209debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.754165096 (3.37489581,1.70800006) tEnd=0.93333707 other=3 otherT=0.708782366 otherIndex=4 windSum=-1 windValue=1 oppValue=0
1210debugShowActiveSpans id=1 (0,2 3,6 4,0 3,2) t=0.93333707 (3.17332506,1.70134473) tEnd=1 other=3 otherT=0.67692927 otherIndex=3 windSum=? windValue=1 oppValue=0
1211debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.25 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
1212debugShowActiveSpans id=2 (3,2 0,2) t=0.25 (2.25,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
1213debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0 (0,4) tEnd=0.223476766 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0
1214debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.223476766 (1.10817444,3.11920524) tEnd=0.5 other=1 otherT=0.135342164 otherIndex=1 windSum=? windValue=1 oppValue=0
1215debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.5 (2.25,2) tEnd=0.67692927 other=2 otherT=0.25 otherIndex=1 windSum=? windValue=1 oppValue=0
1216debugShowActiveSpans id=3 (0,4 2,3 2,0 6,3) t=0.708782366 (3.37489581,1.70800006) tEnd=1 other=1 otherT=0.754165096 otherIndex=2 windSum=-1 windValue=1 oppValue=0
1217debugShowActiveSpans id=4 (6,3 0,4) t=0 (6,3) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
1218activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1219findNextOp simple
1220markDoneBinary id=3 (0,4 2,3 2,0 6,3) t=0 [0] (0,4) tEnd=0.223476766 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
1221bridgeOp current id=3 from=(1.10817444,3.11920524) to=(0,4)
1222path.moveTo(1.10817444,3.11920524);
1223path.cubicTo(0.794023395,3.45316267, 0.446953505,3.77652311, 0,4);
1224findNextOp simple
1225markDoneBinary id=4 (6,3 0,4) t=0 [0] (6,3) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
1226bridgeOp current id=4 from=(0,4) to=(6,3)
1227findNextOp debugShowSort contourWinding=-1 oppContourWinding=-1 sign=-1
1228debugShowSort [3] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1229debugShowSort [0] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.93333707 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1
1230debugShowSort [1] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.708782366 tEnd=0.67692927 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
1231debugShowSort [2] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.754165096 tEnd=0.135342164 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
1232findNextOp firstIndex=[3] sign=-1
1233activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
1234activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
1235activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1236markDoneBinary id=3 (0,4 2,3 2,0 6,3) t=0.708782366 [4] (3.37489581,1.70800006) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
1237findNextOp from:[3] to:[1] start=2 end=3
1238bridgeOp current id=3 from=(6,3) to=(3.37489581,1.70800006)
1239path.lineTo(6,3);
1240path.cubicTo(4.83512926,2.12634706, 4.00949001,1.76154041, 3.37489581,1.70800006);
1241findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
1242debugShowSort [1] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.93333707 tEnd=0.754165096 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1243debugShowSort [2] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.67692927 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
1244debugShowSort [3] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.93333707 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
1245debugShowSort [0] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.67692927 tEnd=0.708782366 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
1246findNextOp firstIndex=[1] sign=1
1247activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1248markWinding id=3 (0,4 2,3 2,0 6,3) t=0.5 [2] (2.25,2) tEnd=0.67692927 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
1249findNextOp chase.append id=3
1250activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
1251markDoneBinary id=1 (0,2 3,6 4,0 3,2) t=0.93333707 [3] (3.17332506,1.70134473) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
1252markDoneBinary id=2 (3,2 0,2) t=0 [0] (3,2) tEnd=0.25 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
1253findNextOp chase.append id=2
1254activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1255markDoneBinary id=1 (0,2 3,6 4,0 3,2) t=0.754165096 [2] (3.37489581,1.70800006) tEnd=0.93333707 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
1256findNextOp from:[1] to:[3] start=3 end=2
1257bridgeOp current id=1 from=(3.37489581,1.70800006) to=(3.17332506,1.70134473)
1258path.cubicTo(3.37191081,1.55650449, 3.30472064,1.51977468, 3.17332506,1.70134473);
1259findNextOp debugShowSort contourWinding=-1 oppContourWinding=-1 sign=-1
1260debugShowSort [0] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.5 tEnd=0.67692927 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1261debugShowSort [1] {{3,2}, {0,2}} tStart=0.25 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
1262debugShowSort [2] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.5 tEnd=0.223476766 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1263debugShowSort [3] {{3,2}, {0,2}} tStart=0.25 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
1264findNextOp firstIndex=[0] sign=-1
1265activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
1266markWinding id=2 (3,2 0,2) t=0.25 [1] (2.25,2) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1267markWinding id=1 (0,2 3,6 4,0 3,2) t=0 [0] (0,2) tEnd=0.135342164 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1268findNextOp chase.append id=1
1269activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
1270markDoneBinary id=3 (0,4 2,3 2,0 6,3) t=0.223476766 [1] (1.10817444,3.11920524) tEnd=0.5 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1271findNextOp chase.append id=3
1272activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1273markDoneBinary id=3 (0,4 2,3 2,0 6,3) t=0.5 [2] (2.25,2) tEnd=0.67692927 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
1274findNextOp from:[3] to:[2] start=1 end=2
1275bridgeOp current id=3 from=(3.17332506,1.70134473) to=(2.25,2)
1276path.cubicTo(2.81209183,1.70874941, 2.51539397,1.82307076, 2.25,2);
1277findNextOp simple
1278markDoneBinary id=2 (3,2 0,2) t=0.25 [1] (2.25,2) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
1279bridgeOp current id=2 from=(2.25,2) to=(0,2)
1280findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
1281debugShowSort [1] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.135342164 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1282debugShowSort [2] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.223476766 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
1283debugShowSort [3] {{0,2}, {3,6}, {4,0}, {3,2}} tStart=0.135342164 tEnd=0.754165096 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
1284debugShowSort [0] {{0,4}, {2,3}, {2,0}, {6,3}} tStart=0.223476766 tEnd=0.5 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
1285findNextOp firstIndex=[1] sign=1
1286activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1287activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
1288activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1289markDoneBinary id=1 (0,2 3,6 4,0 3,2) t=0 [0] (0,2) tEnd=0.135342164 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
1290findNextOp from:[1] to:[3] start=1 end=0
1291bridgeOp current id=1 from=(0,2) to=(1.10817444,3.11920524)
1292path.lineTo(0,2);
1293path.cubicTo(0.406026483,2.54136872, 0.775417984,2.89956236, 1.10817444,3.11920524);
1294path.close();
1295assemble
1296assemble contour start=(1.10817444,3.11920524) end=(1.10817444,3.11920524)
1297</div>
1298
1299<div id="cubicOp45d">
1300 SimplifyNew_Test [cubicOp45d]
1301{{0,2}, {2,4}, {4,0}, {3,2}},
1302{{3,2}, {0,2}},
1303op difference
1304{{0,4}, {2,3}, {2,0}, {4,2}},
1305{{4,2}, {0,4}},
1306debugShowCubicIntersection no self intersect {{0,4}, {2,3}, {2,0}, {4,2}}
1307debugShowCubicLineIntersection wtTs[0]=0 {{0,4}, {2,3}, {2,0}, {4,2}} {{0,4}} wtTs[1]=1 {{4,2}} wnTs[0]=1 {{4,2}, {0,4}} wnTs[1]=0
1308debugShowCubicIntersection wtTs[0]=0.341662805 {{0,4}, {2,3}, {2,0}, {4,2}} {{1.5091099386066631,2.5537951499735922}} wtTs[1]=0.856247521 {{3.2495913270767485,1.4266624658205882}} wtTs[2]=0.859816875 {{3.2657899721435943,1.4343874043112959}} wnTs[0]=0.260341 {{0,2}, {2,4}, {4,0}, {3,2}} wnTs[1]=0.768795564 wnTs[2]=0.821660252
1309debugShowCubicLineIntersection wtTs[0]=0.467845317 {{0,4}, {2,3}, {2,0}, {4,2}} {{1.9034029684653309,1.9999999999999998}} wnTs[0]=0.365532 {{3,2}, {0,2}}
1310debugShowCubicLineIntersection no intersect {{0,2}, {2,4}, {4,0}, {3,2}} {{4,2}, {0,4}}
1311debugShowLineIntersection no intersect {{4,2}, {0,4}} {{3,2}, {0,2}}
1312debugShowCubicIntersection no self intersect {{0,2}, {2,4}, {4,0}, {3,2}}
1313debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {2,4}, {4,0}, {3,2}} {{0,2}} wtTs[1]=0.5 {{2.625,2}} wtTs[2]=1 {{3,2}} wnTs[0]=1 {{3,2}, {0,2}} wnTs[1]=0.125 wnTs[2]=0
1314debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0 (0,4) tEnd=0.341662805 other=4 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0
1315debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.341662805 (1.50910997,2.5537951) tEnd=0.467845317 other=1 otherT=0.260340927 otherIndex=1 windSum=? windValue=1 oppValue=0
1316debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.467845317 (1.90340292,2) tEnd=0.856247521 other=2 otherT=0.365532344 otherIndex=2 windSum=? windValue=1 oppValue=0
1317debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.856247521 (3.24959135,1.42666245) tEnd=0.859816875 other=1 otherT=0.768795564 otherIndex=3 windSum=? windValue=1 oppValue=0
1318debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.859816875 (3.26578999,1.43438745) tEnd=1 other=1 otherT=0.821660252 otherIndex=4 windSum=? windValue=1 oppValue=0
1319debugShowActiveSpans id=4 (4,2 0,4) t=0 (4,2) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
1320debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0 (0,2) tEnd=0.260340927 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
1321debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=? windValue=1 oppValue=0
1322debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.5 (2.625,2) tEnd=0.768795564 other=2 otherT=0.125 otherIndex=1 windSum=? windValue=1 oppValue=0
1323debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.768795564 (3.24959135,1.42666245) tEnd=0.821660252 other=3 otherT=0.856247521 otherIndex=3 windSum=? windValue=1 oppValue=0
1324debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.821660252 (3.26578999,1.43438745) tEnd=1 other=3 otherT=0.859816875 otherIndex=4 windSum=? windValue=1 oppValue=0
1325debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
1326debugShowActiveSpans id=2 (3,2 0,2) t=0.125 (2.625,2) tEnd=0.365532344 other=1 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
1327debugShowActiveSpans id=2 (3,2 0,2) t=0.365532344 (1.90340292,2) tEnd=1 other=3 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0
1328findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
1329debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=0.856247521 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1330debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
1331debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
1332debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=0.768795564 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
1333markWinding id=3 (0,4 2,3 2,0 4,2) t=0.856247521 [3] (3.24959135,1.42666245) tEnd=0.859816875 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1334markWinding id=3 (0,4 2,3 2,0 4,2) t=0.856247521 [3] (3.24959135,1.42666245) tEnd=0.859816875 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
1335activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1336markDoneBinary id=3 (0,4 2,3 2,0 4,2) t=0.856247521 [3] (3.24959135,1.42666245) tEnd=0.859816875 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
1337findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1
1338debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=0.768795564 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
1339debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=0.856247521 sign=1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1
1340debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
1341debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
1342findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
1343debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=0.856247521 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
1344debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
1345debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
1346debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=0.768795564 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
1347markWinding id=1 (0,2 2,4 4,0 3,2) t=0.821660252 [4] (3.26578999,1.43438745) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1348markWinding id=2 (3,2 0,2) t=0 [0] (3,2) tEnd=0.125 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1349markWinding id=3 (0,4 2,3 2,0 4,2) t=0.859816875 [4] (3.26578999,1.43438745) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1350markWinding id=4 (4,2 0,4) t=0 [0] (4,2) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1351markWinding id=3 (0,4 2,3 2,0 4,2) t=0 [0] (0,4) tEnd=0.341662805 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1352markWinding id=1 (0,2 2,4 4,0 3,2) t=0.768795564 [3] (3.24959135,1.42666245) tEnd=0.821660252 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1353debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0 (0,4) tEnd=0.341662805 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0
1354debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.341662805 (1.50910997,2.5537951) tEnd=0.467845317 other=1 otherT=0.260340927 otherIndex=1 windSum=? windValue=1 oppValue=0
1355debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.467845317 (1.90340292,2) tEnd=0.856247521 other=2 otherT=0.365532344 otherIndex=2 windSum=? windValue=1 oppValue=0
1356debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.859816875 (3.26578999,1.43438745) tEnd=1 other=1 otherT=0.821660252 otherIndex=4 windSum=-1 windValue=1 oppValue=0
1357debugShowActiveSpans id=4 (4,2 0,4) t=0 (4,2) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
1358debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0 (0,2) tEnd=0.260340927 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
1359debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=? windValue=1 oppValue=0
1360debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.5 (2.625,2) tEnd=0.768795564 other=2 otherT=0.125 otherIndex=1 windSum=? windValue=1 oppValue=0
1361debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.768795564 (3.24959135,1.42666245) tEnd=0.821660252 other=3 otherT=0.856247521 otherIndex=3 windSum=1 windValue=1 oppValue=0
1362debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.821660252 (3.26578999,1.43438745) tEnd=1 other=3 otherT=0.859816875 otherIndex=4 windSum=1 windValue=1 oppValue=0
1363debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=1 windValue=1 oppValue=0
1364debugShowActiveSpans id=2 (3,2 0,2) t=0.125 (2.625,2) tEnd=0.365532344 other=1 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
1365debugShowActiveSpans id=2 (3,2 0,2) t=0.365532344 (1.90340292,2) tEnd=1 other=3 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0
1366activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1367markDoneBinary id=1 (0,2 2,4 4,0 3,2) t=0.821660252 [4] (3.26578999,1.43438745) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
1368markDoneBinary id=2 (3,2 0,2) t=0 [0] (3,2) tEnd=0.125 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
1369findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1
1370debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.5 tEnd=0.768795564 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
1371debugShowSort [1] {{3,2}, {0,2}} tStart=0.125 tEnd=0.365532344 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
1372debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.5 tEnd=0.260340927 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
1373debugShowSort [3] {{3,2}, {0,2}} tStart=0.125 tEnd=0 sign=1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=0
1374findChaseOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1
1375debugShowSort [3] {{3,2}, {0,2}} tStart=0.125 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
1376debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.5 tEnd=0.768795564 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
1377debugShowSort [1] {{3,2}, {0,2}} tStart=0.125 tEnd=0.365532344 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=0
1378debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.5 tEnd=0.260340927 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0
1379markWinding id=1 (0,2 2,4 4,0 3,2) t=0.5 [2] (2.625,2) tEnd=0.768795564 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1380markWinding id=2 (3,2 0,2) t=0.125 [1] (2.625,2) tEnd=0.365532344 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1
1381markWinding id=1 (0,2 2,4 4,0 3,2) t=0.260340927 [1] (1.50910997,2.5537951) tEnd=0.5 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1
1382debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0 (0,4) tEnd=0.341662805 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0
1383debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.341662805 (1.50910997,2.5537951) tEnd=0.467845317 other=1 otherT=0.260340927 otherIndex=1 windSum=? windValue=1 oppValue=0
1384debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.467845317 (1.90340292,2) tEnd=0.856247521 other=2 otherT=0.365532344 otherIndex=2 windSum=? windValue=1 oppValue=0
1385debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.859816875 (3.26578999,1.43438745) tEnd=1 other=1 otherT=0.821660252 otherIndex=4 windSum=-1 windValue=1 oppValue=0
1386debugShowActiveSpans id=4 (4,2 0,4) t=0 (4,2) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
1387debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0 (0,2) tEnd=0.260340927 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
1388debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=2 windValue=1 oppValue=0
1389debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.5 (2.625,2) tEnd=0.768795564 other=2 otherT=0.125 otherIndex=1 windSum=1 windValue=1 oppValue=0
1390debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.768795564 (3.24959135,1.42666245) tEnd=0.821660252 other=3 otherT=0.856247521 otherIndex=3 windSum=1 windValue=1 oppValue=0
1391debugShowActiveSpans id=2 (3,2 0,2) t=0.125 (2.625,2) tEnd=0.365532344 other=1 otherT=0.5 otherIndex=2 windSum=2 windValue=1 oppValue=0
1392debugShowActiveSpans id=2 (3,2 0,2) t=0.365532344 (1.90340292,2) tEnd=1 other=3 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0
1393activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1394markDoneBinary id=1 (0,2 2,4 4,0 3,2) t=0.5 [2] (2.625,2) tEnd=0.768795564 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
1395debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0 (0,4) tEnd=0.341662805 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0
1396debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.341662805 (1.50910997,2.5537951) tEnd=0.467845317 other=1 otherT=0.260340927 otherIndex=1 windSum=? windValue=1 oppValue=0
1397debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.467845317 (1.90340292,2) tEnd=0.856247521 other=2 otherT=0.365532344 otherIndex=2 windSum=? windValue=1 oppValue=0
1398debugShowActiveSpans id=3 (0,4 2,3 2,0 4,2) t=0.859816875 (3.26578999,1.43438745) tEnd=1 other=1 otherT=0.821660252 otherIndex=4 windSum=-1 windValue=1 oppValue=0
1399debugShowActiveSpans id=4 (4,2 0,4) t=0 (4,2) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
1400debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0 (0,2) tEnd=0.260340927 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
1401debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=2 windValue=1 oppValue=0
1402debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.768795564 (3.24959135,1.42666245) tEnd=0.821660252 other=3 otherT=0.856247521 otherIndex=3 windSum=1 windValue=1 oppValue=0
1403debugShowActiveSpans id=2 (3,2 0,2) t=0.125 (2.625,2) tEnd=0.365532344 other=1 otherT=0.5 otherIndex=2 windSum=2 windValue=1 oppValue=0
1404debugShowActiveSpans id=2 (3,2 0,2) t=0.365532344 (1.90340292,2) tEnd=1 other=3 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0
1405activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
1406findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
1407debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=0.768795564 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
1408debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=0.856247521 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
1409debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.821660252 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
1410debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.859816875 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1
1411findNextOp firstIndex=[0] sign=1
1412activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
1413activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1414activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1415markDoneBinary id=1 (0,2 2,4 4,0 3,2) t=0.768795564 [3] (3.24959135,1.42666245) tEnd=0.821660252 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1416findNextOp from:[1] to:[3] start=4 end=5
1417bridgeOp current id=1 from=(3.24959135,1.42666245) to=(3.26578999,1.43438745)
1418path.moveTo(3.24959135,1.42666245);
1419path.cubicTo(3.26158428,1.4196322, 3.26713157,1.42161608, 3.26578999,1.43438745);
1420findNextOp simple
1421markDoneBinary id=3 (0,4 2,3 2,0 4,2) t=0.859816875 [4] (3.26578999,1.43438745) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1422bridgeOp current id=3 from=(3.26578999,1.43438745) to=(4,2)
1423path.cubicTo(3.47857022,1.53752398, 3.71963382,1.71963382, 4,2);
1424findNextOp simple
1425markDoneBinary id=4 (4,2 0,4) t=0 [0] (4,2) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1426bridgeOp current id=4 from=(4,2) to=(0,4)
1427findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1
1428debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.341662805 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1429debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.260340927 tEnd=0.5 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=0 tiny=0 opp=1
1430debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.341662805 tEnd=0.467845317 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
1431debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.260340927 tEnd=0 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=1
1432findNextOp firstIndex=[3] sign=1
1433activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1434activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1435markWinding id=3 (0,4 2,3 2,0 4,2) t=0.341662805 [1] (1.50910997,2.5537951) tEnd=0.467845317 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1
1436findNextOp chase.append id=3
1437activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1438markDoneBinary id=1 (0,2 2,4 4,0 3,2) t=0 [0] (0,2) tEnd=0.260340927 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
1439markDoneBinary id=2 (3,2 0,2) t=0.365532344 [2] (1.90340292,2) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
1440findNextOp chase.append id=2
1441markDoneBinary id=3 (0,4 2,3 2,0 4,2) t=0 [0] (0,4) tEnd=0.341662805 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1442findNextOp from:[3] to:[3] start=1 end=2
1443bridgeOp current id=3 from=(0,4) to=(1.50910997,2.5537951)
1444path.lineTo(0,4);
1445path.cubicTo(0.683325648,3.65833712, 1.13318419,3.08320737, 1.50910997,2.5537951);
1446findNextOp debugShowSort contourWinding=0 oppContourWinding=2 sign=1
1447debugShowSort [2] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.467845317 tEnd=0.341662805 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1448debugShowSort [3] {{3,2}, {0,2}} tStart=0.365532344 tEnd=0.125 sign=1 windValue=1 windSum=2 2->1 (max=2) done=0 tiny=0 opp=1
1449debugShowSort [0] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.467845317 tEnd=0.856247521 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
1450debugShowSort [1] {{3,2}, {0,2}} tStart=0.365532344 tEnd=1 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=1
1451findNextOp firstIndex=[2] sign=1
1452activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1453activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1454markWinding id=3 (0,4 2,3 2,0 4,2) t=0.467845317 [2] (1.90340292,2) tEnd=0.856247521 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1455findNextOp chase.append id=3
1456activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1457markDoneBinary id=3 (0,4 2,3 2,0 4,2) t=0.341662805 [1] (1.50910997,2.5537951) tEnd=0.467845317 newWindSum=-1 newOppSum=2 oppSum=2 windSum=-1 windValue=1
1458findNextOp from:[3] to:[3] start=2 end=3
1459bridgeOp current id=3 from=(1.50910997,2.5537951) to=(1.90340292,2)
1460path.cubicTo(1.64794636,2.35827327, 1.77669871,2.16898704, 1.90340292,2);
1461findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1
1462debugShowSort [1] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.856247521 tEnd=0.467845317 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1463debugShowSort [2] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.768795564 tEnd=0.5 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
1464debugShowSort [3] {{0,4}, {2,3}, {2,0}, {4,2}} tStart=0.856247521 tEnd=0.859816875 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
1465debugShowSort [0] {{0,2}, {2,4}, {4,0}, {3,2}} tStart=0.768795564 tEnd=0.821660252 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
1466findNextOp firstIndex=[1] sign=1
1467activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
1468activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1469activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
1470markDoneBinary id=3 (0,4 2,3 2,0 4,2) t=0.467845317 [2] (1.90340292,2) tEnd=0.856247521 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1471findNextOp from:[3] to:[1] start=3 end=4
1472bridgeOp current id=3 from=(1.90340292,2) to=(3.24959135,1.42666245)
1473path.cubicTo(2.29341149,1.47984147, 2.66401696,1.15201211, 3.24959135,1.42666245);
1474path.close();
1475debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=2 windValue=1 oppValue=0
1476debugShowActiveSpans id=2 (3,2 0,2) t=0.125 (2.625,2) tEnd=0.365532344 other=1 otherT=0.5 otherIndex=2 windSum=2 windValue=1 oppValue=0
1477activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1478markDoneBinary id=2 (3,2 0,2) t=0.125 [1] (2.625,2) tEnd=0.365532344 newWindSum=2 newOppSum=-1 oppSum=-1 windSum=2 windValue=1
1479debugShowActiveSpans id=1 (0,2 2,4 4,0 3,2) t=0.260340927 (1.50910997,2.5537951) tEnd=0.5 other=3 otherT=0.341662805 otherIndex=1 windSum=2 windValue=1 oppValue=0
1480activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1481markDoneBinary id=1 (0,2 2,4 4,0 3,2) t=0.260340927 [1] (1.50910997,2.5537951) tEnd=0.5 newWindSum=2 newOppSum=-1 oppSum=-1 windSum=2 windValue=1
1482</div>
1483
1484<div id="cubicOp46d">
1485 SimplifyNew_Test [cubicOp46d]
1486{{0,2}, {3,5}, {5,0}, {4,2}},
1487{{4,2}, {0,2}},
1488op difference
1489{{0,5}, {2,4}, {2,0}, {5,3}},
1490{{5,3}, {0,5}},
1491debugShowCubicIntersection no self intersect {{0,2}, {3,5}, {5,0}, {4,2}}
1492debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {3,5}, {5,0}, {4,2}} {{0,2}} wtTs[1]=0.6 {{3.887999999999999,2.0000000000000013}} wtTs[2]=1 {{4,2}} wnTs[0]=1 {{4,2}, {0,2}} wnTs[1]=0.028 wnTs[2]=0
1493debugShowCubicIntersection wtTs[0]=0.215060475 {{0,2}, {3,5}, {5,0}, {4,2}} {{1.7768977226209808,2.9747215410507057}} wtTs[1]=0.578517386 {{3.8153702411617676,2.0785732044555085}} wnTs[0]=0.404694 {{0,5}, {2,4}, {2,0}, {5,3}} wnTs[1]=0.846938928
1494debugShowCubicLineIntersection wtTs[0]=0.64696132 {{0,5}, {2,4}, {2,0}, {5,3}} {{2.7243714728959709,2}} wtTs[1]=0.819132784 {{3.6370281018311013,1.9999999999999996}} wnTs[0]=0.318907 {{4,2}, {0,2}} wnTs[1]=0.0907429745
1495debugShowCubicIntersection no self intersect {{0,5}, {2,4}, {2,0}, {5,3}}
1496debugShowCubicLineIntersection wtTs[0]=0 {{0,5}, {2,4}, {2,0}, {5,3}} {{0,5}} wtTs[1]=1 {{5,3}} wnTs[0]=1 {{5,3}, {0,5}} wnTs[1]=0
1497debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0 (0,2) tEnd=0.215060475 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
1498debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0.215060475 (1.77689767,2.97472143) tEnd=0.578517386 other=3 otherT=0.404693629 otherIndex=1 windSum=? windValue=1 oppValue=0
1499debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0.578517386 (3.81537032,2.07857323) tEnd=0.6 other=3 otherT=0.846938928 otherIndex=4 windSum=? windValue=1 oppValue=0
1500debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0.6 (3.88800001,2) tEnd=1 other=2 otherT=0.028 otherIndex=1 windSum=? windValue=1 oppValue=0
1501debugShowActiveSpans id=2 (4,2 0,2) t=0 (4,2) tEnd=0.028 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
1502debugShowActiveSpans id=2 (4,2 0,2) t=0.028 (3.88800001,2) tEnd=0.0907429745 other=1 otherT=0.6 otherIndex=3 windSum=? windValue=1 oppValue=0
1503debugShowActiveSpans id=2 (4,2 0,2) t=0.0907429745 (3.63702822,2) tEnd=0.318907132 other=3 otherT=0.819132784 otherIndex=3 windSum=? windValue=1 oppValue=0
1504debugShowActiveSpans id=2 (4,2 0,2) t=0.318907132 (2.72437143,2) tEnd=1 other=3 otherT=0.64696132 otherIndex=2 windSum=? windValue=1 oppValue=0
1505debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0 (0,5) tEnd=0.404693629 other=4 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0
1506debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.404693629 (1.77689767,2.97472143) tEnd=0.64696132 other=1 otherT=0.215060475 otherIndex=1 windSum=? windValue=1 oppValue=0
1507debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.64696132 (2.72437143,2) tEnd=0.819132784 other=2 otherT=0.318907132 otherIndex=3 windSum=? windValue=1 oppValue=0
1508debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.819132784 (3.63702822,2) tEnd=0.846938928 other=2 otherT=0.0907429745 otherIndex=2 windSum=? windValue=1 oppValue=0
1509debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.846938928 (3.81537032,2.07857323) tEnd=1 other=1 otherT=0.578517386 otherIndex=2 windSum=? windValue=1 oppValue=0
1510debugShowActiveSpans id=4 (5,3 0,5) t=0 (5,3) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
1511findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
1512debugShowSort [0] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=1 tEnd=0.6 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1513debugShowSort [1] {{4,2}, {0,2}} tStart=0 tEnd=0.028 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
1514findTop swap
1515markWinding id=1 (0,2 3,5 5,0 4,2) t=0.6 [3] (3.88800001,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1516markWinding id=1 (0,2 3,5 5,0 4,2) t=0.6 [3] (3.88800001,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1517markWinding id=2 (4,2 0,2) t=0 [0] (4,2) tEnd=0.028 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1518activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
1519findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
1520debugShowSort [0] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.6 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
1521debugShowSort [1] {{4,2}, {0,2}} tStart=0.028 tEnd=0.0907429745 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=0
1522debugShowSort [2] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.6 tEnd=0.578517386 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0
1523debugShowSort [3] {{4,2}, {0,2}} tStart=0.028 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
1524findNextOp firstIndex=[0] sign=-1
1525activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1526markDoneBinary id=2 (4,2 0,2) t=0.028 [1] (3.88800001,2) tEnd=0.0907429745 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
1527findNextOp chase.append id=2
1528activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1529markDoneBinary id=1 (0,2 3,5 5,0 4,2) t=0.578517386 [2] (3.81537032,2.07857323) tEnd=0.6 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
1530findNextOp chase.append id=1
1531activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
1532markDoneBinary id=1 (0,2 3,5 5,0 4,2) t=0.6 [3] (3.88800001,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1533findNextOp from:[1] to:[2] start=1 end=0
1534bridgeOp current id=1 from=(4,2) to=(3.88800001,2)
1535path.moveTo(4,2);
1536path.cubicTo(4.4000001,1.20000005, 4.32000017,1.51999998, 3.88800001,2);
1537findNextOp simple
1538markDoneBinary id=2 (4,2 0,2) t=0 [0] (4,2) tEnd=0.028 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1539bridgeOp current id=2 from=(3.88800001,2) to=(4,2)
1540path.lineTo(4,2);
1541path.close();
1542findChaseOp debugShowSort contourWinding=1 oppContourWinding=0 sign=-1
1543debugShowSort [0] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.6 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=0
1544debugShowSort [1] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=0.819132784 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
1545debugShowSort [2] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.215060475 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0
1546debugShowSort [3] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
1547findChaseOp debugShowSort contourWinding=1 oppContourWinding=0 sign=-1
1548debugShowSort [0] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.6 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=0
1549debugShowSort [1] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=0.819132784 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
1550debugShowSort [2] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.215060475 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0
1551debugShowSort [3] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
1552markWinding id=3 (0,5 2,4 2,0 5,3) t=0.819132784 [3] (3.63702822,2) tEnd=0.846938928 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1
1553markWinding id=1 (0,2 3,5 5,0 4,2) t=0.215060475 [1] (1.77689767,2.97472143) tEnd=0.578517386 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1
1554markWinding id=3 (0,5 2,4 2,0 5,3) t=0.846938928 [4] (3.81537032,2.07857323) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1555markWinding id=4 (5,3 0,5) t=0 [0] (5,3) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1556markWinding id=3 (0,5 2,4 2,0 5,3) t=0 [0] (0,5) tEnd=0.404693629 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1557debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0 (0,2) tEnd=0.215060475 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
1558debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0.215060475 (1.77689767,2.97472143) tEnd=0.578517386 other=3 otherT=0.404693629 otherIndex=1 windSum=2 windValue=1 oppValue=0
1559debugShowActiveSpans id=2 (4,2 0,2) t=0.0907429745 (3.63702822,2) tEnd=0.318907132 other=3 otherT=0.819132784 otherIndex=3 windSum=? windValue=1 oppValue=0
1560debugShowActiveSpans id=2 (4,2 0,2) t=0.318907132 (2.72437143,2) tEnd=1 other=3 otherT=0.64696132 otherIndex=2 windSum=? windValue=1 oppValue=0
1561debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0 (0,5) tEnd=0.404693629 other=4 otherT=1 otherIndex=1 windSum=-1 windValue=1 oppValue=0
1562debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.404693629 (1.77689767,2.97472143) tEnd=0.64696132 other=1 otherT=0.215060475 otherIndex=1 windSum=? windValue=1 oppValue=0
1563debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.64696132 (2.72437143,2) tEnd=0.819132784 other=2 otherT=0.318907132 otherIndex=3 windSum=? windValue=1 oppValue=0
1564debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.819132784 (3.63702822,2) tEnd=0.846938928 other=2 otherT=0.0907429745 otherIndex=2 windSum=-1 windValue=1 oppValue=0
1565debugShowActiveSpans id=3 (0,5 2,4 2,0 5,3) t=0.846938928 (3.81537032,2.07857323) tEnd=1 other=1 otherT=0.578517386 otherIndex=2 windSum=-1 windValue=1 oppValue=0
1566debugShowActiveSpans id=4 (5,3 0,5) t=0 (5,3) tEnd=1 other=3 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
1567activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1568findNextOp debugShowSort contourWinding=-1 oppContourWinding=2 sign=-1
1569debugShowSort [2] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.819132784 tEnd=0.846938928 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1570debugShowSort [3] {{4,2}, {0,2}} tStart=0.0907429745 tEnd=0.028 sign=1 windValue=1 windSum=2 2->1 (max=2) done=1 tiny=0 opp=1
1571debugShowSort [0] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.819132784 tEnd=0.64696132 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1572debugShowSort [1] {{4,2}, {0,2}} tStart=0.0907429745 tEnd=0.318907132 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=1
1573findNextOp firstIndex=[2] sign=-1
1574activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1575activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1576markWinding id=3 (0,5 2,4 2,0 5,3) t=0.64696132 [2] (2.72437143,2) tEnd=0.819132784 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1577findNextOp chase.append id=3
1578activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1579markDoneBinary id=2 (4,2 0,2) t=0.0907429745 [2] (3.63702822,2) tEnd=0.318907132 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1
1580findNextOp chase.append id=2
1581markDoneBinary id=3 (0,5 2,4 2,0 5,3) t=0.819132784 [3] (3.63702822,2) tEnd=0.846938928 newWindSum=-1 newOppSum=2 oppSum=2 windSum=-1 windValue=1
1582findNextOp from:[3] to:[3] start=3 end=2
1583bridgeOp current id=3 from=(3.81537032,2.07857323) to=(3.63702822,2)
1584path.moveTo(3.81537032,2.07857323);
1585path.cubicTo(3.75423074,2.04822493, 3.69481921,2.02210546, 3.63702822,2);
1586findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
1587debugShowSort [0] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.64696132 tEnd=0.819132784 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1588debugShowSort [1] {{4,2}, {0,2}} tStart=0.318907132 tEnd=1 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=1
1589debugShowSort [2] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.64696132 tEnd=0.404693629 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1590debugShowSort [3] {{4,2}, {0,2}} tStart=0.318907132 tEnd=0.0907429745 sign=1 windValue=1 windSum=2 2->1 (max=2) done=1 tiny=0 opp=1
1591findNextOp firstIndex=[0] sign=-1
1592activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1593markDoneBinary id=2 (4,2 0,2) t=0.318907132 [3] (2.72437143,2) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
1594markDoneBinary id=1 (0,2 3,5 5,0 4,2) t=0 [0] (0,2) tEnd=0.215060475 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
1595findNextOp chase.append id=1
1596activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1597markWinding id=3 (0,5 2,4 2,0 5,3) t=0.404693629 [1] (1.77689767,2.97472143) tEnd=0.64696132 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1
1598findNextOp chase.append id=3
1599activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1600markDoneBinary id=3 (0,5 2,4 2,0 5,3) t=0.64696132 [2] (2.72437143,2) tEnd=0.819132784 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1601findNextOp from:[3] to:[3] start=2 end=1
1602bridgeOp current id=3 from=(3.63702822,2) to=(2.72437143,2)
1603path.cubicTo(3.2791934,1.86312568, 2.98348093,1.88013792, 2.72437143,2);
1604findNextOp debugShowSort contourWinding=-1 oppContourWinding=2 sign=-1
1605debugShowSort [0] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.404693629 tEnd=0.64696132 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1606debugShowSort [1] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.215060475 tEnd=0 sign=1 windValue=1 windSum=2 2->1 (max=2) done=1 tiny=0 opp=1
1607debugShowSort [2] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.404693629 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1608debugShowSort [3] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.215060475 tEnd=0.578517386 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=0 tiny=0 opp=1
1609findNextOp firstIndex=[0] sign=-1
1610activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1611activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1612activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1613markDoneBinary id=3 (0,5 2,4 2,0 5,3) t=0.404693629 [1] (1.77689767,2.97472143) tEnd=0.64696132 newWindSum=-1 newOppSum=2 oppSum=2 windSum=-1 windValue=1
1614findNextOp from:[3] to:[3] start=1 end=0
1615bridgeOp current id=3 from=(2.72437143,2) to=(1.77689767,2.97472143)
1616path.cubicTo(2.35977101,2.16866159, 2.06764531,2.54096746, 1.77689767,2.97472143);
1617findNextOp simple
1618markDoneBinary id=3 (0,5 2,4 2,0 5,3) t=0 [0] (0,5) tEnd=0.404693629 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1619bridgeOp current id=3 from=(1.77689767,2.97472143) to=(0,5)
1620path.cubicTo(1.29122055,3.69928193, 0.809387267,4.5953064, 0,5);
1621findNextOp simple
1622markDoneBinary id=4 (5,3 0,5) t=0 [0] (5,3) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1623bridgeOp current id=4 from=(0,5) to=(5,3)
1624findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
1625debugShowSort [3] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1626debugShowSort [0] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.6 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=1
1627debugShowSort [1] {{0,5}, {2,4}, {2,0}, {5,3}} tStart=0.846938928 tEnd=0.819132784 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
1628debugShowSort [2] {{0,2}, {3,5}, {5,0}, {4,2}} tStart=0.578517386 tEnd=0.215060475 sign=1 windValue=1 windSum=2 2->1 (max=2) done=0 tiny=0 opp=1
1629findNextOp firstIndex=[3] sign=-1
1630activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1631activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1632activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1633markDoneBinary id=3 (0,5 2,4 2,0 5,3) t=0.846938928 [4] (3.81537032,2.07857323) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1634findNextOp from:[3] to:[3] start=4 end=3
1635bridgeOp current id=3 from=(5,3) to=(3.81537032,2.07857323)
1636path.lineTo(5,3);
1637path.cubicTo(4.54081678,2.54081678, 4.1519165,2.2456274, 3.81537032,2.07857323);
1638path.close();
1639debugShowActiveSpans id=1 (0,2 3,5 5,0 4,2) t=0.215060475 (1.77689767,2.97472143) tEnd=0.578517386 other=3 otherT=0.404693629 otherIndex=1 windSum=2 windValue=1 oppValue=0
1640activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1641markDoneBinary id=1 (0,2 3,5 5,0 4,2) t=0.215060475 [1] (1.77689767,2.97472143) tEnd=0.578517386 newWindSum=2 newOppSum=-1 oppSum=-1 windSum=2 windValue=1
1642assemble
1643assemble contour start=(4,2) end=(4,2)
1644</div>
1645
1646<div id="cubicOp46da">
1647 {{0,2}, {3,5}, {5,0}, {4,2}},
1648
1649 {{0,2}, {1.1328125,3.06640625}, {2.03125,2.984375}},
1650 {{2.03125,2.984375}, {2.9296875,2.90234375}, {3.5,2.375}},
1651 {{3.5,2.375}, {4.0703125,1.84765625}, {4.21875,1.578125}},
1652 {{4.21875,1.578125}, {4.3671875,1.30859375}, {4,2}},
1653</div>
1654
1655<div id="cubicOp46db">
1656{{x = 3, y = 4}, {x = 4.0000000000000009, y = 6}, {x = 0.99999999999999845, y = 7.894919286223335e-16}, {x = 6, y = 2}}
1657</div>
1658
1659<div id="cubicOp47d">
1660 SimplifyNew_Test [cubicOp47d]
1661{{0,1}, {1,6}, {6,2}, {5,4}},
1662{{5,4}, {0,1}},
1663op difference
1664{{2,6}, {4,5}, {1,0}, {6,1}},
1665{{6,1}, {2,6}},
1666debugShowCubicIntersection no self intersect {{2,6}, {4,5}, {1,0}, {6,1}}
1667debugShowCubicLineIntersection wtTs[0]=0 {{2,6}, {4,5}, {1,0}, {6,1}} {{2,6}} wtTs[1]=0.171428571 {{2.6532478134110784,5.1834402332361513}} wtTs[2]=1 {{6,1}} wnTs[0]=1 {{6,1}, {2,6}} wnTs[1]=0.836688047 wnTs[2]=0
1668debugShowCubicIntersection no intersect {{2,6}, {4,5}, {1,0}, {6,1}} {{0,1}, {1,6}, {6,2}, {5,4}}
1669debugShowCubicLineIntersection wtTs[0]=0.503145036 {{2,6}, {4,5}, {1,0}, {6,1}} {{2.8774036920020918,2.7264422152012551}} wnTs[0]=0.424519 {{5,4}, {0,1}}
1670debugShowCubicLineIntersection wtTs[0]=0.604274731 {{0,1}, {1,6}, {6,2}, {5,4}} {{3.9881028045490883,3.5148714943136397}} wnTs[0]=0.502974 {{6,1}, {2,6}}
1671debugShowLineIntersection wtTs[0]=0.486486486 {{6,1}, {2,6}} {{4.0540540540540535,3.4324324324324329}} wnTs[0]=0.189189 {{5,4}, {0,1}}
1672debugShowCubicIntersection no self intersect {{0,1}, {1,6}, {6,2}, {5,4}}
1673debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {1,6}, {6,2}, {5,4}} {{0,1}} wtTs[1]=0.628571429 {{4.1434402332361522,3.486064139941691}} wtTs[2]=1 {{5,4}} wnTs[0]=1 {{5,4}, {0,1}} wnTs[1]=0.171311953 wnTs[2]=0
1674debugShowActiveSpans id=3 (2,6 4,5 1,0 6,1) t=0 (2,6) tEnd=0.171428571 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
1675debugShowActiveSpans id=3 (2,6 4,5 1,0 6,1) t=0.171428571 (2.65324783,5.18344021) tEnd=0.503145036 other=4 otherT=0.836688047 otherIndex=3 windSum=? windValue=1 oppValue=0
1676debugShowActiveSpans id=3 (2,6 4,5 1,0 6,1) t=0.503145036 (2.87740374,2.7264421) tEnd=1 other=2 otherT=0.424519262 otherIndex=3 windSum=? windValue=1 oppValue=0
1677debugShowActiveSpans id=4 (6,1 2,6) t=0 (6,1) tEnd=0.486486486 other=3 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
1678debugShowActiveSpans id=4 (6,1 2,6) t=0.486486486 (4.05405426,3.43243241) tEnd=0.502974299 other=2 otherT=0.189189189 otherIndex=2 windSum=? windValue=1 oppValue=0
1679debugShowActiveSpans id=4 (6,1 2,6) t=0.502974299 (3.98810291,3.5148716) tEnd=0.836688047 other=1 otherT=0.604274731 otherIndex=1 windSum=? windValue=1 oppValue=0
1680debugShowActiveSpans id=4 (6,1 2,6) t=0.836688047 (2.65324783,5.18344021) tEnd=1 other=3 otherT=0.171428571 otherIndex=1 windSum=? windValue=1 oppValue=0
1681debugShowActiveSpans id=1 (0,1 1,6 6,2 5,4) t=0 (0,1) tEnd=0.604274731 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
1682debugShowActiveSpans id=1 (0,1 1,6 6,2 5,4) t=0.604274731 (3.98810291,3.5148716) tEnd=0.628571429 other=4 otherT=0.502974299 otherIndex=2 windSum=? windValue=1 oppValue=0
1683debugShowActiveSpans id=1 (0,1 1,6 6,2 5,4) t=0.628571429 (4.14344025,3.4860642) tEnd=1 other=2 otherT=0.171311953 otherIndex=1 windSum=? windValue=1 oppValue=0
1684debugShowActiveSpans id=2 (5,4 0,1) t=0 (5,4) tEnd=0.171311953 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
1685debugShowActiveSpans id=2 (5,4 0,1) t=0.171311953 (4.14344025,3.4860642) tEnd=0.189189189 other=1 otherT=0.628571429 otherIndex=2 windSum=? windValue=1 oppValue=0
1686debugShowActiveSpans id=2 (5,4 0,1) t=0.189189189 (4.05405426,3.43243241) tEnd=0.424519262 other=4 otherT=0.486486486 otherIndex=1 windSum=? windValue=1 oppValue=0
1687debugShowActiveSpans id=2 (5,4 0,1) t=0.424519262 (2.87740374,2.7264421) tEnd=1 other=3 otherT=0.503145036 otherIndex=2 windSum=? windValue=1 oppValue=0
1688findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
1689debugShowSort [0] {{0,1}, {1,6}, {6,2}, {5,4}} tStart=0 tEnd=0.604274731 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
1690debugShowSort [1] {{5,4}, {0,1}} tStart=1 tEnd=0.424519262 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
1691markWinding id=1 (0,1 1,6 6,2 5,4) t=0 [0] (0,1) tEnd=0.604274731 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1692markWinding id=2 (5,4 0,1) t=0.424519262 [3] (2.87740374,2.7264421) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1693markWinding id=1 (0,1 1,6 6,2 5,4) t=0 [0] (0,1) tEnd=0.604274731 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1694activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
1695findNextOp simple
1696markDoneBinary id=1 (0,1 1,6 6,2 5,4) t=0 [0] (0,1) tEnd=0.604274731 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1697bridgeOp current id=1 from=(3.98810291,3.5148716) to=(0,1)
1698path.moveTo(3.98810291,3.5148716);
1699path.cubicTo(2.66914129,3.75641561, 0.60427475,4.02137375, 0,1);
1700findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
1701debugShowSort [1] {{5,4}, {0,1}} tStart=0.424519262 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
1702debugShowSort [2] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.503145036 tEnd=0.171428571 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
1703debugShowSort [3] {{5,4}, {0,1}} tStart=0.424519262 tEnd=0.189189189 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
1704debugShowSort [0] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.503145036 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
1705findNextOp firstIndex=[1] sign=-1
1706activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1707markWinding id=3 (2,6 4,5 1,0 6,1) t=0.171428571 [1] (2.65324783,5.18344021) tEnd=0.503145036 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1708findNextOp chase.append id=3
1709activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
1710markDoneBinary id=2 (5,4 0,1) t=0.189189189 [2] (4.05405426,3.43243241) tEnd=0.424519262 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1711findNextOp chase.append id=2
1712activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1713markDoneBinary id=3 (2,6 4,5 1,0 6,1) t=0.503145036 [2] (2.87740374,2.7264421) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1714markDoneBinary id=4 (6,1 2,6) t=0 [0] (6,1) tEnd=0.486486486 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1715findNextOp chase.append id=4
1716markDoneBinary id=2 (5,4 0,1) t=0.424519262 [3] (2.87740374,2.7264421) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1717findNextOp from:[2] to:[3] start=2 end=1
1718bridgeOp current id=2 from=(0,1) to=(2.87740374,2.7264421)
1719findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
1720debugShowSort [1] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.171428571 tEnd=0.503145036 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1721debugShowSort [2] {{6,1}, {2,6}} tStart=0.836688047 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
1722debugShowSort [3] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.171428571 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
1723debugShowSort [0] {{6,1}, {2,6}} tStart=0.836688047 tEnd=0.502974299 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1724findNextOp firstIndex=[1] sign=-1
1725activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1726markWinding id=4 (6,1 2,6) t=0.836688047 [3] (2.65324783,5.18344021) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
1727markWinding id=3 (2,6 4,5 1,0 6,1) t=0 [0] (2,6) tEnd=0.171428571 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
1728findNextOp chase.append id=3
1729activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1730activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1731markWinding id=4 (6,1 2,6) t=0.502974299 [2] (3.98810291,3.5148716) tEnd=0.836688047 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1732findNextOp chase.append id=4
1733markDoneBinary id=3 (2,6 4,5 1,0 6,1) t=0.171428571 [1] (2.65324783,5.18344021) tEnd=0.503145036 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1734findNextOp from:[3] to:[4] start=3 end=4
1735bridgeOp current id=3 from=(2.87740374,2.7264421) to=(2.65324783,5.18344021)
1736path.lineTo(2.87740374,2.7264421);
1737path.cubicTo(2.7913022,3.55361414, 2.87475324,4.49428225, 2.65324783,5.18344021);
1738findNextOp simple
1739markDoneBinary id=4 (6,1 2,6) t=0.836688047 [3] (2.65324783,5.18344021) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
1740bridgeOp current id=4 from=(2.65324783,5.18344021) to=(2,6)
1741findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1
1742debugShowSort [3] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.171428571 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
1743debugShowSort [0] {{6,1}, {2,6}} tStart=0.836688047 tEnd=0.502974299 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1744debugShowSort [1] {{2,6}, {4,5}, {1,0}, {6,1}} tStart=0.171428571 tEnd=0.503145036 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
1745debugShowSort [2] {{6,1}, {2,6}} tStart=0.836688047 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
1746findNextOp firstIndex=[3] sign=1
1747activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1748activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1749activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1750markDoneBinary id=3 (2,6 4,5 1,0 6,1) t=0 [0] (2,6) tEnd=0.171428571 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
1751findNextOp from:[3] to:[4] start=3 end=2
1752bridgeOp current id=3 from=(2,6) to=(2.65324783,5.18344021)
1753path.lineTo(2,6);
1754path.cubicTo(2.34285712,5.82857132, 2.53877544,5.53959179, 2.65324783,5.18344021);
1755findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
1756debugShowSort [3] {{6,1}, {2,6}} tStart=0.502974299 tEnd=0.836688047 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
1757debugShowSort [0] {{0,1}, {1,6}, {6,2}, {5,4}} tStart=0.604274731 tEnd=0.628571429 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=1
1758debugShowSort [1] {{6,1}, {2,6}} tStart=0.502974299 tEnd=0.486486486 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1759debugShowSort [2] {{0,1}, {1,6}, {6,2}, {5,4}} tStart=0.604274731 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1
1760findNextOp firstIndex=[3] sign=-1
1761activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1762markDoneBinary id=1 (0,1 1,6 6,2 5,4) t=0.604274731 [1] (3.98810291,3.5148716) tEnd=0.628571429 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
1763findNextOp chase.append id=1
1764activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
1765markWinding id=4 (6,1 2,6) t=0.486486486 [1] (4.05405426,3.43243241) tEnd=0.502974299 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1
1766findNextOp chase.append id=4
1767activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1768markDoneBinary id=4 (6,1 2,6) t=0.502974299 [2] (3.98810291,3.5148716) tEnd=0.836688047 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1769findNextOp from:[4] to:[4] start=2 end=1
1770bridgeOp current id=4 from=(2.65324783,5.18344021) to=(3.98810291,3.5148716)
1771path.lineTo(3.98810291,3.5148716);
1772path.close();
1773debugShowActiveSpans id=4 (6,1 2,6) t=0.486486486 (4.05405426,3.43243241) tEnd=0.502974299 other=2 otherT=0.189189189 otherIndex=2 windSum=-1 windValue=1 oppValue=0
1774debugShowActiveSpans id=1 (0,1 1,6 6,2 5,4) t=0.628571429 (4.14344025,3.4860642) tEnd=1 other=2 otherT=0.171311953 otherIndex=1 windSum=? windValue=1 oppValue=0
1775debugShowActiveSpans id=2 (5,4 0,1) t=0 (5,4) tEnd=0.171311953 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
1776debugShowActiveSpans id=2 (5,4 0,1) t=0.171311953 (4.14344025,3.4860642) tEnd=0.189189189 other=1 otherT=0.628571429 otherIndex=2 windSum=? windValue=1 oppValue=0
1777activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1778findNextOp debugShowSort contourWinding=0 oppContourWinding=2 sign=1
1779debugShowSort [1] {{6,1}, {2,6}} tStart=0.502974299 tEnd=0.486486486 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1780debugShowSort [2] {{0,1}, {1,6}, {6,2}, {5,4}} tStart=0.604274731 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1
1781debugShowSort [3] {{6,1}, {2,6}} tStart=0.502974299 tEnd=0.836688047 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
1782debugShowSort [0] {{0,1}, {1,6}, {6,2}, {5,4}} tStart=0.604274731 tEnd=0.628571429 sign=-1 windValue=1 windSum=2 1->2 (max=2) done=1 tiny=0 opp=1
1783findNextOp firstIndex=[1] sign=1
1784activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1785activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1786activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1787markDoneBinary id=4 (6,1 2,6) t=0.486486486 [1] (4.05405426,3.43243241) tEnd=0.502974299 newWindSum=-1 newOppSum=2 oppSum=2 windSum=-1 windValue=1
1788findNextOp from:[4] to:[4] start=2 end=3
1789bridgeOp current id=4 from=(4.05405426,3.43243241) to=(3.98810291,3.5148716)
1790debugShowActiveSpans id=1 (0,1 1,6 6,2 5,4) t=0.628571429 (4.14344025,3.4860642) tEnd=1 other=2 otherT=0.171311953 otherIndex=1 windSum=? windValue=1 oppValue=0
1791debugShowActiveSpans id=2 (5,4 0,1) t=0 (5,4) tEnd=0.171311953 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
1792debugShowActiveSpans id=2 (5,4 0,1) t=0.171311953 (4.14344025,3.4860642) tEnd=0.189189189 other=1 otherT=0.628571429 otherIndex=2 windSum=? windValue=1 oppValue=0
1793</div>
1794
1795<div id="cubicOp47da">
1796computed quadratics given
1797 {{2,6}, {4,5}, {1,0}, {6,1}},
1798 {{0,1}, {1,6}, {6,2}, {5,4}},
1799computed quadratics set 1
1800 {{2,6}, {2.2404737,5.87759298}, {2.39345162,5.68487367}},
1801 {{2.39345162,5.68487367}, {2.67348969,5.31541246}, {2.74792918,4.77711896}},
1802 {{2.74792918,4.77711896}, {2.82236867,4.23882547}, {2.82848144,3.63729341}},
1803 {{2.82848144,3.63729341}, {2.83027876,3.57616472}, {2.83215462,3.51498289}},
1804 {{2.83215462,3.51498289}, {2.78850872,2.32758859}, {3.26769775,1.50382966}},
1805 {{3.26769775,1.50382966}, {3.55499101,1.08453908}, {4.20162956,0.930553195}},
1806 {{4.20162956,0.930553195}, {4.84826812,0.776567313}, {6,1}},
1807computed quadratics set 2
1808 {{0,1}, {0.337189878,2.53658624}, {1.06305813,3.09524088}},
1809 {{1.06305813,3.09524088}, {1.78892639,3.65389552}, {2.62772567,3.64823958}},
1810 {{2.62772567,3.64823958}, {3.46652495,3.64258364}, {4.1425079,3.48623815}},
1811 {{4.1425079,3.48623815}, {4.88772835,3.3075243}, {5.09137748,3.46764237}},
1812 {{5.09137748,3.46764237}, {5.20611277,3.58418013}, {5,4}},
1813</div>
1814
1815<div id="cubicOp47db">
1816 {{2.74792918,4.77711896}, {2.82236867,4.23882547}, {2.82848144,3.63729341}},
1817 {{2.62772567,3.64823958}, {3.46652495,3.64258364}, {4.1425079,3.48623815}},
1818</div>
1819
1820<div id="cubicOp48d">
1821 SimplifyNew_Test [cubicOp48d]
1822{{0,2}, {2,3}, {5,1}, {3,2}},
1823{{3,2}, {0,2}},
1824op difference
1825{{1,5}, {2,3}, {2,0}, {3,2}},
1826{{3,2}, {1,5}},
1827debugShowCubicIntersection no self intersect {{1,5}, {2,3}, {2,0}, {3,2}}
1828debugShowCubicLineIntersection wtTs[0]=0 {{1,5}, {2,3}, {2,0}, {3,2}} {{1,5}} wtTs[1]=1 {{3,2}} wnTs[0]=1 {{3,2}, {1,5}} wnTs[1]=0
1829debugShowCubicIntersection wtTs[0]=0.447821962 {{1,5}, {2,3}, {2,0}, {3,2}} {{1.921448828321461,2.2502841146969206}} wtTs[1]=1 {{3,2}} wnTs[0]=0.302178 {{0,2}, {2,3}, {5,1}, {3,2}} wnTs[1]=1
1830debugShowCubicLineIntersection wtTs[0]=0.5 {{1,5}, {2,3}, {2,0}, {3,2}} {{2,2}} wtTs[1]=1 {{3,2}} wnTs[0]=0.333333 {{3,2}, {0,2}} wnTs[1]=0
1831debugShowCubicLineIntersection wtTs[0]=0.5 {{0,2}, {2,3}, {5,1}, {3,2}} {{3,2}} wtTs[1]=1 {{3,2}} wnTs[0]=0 {{3,2}, {1,5}} wnTs[1]=0
1832debugShowLineIntersection wtTs[0]=0 {{3,2}, {1,5}} {{3,2}} wnTs[0]=0 {{3,2}, {0,2}}
1833debugShowCubicIntersection wtTs[0]=0.5 {{0,2}, {2,3}, {5,1}, {3,2}} {{3,2}} wtTs[1]=1
1834debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {2,3}, {5,1}, {3,2}} {{0,2}} wtTs[1]=0.5 {{3,2}} wtTs[2]=1 {{3,2}} wnTs[0]=1 {{3,2}, {0,2}} wnTs[1]=0 wnTs[2]=0
1835debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0 (1,5) tEnd=0.447821962 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
1836debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0.447821962 (1.92144883,2.25028419) tEnd=0.5 other=1 otherT=0.302178051 otherIndex=1 windSum=? windValue=1 oppValue=0
1837debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0.5 (2,2) tEnd=1 other=2 otherT=0.333333333 otherIndex=4 windSum=? windValue=1 oppValue=0
1838debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=1 other=3 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
1839debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0 (0,2) tEnd=0.302178051 other=2 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
1840debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.302178051 (1.92144883,2.25028419) tEnd=0.5 other=3 otherT=0.447821962 otherIndex=1 windSum=? windValue=1 oppValue=0
1841debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.5 (3,2) tEnd=1 other=4 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0
1842debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.333333333 other=3 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
1843debugShowActiveSpans id=2 (3,2 0,2) t=0.333333333 (2,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
1844findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
1845debugShowSort [1] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1846debugShowSort [2] {{3,2}, {0,2}} tStart=0 tEnd=0.333333333 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
1847debugShowSort [3] {{3,2}, {1,5}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
1848debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
1849markWinding id=3 (1,5 2,3 2,0 3,2) t=0.5 [2] (2,2) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
1850markWinding id=3 (1,5 2,3 2,0 3,2) t=0.5 [2] (2,2) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
1851activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1852markDoneBinary id=3 (1,5 2,3 2,0 3,2) t=0.5 [2] (2,2) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
1853findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1
1854debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
1855debugShowSort [1] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1
1856debugShowSort [2] {{3,2}, {0,2}} tStart=0 tEnd=0.333333333 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
1857debugShowSort [3] {{3,2}, {1,5}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
1858findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
1859debugShowSort [1] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
1860debugShowSort [2] {{3,2}, {0,2}} tStart=0 tEnd=0.333333333 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
1861debugShowSort [3] {{3,2}, {1,5}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
1862debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
1863markWinding id=2 (3,2 0,2) t=0 [0] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1864markWinding id=2 (3,2 0,2) t=0 [1] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1865markWinding id=2 (3,2 0,2) t=0 [2] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1866markWinding id=2 (3,2 0,2) t=0 [3] (3,2) tEnd=0.333333333 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1867markWinding id=4 (3,2 1,5) t=0 [0] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1868markWinding id=4 (3,2 1,5) t=0 [1] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1869markWinding id=4 (3,2 1,5) t=0 [2] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1870markWinding id=4 (3,2 1,5) t=0 [3] (3,2) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1871markWinding id=3 (1,5 2,3 2,0 3,2) t=0 [0] (1,5) tEnd=0.447821962 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1872markWinding id=1 (0,2 2,3 5,1 3,2) t=0.5 [3] (3,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1873markWinding id=1 (0,2 2,3 5,1 3,2) t=0.5 [2] (3,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1874markWinding id=1 (0,2 2,3 5,1 3,2) t=0.5 [4] (3,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1875debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0 (1,5) tEnd=0.447821962 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
1876debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0.447821962 (1.92144883,2.25028419) tEnd=0.5 other=1 otherT=0.302178051 otherIndex=1 windSum=? windValue=1 oppValue=0
1877debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=1 other=3 otherT=1 otherIndex=3 windSum=-1 windValue=1 oppValue=0
1878debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0 (0,2) tEnd=0.302178051 other=2 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
1879debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.302178051 (1.92144883,2.25028419) tEnd=0.5 other=3 otherT=0.447821962 otherIndex=1 windSum=? windValue=1 oppValue=0
1880debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.5 (3,2) tEnd=1 other=4 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0
1881debugShowActiveSpans id=2 (3,2 0,2) t=0 (3,2) tEnd=0.333333333 other=3 otherT=1 otherIndex=5 windSum=1 windValue=1 oppValue=0
1882debugShowActiveSpans id=2 (3,2 0,2) t=0.333333333 (2,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
1883activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1884markDoneBinary id=2 (3,2 0,2) t=0 [0] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
1885markDoneBinary id=2 (3,2 0,2) t=0 [1] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
1886markDoneBinary id=2 (3,2 0,2) t=0 [2] (3,2) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
1887markDoneBinary id=2 (3,2 0,2) t=0 [3] (3,2) tEnd=0.333333333 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
1888findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
1889debugShowSort [0] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
1890debugShowSort [1] {{3,2}, {0,2}} tStart=0.333333333 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
1891debugShowSort [2] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=0.447821962 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1892debugShowSort [3] {{3,2}, {0,2}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
1893findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
1894debugShowSort [0] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
1895debugShowSort [1] {{3,2}, {0,2}} tStart=0.333333333 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
1896debugShowSort [2] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=0.447821962 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
1897debugShowSort [3] {{3,2}, {0,2}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
1898markWinding id=2 (3,2 0,2) t=0.333333333 [4] (2,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1899markWinding id=1 (0,2 2,3 5,1 3,2) t=0 [0] (0,2) tEnd=0.302178051 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
1900markWinding id=3 (1,5 2,3 2,0 3,2) t=0.447821962 [1] (1.92144883,2.25028419) tEnd=0.5 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
1901debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0 (1,5) tEnd=0.447821962 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
1902debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0.447821962 (1.92144883,2.25028419) tEnd=0.5 other=1 otherT=0.302178051 otherIndex=1 windSum=-1 windValue=1 oppValue=0
1903debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=1 other=3 otherT=1 otherIndex=3 windSum=-1 windValue=1 oppValue=0
1904debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0 (0,2) tEnd=0.302178051 other=2 otherT=1 otherIndex=5 windSum=1 windValue=1 oppValue=0
1905debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.302178051 (1.92144883,2.25028419) tEnd=0.5 other=3 otherT=0.447821962 otherIndex=1 windSum=? windValue=1 oppValue=0
1906debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.5 (3,2) tEnd=1 other=4 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0
1907debugShowActiveSpans id=2 (3,2 0,2) t=0.333333333 (2,2) tEnd=1 other=3 otherT=0.5 otherIndex=2 windSum=1 windValue=1 oppValue=0
1908activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
1909findNextOp simple
1910markDoneBinary id=2 (3,2 0,2) t=0.333333333 [4] (2,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1911bridgeOp current id=2 from=(2,2) to=(0,2)
1912findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
1913debugShowSort [2] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.302178051 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
1914debugShowSort [3] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.447821962 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=1
1915debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.302178051 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
1916debugShowSort [1] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.447821962 tEnd=0.5 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1
1917findNextOp firstIndex=[2] sign=1
1918activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
1919activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1920markDoneBinary id=1 (0,2 2,3 5,1 3,2) t=0.302178051 [1] (1.92144883,2.25028419) tEnd=0.5 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
1921findNextOp chase.append id=1
1922activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1923markDoneBinary id=1 (0,2 2,3 5,1 3,2) t=0 [0] (0,2) tEnd=0.302178051 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1924findNextOp from:[1] to:[3] start=1 end=2
1925bridgeOp current id=1 from=(0,2) to=(1.92144883,2.25028419)
1926path.moveTo(2,2);
1927path.lineTo(0,2);
1928path.cubicTo(0.60435605,2.30217814, 1.30002379,2.33042121, 1.92144883,2.25028419);
1929findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1
1930debugShowSort [2] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=0.447821962 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1931debugShowSort [3] {{3,2}, {0,2}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
1932debugShowSort [0] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
1933debugShowSort [1] {{3,2}, {0,2}} tStart=0.333333333 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
1934findNextOp firstIndex=[2] sign=1
1935activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
1936activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1937activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
1938markDoneBinary id=3 (1,5 2,3 2,0 3,2) t=0.447821962 [1] (1.92144883,2.25028419) tEnd=0.5 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1939findNextOp from:[3] to:[2] start=4 end=5
1940bridgeOp current id=3 from=(1.92144883,2.25028419) to=(2,2)
1941path.cubicTo(1.94782197,2.1619792, 1.97391093,2.0782671, 2,2);
1942path.close();
1943debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0 (1,5) tEnd=0.447821962 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
1944debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=1 other=3 otherT=1 otherIndex=3 windSum=-1 windValue=1 oppValue=0
1945debugShowActiveSpans id=1 (0,2 2,3 5,1 3,2) t=0.5 (3,2) tEnd=1 other=4 otherT=0 otherIndex=1 windSum=1 windValue=1 oppValue=0
1946activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
1947findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
1948debugShowSort [1] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
1949debugShowSort [2] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
1950debugShowSort [3] {{3,2}, {0,2}} tStart=0 tEnd=0.333333333 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
1951debugShowSort [4] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.5 tEnd=0.302178051 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
1952debugShowSort [5] {{3,2}, {1,5}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1
1953debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
1954findNextOp firstIndex=[1] sign=1
1955activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
1956activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
1957activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
1958activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
1959activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
1960markDoneBinary id=1 (0,2 2,3 5,1 3,2) t=0.5 [2] (3,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1961markDoneBinary id=1 (0,2 2,3 5,1 3,2) t=0.5 [3] (3,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1962markDoneBinary id=1 (0,2 2,3 5,1 3,2) t=0.5 [4] (3,2) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
1963findNextOp from:[1] to:[1] start=3 end=5
1964bridgeOp current id=1 from=(3,2) to=(3,2)
1965path.moveTo(3,2);
1966path.cubicTo(3.75,1.75, 4,1.5, 3,2);
1967path.close();
1968debugShowActiveSpans id=3 (1,5 2,3 2,0 3,2) t=0 (1,5) tEnd=0.447821962 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
1969debugShowActiveSpans id=4 (3,2 1,5) t=0 (3,2) tEnd=1 other=3 otherT=1 otherIndex=3 windSum=-1 windValue=1 oppValue=0
1970activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1971findNextOp simple
1972markDoneBinary id=4 (3,2 1,5) t=0 [0] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1973markDoneBinary id=4 (3,2 1,5) t=0 [1] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1974markDoneBinary id=4 (3,2 1,5) t=0 [2] (3,2) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1975markDoneBinary id=4 (3,2 1,5) t=0 [3] (3,2) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1976bridgeOp current id=4 from=(3,2) to=(1,5)
1977findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1
1978debugShowSort [3] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.447821962 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
1979debugShowSort [0] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.302178051 tEnd=0.5 sign=-1 windValue=1 windSum=1 1->2 (max=2) done=1 tiny=0 opp=1
1980debugShowSort [1] {{1,5}, {2,3}, {2,0}, {3,2}} tStart=0.447821962 tEnd=0.5 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
1981debugShowSort [2] {{0,2}, {2,3}, {5,1}, {3,2}} tStart=0.302178051 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1
1982findNextOp firstIndex=[3] sign=1
1983activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
1984activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
1985activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=0 result=0
1986markDoneBinary id=3 (1,5 2,3 2,0 3,2) t=0 [0] (1,5) tEnd=0.447821962 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
1987findNextOp from:[3] to:[3] start=1 end=2
1988bridgeOp current id=3 from=(1,5) to=(1.92144883,2.25028419)
1989path.moveTo(3,2);
1990path.lineTo(1,5);
1991path.cubicTo(1.44782197,4.10435629, 1.69509947,3.00816751, 1.92144883,2.25028419);
1992</div>
1993
1994<div id="cubicOp48da">
1995 {{0,2}, {2,3}, {5,1}, {3,2}},
1996
1997 {{0,2}, {0.796711951,2.36012932}, {1.63878124,2.27837338}},
1998 {{1.63878124,2.27837338}, {2.48085053,2.19661745}, {3.06246392,1.97878949}},
1999 {{3.06246392,1.97878949}, {3.64407731,1.76096154}, {3.65942155,1.71287481}},
2000 {{3.65942155,1.71287481}, {3.66835761,1.67480112}, {3,2}},
2001</div>
2002
2003<div id="cubicOp32d">
2004 SimplifyNew_Test [cubicOp32d]
2005{{0,1}, {1,2}, {6,0}, {3,1}},
2006{{3,1}, {0,1}},
2007op difference
2008{{0,6}, {1,3}, {1,0}, {2,1}},
2009{{2,1}, {0,6}},
2010insert t=0.5 pts roughly equal
2011insert t=0.5 pts roughly equal
2012insert t=0.5 pts roughly equal
2013debugShowCubicIntersection wtTs[0]=1 {{0,1}, {1,2}, {6,0}, {3,1}} {{3,1}} wtTs[1]=0.5
2014insert t=0.5 pts roughly equal
2015debugShowCubicLineIntersection wtTs[0]=0 {{0,1}, {1,2}, {6,0}, {3,1}} {{0,1}} wtTs[1]=0.5 {{3,1}} wtTs[2]=1 {{3,1}} wnTs[0]=1 {{3,1}, {0,1}} wnTs[1]=0 wnTs[2]=0
2016debugShowCubicIntersection wtTs[0]=0.235702334 {{0,1}, {1,2}, {6,0}, {3,1}} {{1.2166390977965289,1.2856741834504377}} wnTs[0]=0.640711 {{0,6}, {1,3}, {1,0}, {2,1}}
2017debugShowCubicLineIntersection wtTs[0]=0.336702456 {{0,1}, {1,2}, {6,0}, {3,1}} {{1.9124722896380537,1.2188192759048657}} wnTs[0]=0.0437639 {{2,1}, {0,6}}
2018debugShowCubicLineIntersection wtTs[0]=0.724744871 {{0,6}, {1,3}, {1,0}, {2,1}} {{1.359821149611685,1.0000000000000004}} wtTs[1]=1 {{2,1}} wnTs[0]=0.546726 {{3,1}, {0,1}} wnTs[1]=0.333333333
2019debugShowLineIntersection wtTs[0]=0 {{3,1}, {0,1}} {{2,1}} wnTs[0]=0.333333 {{2,1}, {0,6}}
2020debugShowCubicIntersection no self intersect {{0,6}, {1,3}, {1,0}, {2,1}}
2021debugShowCubicLineIntersection wtTs[0]=0 {{0,6}, {1,3}, {1,0}, {2,1}} {{0,6}} wtTs[1]=1 {{2,1}} wnTs[0]=1 {{2,1}, {0,6}} wnTs[1]=0
2022debugShowActiveSpans id=1 (0,1 1,2 6,0 3,1) t=0 (0,1) tEnd=0.235702334 other=2 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
2023debugShowActiveSpans id=1 (0,1 1,2 6,0 3,1) t=0.235702334 (1.21663904,1.28567421) tEnd=0.336702456 other=3 otherT=0.640711351 otherIndex=1 windSum=? windValue=1 oppValue=0
2024debugShowActiveSpans id=1 (0,1 1,2 6,0 3,1) t=0.336702456 (1.91247225,1.21881926) tEnd=0.5 other=4 otherT=0.0437638552 otherIndex=2 windSum=? windValue=1 oppValue=0
2025</div>
2026
2027<div id="cubicOp48db">
2028computed quadratics given
2029 {{0,2}, {2,3}, {5,1}, {3,2}},
2030 {{1,5}, {2,3}, {2,0}, {3,2}},
2031computed quadratics set 1
2032 {{0,2}, {0.796711951,2.36012932}, {1.63878124,2.27837338}},
2033 {{1.63878124,2.27837338}, {2.48085053,2.19661745}, {3.06246392,1.97878949}},
2034 {{3.06246392,1.97878949}, {3.64407731,1.76096154}, {3.65942155,1.71287481}},
2035 {{3.65942155,1.71287481}, {3.66835761,1.67480112}, {3,2}},
2036computed quadratics set 2
2037 {{1,5}, {1.50173477,3.89061296}, {1.76597918,2.79793753}},
2038 {{1.76597918,2.79793753}, {2.0153684,1.78464605}, {2.27205088,1.42969352}},
2039 {{2.27205088,1.42969352}, {2.52873337,1.07474099}, {3,2}},
2040</div>
2041
2042<div id="cubicOp48dc">
2043 {{1.63878124,2.27837338}, {2.48085053,2.19661745}, {3.06246392,1.97878949}},
2044 {{2.27205088,1.42969352}, {2.52873337,1.07474099}, {3,2}},
2045</div>
2046
2047<div id="cubicOp49d">
2048 SimplifyNew_Test [cubicOp49d]
2049{{0,2}, {1,5}, {3,2}, {4,1}},
2050{{4,1}, {0,2}},
2051op difference
2052{{2,3}, {1,4}, {2,0}, {5,1}},
2053{{5,1}, {2,3}},
2054debugShowCubicIntersection no self intersect {{2,3}, {1,4}, {2,0}, {5,1}}
2055debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {1,4}, {2,0}, {5,1}} {{2,3}} wtTs[1]=1 {{5,1}} wnTs[0]=1 {{5,1}, {2,3}} wnTs[1]=0
2056debugShowCubicIntersection wtTs[0]=1.74609417e-09 {{2,3}, {1,4}, {2,0}, {5,1}} {{1.9999999947617175,3.0000000052382827}} wtTs[1]=0.122781788 {{1.7221068406383582,3.1607246577308117}} wnTs[0]=0.5 {{0,2}, {1,5}, {3,2}, {4,1}} wnTs[1]=0.438140761
2057debugShowCubicLineIntersection wtTs[0]=0.651913155 {{2,3}, {1,4}, {2,0}, {5,1}} {{2.5942051033446676,1.3514487241638331}} wnTs[0]=0.351449 {{4,1}, {0,2}}
2058debugShowCubicLineIntersection wtTs[0]=0.5 {{0,2}, {1,5}, {3,2}, {4,1}} {{2,3}} wnTs[0]=1 {{5,1}, {2,3}}
2059debugShowLineIntersection no intersect {{5,1}, {2,3}} {{4,1}, {0,2}}
2060debugShowCubicIntersection no self intersect {{0,2}, {1,5}, {3,2}, {4,1}}
2061debugShowCubicLineIntersection wtTs[0]=0 {{0,2}, {1,5}, {3,2}, {4,1}} {{0,2}} wtTs[1]=1 {{4,1}} wnTs[0]=1 {{4,1}, {0,2}} wnTs[1]=0
2062debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 (2,3) tEnd=0.122781788 other=1 otherT=0.499999999 otherIndex=2 windSum=? windValue=1 oppValue=0
2063debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=0.122781788 (1.72210681,3.16072464) tEnd=0.651913155 other=1 otherT=0.438140761 otherIndex=1 windSum=? windValue=1 oppValue=0
2064debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=0.651913155 (2.59420514,1.35144877) tEnd=1 other=2 otherT=0.351448724 otherIndex=1 windSum=? windValue=1 oppValue=0
2065debugShowActiveSpans id=4 (5,1 2,3) t=0 (5,1) tEnd=1 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2066debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0 (0,2) tEnd=0.438140761 other=2 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
2067debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0.438140761 (1.72210681,3.16072464) tEnd=0.499999999 other=3 otherT=0.122781788 otherIndex=2 windSum=? windValue=1 oppValue=0
2068debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
2069debugShowActiveSpans id=2 (4,1 0,2) t=0 (4,1) tEnd=0.351448724 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2070debugShowActiveSpans id=2 (4,1 0,2) t=0.351448724 (2.59420514,1.35144877) tEnd=1 other=3 otherT=0.651913155 otherIndex=3 windSum=? windValue=1 oppValue=0
2071findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
2072debugShowSort [1] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.122781788 tEnd=0.651913155 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
2073debugShowSort [2] {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.438140761 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
2074debugShowSort [3] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.122781788 tEnd=1.74609417e-09 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
2075debugShowSort [0] {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.438140761 tEnd=0.499999999 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
2076findTop swap
2077markWinding id=3 (2,3 1,4 2,0 5,1) t=0.122781788 [2] (1.72210681,3.16072464) tEnd=0.651913155 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
2078markWinding id=3 (2,3 1,4 2,0 5,1) t=0.122781788 [2] (1.72210681,3.16072464) tEnd=0.651913155 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2079activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2080markDoneBinary id=3 (2,3 1,4 2,0 5,1) t=0.122781788 [2] (1.72210681,3.16072464) tEnd=0.651913155 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2081findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1
2082debugShowSort [0] {{4,1}, {0,2}} tStart=0.351448724 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
2083debugShowSort [1] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
2084debugShowSort [2] {{4,1}, {0,2}} tStart=0.351448724 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
2085debugShowSort [3] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=0.122781788 sign=1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1
2086findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
2087debugShowSort [3] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=0.122781788 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
2088debugShowSort [0] {{4,1}, {0,2}} tStart=0.351448724 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
2089debugShowSort [1] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2090debugShowSort [2] {{4,1}, {0,2}} tStart=0.351448724 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
2091markWinding id=2 (4,1 0,2) t=0 [0] (4,1) tEnd=0.351448724 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
2092markWinding id=1 (0,2 1,5 3,2 4,1) t=0.5 [3] (2,3) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
2093markWinding id=3 (2,3 1,4 2,0 5,1) t=0.651913155 [3] (2.59420514,1.35144877) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
2094markWinding id=4 (5,1 2,3) t=0 [0] (5,1) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
2095markWinding id=2 (4,1 0,2) t=0.351448724 [1] (2.59420514,1.35144877) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
2096markWinding id=1 (0,2 1,5 3,2 4,1) t=0 [0] (0,2) tEnd=0.438140761 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
2097debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 (2,3) tEnd=0.122781788 other=1 otherT=0.499999999 otherIndex=2 windSum=? windValue=1 oppValue=0
2098debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=0.651913155 (2.59420514,1.35144877) tEnd=1 other=2 otherT=0.351448724 otherIndex=1 windSum=-1 windValue=1 oppValue=0
2099debugShowActiveSpans id=4 (5,1 2,3) t=0 (5,1) tEnd=1 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2100debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0 (0,2) tEnd=0.438140761 other=2 otherT=1 otherIndex=2 windSum=-1 windValue=1 oppValue=0
2101debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0.438140761 (1.72210681,3.16072464) tEnd=0.499999999 other=3 otherT=0.122781788 otherIndex=2 windSum=? windValue=1 oppValue=0
2102debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0.5 (2,3) tEnd=1 other=4 otherT=1 otherIndex=2 windSum=-1 windValue=1 oppValue=0
2103debugShowActiveSpans id=2 (4,1 0,2) t=0 (4,1) tEnd=0.351448724 other=1 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2104debugShowActiveSpans id=2 (4,1 0,2) t=0.351448724 (2.59420514,1.35144877) tEnd=1 other=3 otherT=0.651913155 otherIndex=3 windSum=-1 windValue=1 oppValue=0
2105activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
2106markDoneBinary id=2 (4,1 0,2) t=0 [0] (4,1) tEnd=0.351448724 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
2107markDoneBinary id=1 (0,2 1,5 3,2 4,1) t=0.5 [3] (2,3) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
2108setSpans unsortable [1] (2,3) [2] (1.72210681,3.16072464)
2109debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 (2,3) tEnd=0.122781788 other=1 otherT=0.499999999 otherIndex=2 windSum=? windValue=1 oppValue=0
2110debugShowActiveSpans id=3 (2,3 1,4 2,0 5,1) t=0.651913155 (2.59420514,1.35144877) tEnd=1 other=2 otherT=0.351448724 otherIndex=1 windSum=-1 windValue=1 oppValue=0
2111debugShowActiveSpans id=4 (5,1 2,3) t=0 (5,1) tEnd=1 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2112debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0 (0,2) tEnd=0.438140761 other=2 otherT=1 otherIndex=2 windSum=-1 windValue=1 oppValue=0
2113debugShowActiveSpans id=1 (0,2 1,5 3,2 4,1) t=0.438140761 (1.72210681,3.16072464) tEnd=0.499999999 other=3 otherT=0.122781788 otherIndex=2 windSum=? windValue=1 oppValue=0
2114debugShowActiveSpans id=2 (4,1 0,2) t=0.351448724 (2.59420514,1.35144877) tEnd=1 other=3 otherT=0.651913155 otherIndex=3 windSum=-1 windValue=1 oppValue=0
2115activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2116findNextOp simple
2117markDoneBinary id=4 (5,1 2,3) t=0 [0] (5,1) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
2118bridgeOp current id=4 from=(2,3) to=(5,1)
2119findNextOp debugShowSort contourWinding=-1 oppContourWinding=-1 sign=-1
2120debugShowSort [1] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
2121debugShowSort [2] {{4,1}, {0,2}} tStart=0.351448724 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=1
2122debugShowSort [3] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.651913155 tEnd=0.122781788 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
2123debugShowSort [0] {{4,1}, {0,2}} tStart=0.351448724 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
2124findNextOp firstIndex=[1] sign=-1
2125activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2126activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
2127activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
2128markDoneBinary id=3 (2,3 1,4 2,0 5,1) t=0.651913155 [3] (2.59420514,1.35144877) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
2129findNextOp from:[3] to:[2] start=1 end=2
2130bridgeOp current id=3 from=(5,1) to=(2.59420514,1.35144877)
2131path.moveTo(2,3);
2132path.lineTo(5,1);
2133path.cubicTo(3.9557395,0.651913166, 3.15380788,0.909648538, 2.59420514,1.35144877);
2134findNextOp simple
2135markDoneBinary id=2 (4,1 0,2) t=0.351448724 [1] (2.59420514,1.35144877) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2136bridgeOp current id=2 from=(2.59420514,1.35144877) to=(0,2)
2137findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
2138debugShowSort [2] {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.438140761 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
2139debugShowSort [3] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.122781788 tEnd=1.74609417e-09 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
2140debugShowSort [0] {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.438140761 tEnd=0.499999999 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2141debugShowSort [1] {{2,3}, {1,4}, {2,0}, {5,1}} tStart=0.122781788 tEnd=0.651913155 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
2142findNextOp firstIndex=[2] sign=1
2143activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2144markWinding id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 [1] (2,3) tEnd=0.122781788 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
2145findNextOp chase.append id=3
2146activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
2147markDoneBinary id=1 (0,2 1,5 3,2 4,1) t=0.438140761 [1] (1.72210681,3.16072464) tEnd=0.499999999 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
2148findNextOp chase.append id=1
2149activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2150markDoneBinary id=1 (0,2 1,5 3,2 4,1) t=0 [0] (0,2) tEnd=0.438140761 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2151findNextOp from:[1] to:[3] start=2 end=1
2152bridgeOp current id=1 from=(0,2) to=(1.72210681,3.16072464)
2153path.lineTo(0,2);
2154path.cubicTo(0.43814075,3.31442237, 1.06824887,3.47704053, 1.72210681,3.16072464);
2155setSpans unsortable [1] (2,3) [2] (1.72210681,3.16072464)
2156setSpans all tiny unsortable [2] (2,3) [1] (1.72210681,3.16072464)
2157markUnsortable id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 [1] (2,3) tEnd=0.122781788 newWindSum=0 windSum=-1 windValue=1
2158markUnsortable id=3 (2,3 1,4 2,0 5,1) t=0 [0] (2,3) tEnd=1.74609417e-09 newWindSum=0 windSum=? windValue=1
2159markUnsortable id=1 (0,2 1,5 3,2 4,1) t=0.499999999 [2] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1
2160markUnsortable id=1 (0,2 1,5 3,2 4,1) t=0.438140761 [1] (1.72210681,3.16072464) tEnd=0.499999999 newWindSum=0 windSum=-1 windValue=1
2161findNextOp debugShowSort contourWinding=-1 oppContourWinding=-1 sign=-1
2162debugShowSort [0] *** UNSORTABLE *** {{2,3}, {1,4}, {2,0}, {5,1}} tStart=1.74609417e-09 tEnd=0.122781788 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
2163debugShowSort [1] *** UNSORTABLE *** {{2,3}, {1,4}, {2,0}, {5,1}} tStart=1.74609417e-09 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=1 tiny=1 opp=0
2164debugShowSort [2] *** UNSORTABLE *** {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.499999999 tEnd=0.5 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=1 tiny=1 opp=1
2165debugShowSort [3] *** UNSORTABLE *** {{0,2}, {1,5}, {3,2}, {4,1}} tStart=0.499999999 tEnd=0.438140761 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=1
2166path.cubicTo(1.78458714,3.17018676, 1.87721825,3.12278175, 2,3);
2167markDoneBinary id=3 (2,3 1,4 2,0 5,1) t=1.74609417e-09 [1] (2,3) tEnd=0.122781788 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
2168path.close();
2169setSpans all tiny unsortable [2] (2,3) [1] (1.72210681,3.16072464)
2170setSpans unsortable [1] (2,3) [2] (1.72210681,3.16072464)
2171setSpans unsortable [1] (2,3) [2] (1.72210681,3.16072464)
2172setSpans all tiny unsortable [2] (2,3) [1] (1.72210681,3.16072464)
2173setSpans unsortable [1] (2,3) [2] (1.72210681,3.16072464)
2174assemble
2175assemble contour start=(2,3) end=(2,3)
2176</div>
2177
2178<div id="cubicOp50d">
2179 SimplifyNew_Test [cubicOp50d]
2180{{0,3}, {1,6}, {5,0}, {5,1}},
2181{{5,1}, {0,3}},
2182op difference
2183{{0,5}, {1,5}, {3,0}, {6,1}},
2184{{6,1}, {0,5}},
2185debugShowCubicIntersection no self intersect {{0,5}, {1,5}, {3,0}, {6,1}}
2186debugShowCubicLineIntersection wtTs[0]=0 {{0,5}, {1,5}, {3,0}, {6,1}} {{0,5}} wtTs[1]=0.181818182 {{0.64462809917355357,4.5702479338842981}} wtTs[2]=1 {{6,1}} wnTs[0]=1 {{6,1}, {0,5}} wnTs[1]=0.892561983 wnTs[2]=0
2187debugShowCubicIntersection wtTs[0]=0.326064989 {{0,5}, {1,5}, {3,0}, {6,1}} {{1.2971500960309803,3.7865580517965118}} wnTs[0]=0.265062 {{0,3}, {1,6}, {5,0}, {5,1}}
2188debugShowCubicLineIntersection wtTs[0]=0.639696212 {{0,5}, {1,5}, {3,0}, {6,1}} {{3.1467223651509295,1.7413110539396279}} wnTs[0]=0.370656 {{5,1}, {0,3}}
2189debugShowCubicLineIntersection no intersect {{0,3}, {1,6}, {5,0}, {5,1}} {{6,1}, {0,5}}
2190debugShowLineIntersection no intersect {{6,1}, {0,5}} {{5,1}, {0,3}}
2191debugShowCubicIntersection no self intersect {{0,3}, {1,6}, {5,0}, {5,1}}
2192debugShowCubicLineIntersection wtTs[0]=0 {{0,3}, {1,6}, {5,0}, {5,1}} {{0,3}} wtTs[1]=0.772727273 {{4.4623403456048081,1.2150638617580767}} wtTs[2]=1 {{5,1}} wnTs[0]=1 {{5,1}, {0,3}} wnTs[1]=0.107531931 wnTs[2]=0
2193debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0 (0,5) tEnd=0.181818182 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
2194debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.181818182 (0.644628108,4.57024813) tEnd=0.326064989 other=4 otherT=0.892561983 otherIndex=1 windSum=? windValue=1 oppValue=0
2195debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.326064989 (1.29715014,3.78655815) tEnd=0.639696212 other=1 otherT=0.26506234 otherIndex=1 windSum=? windValue=1 oppValue=0
2196debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.639696212 (3.14672232,1.74131107) tEnd=1 other=2 otherT=0.370655527 otherIndex=2 windSum=? windValue=1 oppValue=0
2197debugShowActiveSpans id=4 (6,1 0,5) t=0 (6,1) tEnd=0.892561983 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2198debugShowActiveSpans id=4 (6,1 0,5) t=0.892561983 (0.644628108,4.57024813) tEnd=1 other=3 otherT=0.181818182 otherIndex=1 windSum=? windValue=1 oppValue=0
2199debugShowActiveSpans id=1 (0,3 1,6 5,0 5,1) t=0 (0,3) tEnd=0.26506234 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2200debugShowActiveSpans id=1 (0,3 1,6 5,0 5,1) t=0.26506234 (1.29715014,3.78655815) tEnd=0.772727273 other=3 otherT=0.326064989 otherIndex=2 windSum=? windValue=1 oppValue=0
2201debugShowActiveSpans id=1 (0,3 1,6 5,0 5,1) t=0.772727273 (4.46234035,1.21506381) tEnd=1 other=2 otherT=0.107531931 otherIndex=1 windSum=? windValue=1 oppValue=0
2202debugShowActiveSpans id=2 (5,1 0,3) t=0 (5,1) tEnd=0.107531931 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2203debugShowActiveSpans id=2 (5,1 0,3) t=0.107531931 (4.46234035,1.21506381) tEnd=0.370655527 other=1 otherT=0.772727273 otherIndex=2 windSum=? windValue=1 oppValue=0
2204debugShowActiveSpans id=2 (5,1 0,3) t=0.370655527 (3.14672232,1.74131107) tEnd=1 other=3 otherT=0.639696212 otherIndex=3 windSum=? windValue=1 oppValue=0
2205findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
2206debugShowSort [0] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=1 tEnd=0.772727273 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
2207debugShowSort [1] {{5,1}, {0,3}} tStart=0 tEnd=0.107531931 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2208markWinding id=1 (0,3 1,6 5,0 5,1) t=0.772727273 [2] (4.46234035,1.21506381) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
2209markWinding id=2 (5,1 0,3) t=0 [0] (5,1) tEnd=0.107531931 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
2210markWinding id=1 (0,3 1,6 5,0 5,1) t=0.772727273 [2] (4.46234035,1.21506381) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2211activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2212findNextOp simple
2213markDoneBinary id=1 (0,3 1,6 5,0 5,1) t=0.772727273 [2] (4.46234035,1.21506381) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2214bridgeOp current id=1 from=(4.46234035,1.21506381) to=(5,1)
2215path.moveTo(4.46234035,1.21506381);
2216path.cubicTo(4.79338837,0.90702486, 5,0.772727251, 5,1);
2217findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
2218debugShowSort [0] {{5,1}, {0,3}} tStart=0.107531931 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
2219debugShowSort [1] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.772727273 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
2220debugShowSort [2] {{5,1}, {0,3}} tStart=0.107531931 tEnd=0.370655527 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
2221debugShowSort [3] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.772727273 tEnd=0.26506234 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
2222findNextOp firstIndex=[0] sign=1
2223activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2224activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2225markWinding id=2 (5,1 0,3) t=0.107531931 [1] (4.46234035,1.21506381) tEnd=0.370655527 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2226findNextOp chase.append id=2
2227activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2228markWinding id=1 (0,3 1,6 5,0 5,1) t=0.26506234 [1] (1.29715014,3.78655815) tEnd=0.772727273 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2229findNextOp chase.append id=1
2230markDoneBinary id=2 (5,1 0,3) t=0 [0] (5,1) tEnd=0.107531931 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2231findNextOp from:[2] to:[1] start=2 end=1
2232bridgeOp current id=2 from=(5,1) to=(4.46234035,1.21506381)
2233path.lineTo(4.46234035,1.21506381);
2234path.close();
2235debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0 (0,5) tEnd=0.181818182 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
2236debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.181818182 (0.644628108,4.57024813) tEnd=0.326064989 other=4 otherT=0.892561983 otherIndex=1 windSum=? windValue=1 oppValue=0
2237debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.326064989 (1.29715014,3.78655815) tEnd=0.639696212 other=1 otherT=0.26506234 otherIndex=1 windSum=? windValue=1 oppValue=0
2238debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0.639696212 (3.14672232,1.74131107) tEnd=1 other=2 otherT=0.370655527 otherIndex=2 windSum=? windValue=1 oppValue=0
2239debugShowActiveSpans id=4 (6,1 0,5) t=0 (6,1) tEnd=0.892561983 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2240debugShowActiveSpans id=4 (6,1 0,5) t=0.892561983 (0.644628108,4.57024813) tEnd=1 other=3 otherT=0.181818182 otherIndex=1 windSum=? windValue=1 oppValue=0
2241debugShowActiveSpans id=1 (0,3 1,6 5,0 5,1) t=0 (0,3) tEnd=0.26506234 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2242debugShowActiveSpans id=1 (0,3 1,6 5,0 5,1) t=0.26506234 (1.29715014,3.78655815) tEnd=0.772727273 other=3 otherT=0.326064989 otherIndex=2 windSum=1 windValue=1 oppValue=0
2243debugShowActiveSpans id=2 (5,1 0,3) t=0.107531931 (4.46234035,1.21506381) tEnd=0.370655527 other=1 otherT=0.772727273 otherIndex=2 windSum=1 windValue=1 oppValue=0
2244debugShowActiveSpans id=2 (5,1 0,3) t=0.370655527 (3.14672232,1.74131107) tEnd=1 other=3 otherT=0.639696212 otherIndex=3 windSum=? windValue=1 oppValue=0
2245activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2246findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
2247debugShowSort [3] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.772727273 tEnd=0.26506234 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
2248debugShowSort [0] {{5,1}, {0,3}} tStart=0.107531931 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
2249debugShowSort [1] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.772727273 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
2250debugShowSort [2] {{5,1}, {0,3}} tStart=0.107531931 tEnd=0.370655527 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
2251findNextOp firstIndex=[3] sign=1
2252activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2253activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2254activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2255markDoneBinary id=1 (0,3 1,6 5,0 5,1) t=0.26506234 [1] (1.29715014,3.78655815) tEnd=0.772727273 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2256findNextOp from:[1] to:[2] start=1 end=2
2257bridgeOp current id=1 from=(1.29715014,3.78655815) to=(4.46234035,1.21506381)
2258path.moveTo(1.29715014,3.78655815);
2259path.cubicTo(2.36251926,3.45810199, 3.72286963,1.90313876, 4.46234035,1.21506381);
2260findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
2261debugShowSort [0] {{5,1}, {0,3}} tStart=0.370655527 tEnd=0.107531931 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
2262debugShowSort [1] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.639696212 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
2263debugShowSort [2] {{5,1}, {0,3}} tStart=0.370655527 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
2264debugShowSort [3] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.639696212 tEnd=0.326064989 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
2265findNextOp firstIndex=[0] sign=1
2266activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
2267markDoneBinary id=3 (0,5 1,5 3,0 6,1) t=0.639696212 [3] (3.14672232,1.74131107) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2268markDoneBinary id=4 (6,1 0,5) t=0 [0] (6,1) tEnd=0.892561983 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2269findNextOp chase.append id=4
2270activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
2271markDoneBinary id=2 (5,1 0,3) t=0.370655527 [2] (3.14672232,1.74131107) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2272markDoneBinary id=1 (0,3 1,6 5,0 5,1) t=0 [0] (0,3) tEnd=0.26506234 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2273findNextOp chase.append id=1
2274activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
2275markWinding id=3 (0,5 1,5 3,0 6,1) t=0.326064989 [2] (1.29715014,3.78655815) tEnd=0.639696212 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2276findNextOp chase.append id=3
2277markDoneBinary id=2 (5,1 0,3) t=0.107531931 [1] (4.46234035,1.21506381) tEnd=0.370655527 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2278findNextOp from:[2] to:[3] start=3 end=2
2279bridgeOp current id=2 from=(4.46234035,1.21506381) to=(3.14672232,1.74131107)
2280findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=-1
2281debugShowSort [1] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.326064989 tEnd=0.639696212 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
2282debugShowSort [2] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.26506234 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
2283debugShowSort [3] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.326064989 tEnd=0.181818182 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
2284debugShowSort [0] {{0,3}, {1,6}, {5,0}, {5,1}} tStart=0.26506234 tEnd=0.772727273 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
2285findNextOp firstIndex=[1] sign=-1
2286activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
2287activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2288markDoneBinary id=3 (0,5 1,5 3,0 6,1) t=0.181818182 [1] (0.644628108,4.57024813) tEnd=0.326064989 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2289findNextOp chase.append id=3
2290activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2291markDoneBinary id=3 (0,5 1,5 3,0 6,1) t=0.326064989 [2] (1.29715014,3.78655815) tEnd=0.639696212 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
2292findNextOp from:[3] to:[1] start=1 end=2
2293bridgeOp current id=3 from=(3.14672232,1.74131107) to=(1.29715014,3.78655815)
2294path.lineTo(3.14672232,1.74131107);
2295path.cubicTo(2.43183374,2.33584237, 1.81530964,3.13070869, 1.29715014,3.78655815);
2296path.close();
2297findChaseOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
2298debugShowSort [0] {{6,1}, {0,5}} tStart=0.892561983 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
2299debugShowSort [1] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.181818182 tEnd=0.326064989 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
2300debugShowSort [2] {{6,1}, {0,5}} tStart=0.892561983 tEnd=1 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=0
2301debugShowSort [3] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.181818182 tEnd=0 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0
2302findChaseOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
2303debugShowSort [0] {{6,1}, {0,5}} tStart=0.892561983 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
2304debugShowSort [1] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.181818182 tEnd=0.326064989 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
2305debugShowSort [2] {{6,1}, {0,5}} tStart=0.892561983 tEnd=1 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=0 tiny=0 opp=0
2306debugShowSort [3] {{0,5}, {1,5}, {3,0}, {6,1}} tStart=0.181818182 tEnd=0 sign=1 windValue=1 windSum=? 2->1 (max=2) done=0 tiny=0 opp=0
2307markWinding id=4 (6,1 0,5) t=0.892561983 [1] (0.644628108,4.57024813) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
2308markWinding id=3 (0,5 1,5 3,0 6,1) t=0 [0] (0,5) tEnd=0.181818182 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1
2309markWinding id=3 (0,5 1,5 3,0 6,1) t=0 [0] (0,5) tEnd=0.181818182 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1
2310debugShowActiveSpans id=3 (0,5 1,5 3,0 6,1) t=0 (0,5) tEnd=0.181818182 other=4 otherT=1 otherIndex=2 windSum=2 windValue=1 oppValue=0
2311debugShowActiveSpans id=4 (6,1 0,5) t=0.892561983 (0.644628108,4.57024813) tEnd=1 other=3 otherT=0.181818182 otherIndex=1 windSum=2 windValue=1 oppValue=0
2312activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=1 result=0
2313markDoneBinary id=4 (6,1 0,5) t=0.892561983 [1] (0.644628108,4.57024813) tEnd=1 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1
2314markDoneBinary id=3 (0,5 1,5 3,0 6,1) t=0 [0] (0,5) tEnd=0.181818182 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1
2315assemble
2316assemble contour start=(4.46234035,1.21506381) end=(4.46234035,1.21506381)
2317path.moveTo(4.46234035,1.21506381);
2318path.cubicTo(4.79338837,0.90702486, 5,0.772727251, 5,1);
2319path.lineTo(4.46234035,1.21506381);
2320path.close();
2321assemble contour start=(1.29715014,3.78655815) end=(1.29715014,3.78655815)
2322</div>
2323
2324<div id="cubicOp51d">
2325 SimplifyNew_Test [cubicOp51d]
2326{{0,3}, {1,2}, {4,1}, {6,0}},
2327{{6,0}, {0,3}},
2328op difference
2329{{1,4}, {0,6}, {3,0}, {2,1}},
2330{{2,1}, {1,4}},
2331debugShowCubicIntersection no self intersect {{0,3}, {1,2}, {4,1}, {6,0}}
2332debugShowCubicLineIntersection wtTs[0]=0 {{0,3}, {1,2}, {4,1}, {6,0}} {{0,3}} wtTs[1]=1 {{6,0}} wnTs[0]=1 {{6,0}, {0,3}} wnTs[1]=0
2333debugShowCubicIntersection wtTs[0]=0.397354824 {{0,3}, {1,2}, {4,1}, {6,0}} {{1.9511935265302276,1.8079355291007386}} wnTs[0]=0.661665 {{1,4}, {0,6}, {3,0}, {2,1}}
2334debugShowCubicLineIntersection wtTs[0]=0.355273081 {{0,3}, {1,2}, {4,1}, {6,0}} {{1.6886064138367243,1.9341807584898274}} wnTs[0]=0.311394 {{2,1}, {1,4}}
2335debugShowCubicLineIntersection wtTs[0]=0.6185225 {{1,4}, {0,6}, {3,0}, {2,1}} {{1.8422478636338226,2.0788760681830887}} wnTs[0]=0.692959 {{6,0}, {0,3}}
2336debugShowLineIntersection wtTs[0]=0.733333333 {{6,0}, {0,3}} {{1.6000000000000003,2.1999999999999997}} wnTs[0]=0.4 {{2,1}, {1,4}}
2337debugShowCubicIntersection no self intersect {{1,4}, {0,6}, {3,0}, {2,1}}
2338debugShowCubicLineIntersection wtTs[0]=0 {{1,4}, {0,6}, {3,0}, {2,1}} {{1,4}} wtTs[1]=0.333333333 {{1.0370370370370368,3.8888888888888897}} wtTs[2]=1 {{2,1}} wnTs[0]=1 {{2,1}, {1,4}} wnTs[1]=0.962962963 wnTs[2]=0
2339debugShowActiveSpans id=1 (0,3 1,2 4,1 6,0) t=0 (0,3) tEnd=0.355273081 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2340debugShowActiveSpans id=1 (0,3 1,2 4,1 6,0) t=0.355273081 (1.68860638,1.93418074) tEnd=0.397354824 other=4 otherT=0.311393586 otherIndex=1 windSum=? windValue=1 oppValue=0
2341debugShowActiveSpans id=1 (0,3 1,2 4,1 6,0) t=0.397354824 (1.95119357,1.80793548) tEnd=1 other=3 otherT=0.66166507 otherIndex=3 windSum=? windValue=1 oppValue=0
2342debugShowActiveSpans id=2 (6,0 0,3) t=0 (6,0) tEnd=0.692958689 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2343debugShowActiveSpans id=2 (6,0 0,3) t=0.692958689 (1.84224784,2.07887602) tEnd=0.733333333 other=3 otherT=0.6185225 otherIndex=2 windSum=? windValue=1 oppValue=0
2344debugShowActiveSpans id=2 (6,0 0,3) t=0.733333333 (1.60000002,2.20000005) tEnd=1 other=4 otherT=0.4 otherIndex=2 windSum=? windValue=1 oppValue=0
2345debugShowActiveSpans id=3 (1,4 0,6 3,0 2,1) t=0 (1,4) tEnd=0.333333333 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2346debugShowActiveSpans id=3 (1,4 0,6 3,0 2,1) t=0.333333333 (1.03703701,3.88888884) tEnd=0.6185225 other=4 otherT=0.962962963 otherIndex=3 windSum=? windValue=1 oppValue=0
2347debugShowActiveSpans id=3 (1,4 0,6 3,0 2,1) t=0.6185225 (1.84224784,2.07887602) tEnd=0.66166507 other=2 otherT=0.692958689 otherIndex=1 windSum=? windValue=1 oppValue=0
2348debugShowActiveSpans id=3 (1,4 0,6 3,0 2,1) t=0.66166507 (1.95119357,1.80793548) tEnd=1 other=1 otherT=0.397354824 otherIndex=2 windSum=? windValue=1 oppValue=0
2349debugShowActiveSpans id=4 (2,1 1,4) t=0 (2,1) tEnd=0.311393586 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2350debugShowActiveSpans id=4 (2,1 1,4) t=0.311393586 (1.68860638,1.93418074) tEnd=0.4 other=1 otherT=0.355273081 otherIndex=1 windSum=? windValue=1 oppValue=0
2351debugShowActiveSpans id=4 (2,1 1,4) t=0.4 (1.60000002,2.20000005) tEnd=0.962962963 other=2 otherT=0.733333333 otherIndex=2 windSum=? windValue=1 oppValue=0
2352debugShowActiveSpans id=4 (2,1 1,4) t=0.962962963 (1.03703701,3.88888884) tEnd=1 other=3 otherT=0.333333333 otherIndex=1 windSum=? windValue=1 oppValue=0
2353findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
2354debugShowSort [0] {{0,3}, {1,2}, {4,1}, {6,0}} tStart=1 tEnd=0.397354824 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
2355debugShowSort [1] {{6,0}, {0,3}} tStart=0 tEnd=0.692958689 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2356findTop swap
2357markWinding id=1 (0,3 1,2 4,1 6,0) t=0.397354824 [2] (1.95119357,1.80793548) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2358markWinding id=1 (0,3 1,2 4,1 6,0) t=0.397354824 [2] (1.95119357,1.80793548) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2359markWinding id=2 (6,0 0,3) t=0 [0] (6,0) tEnd=0.692958689 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2360activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2361findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
2362debugShowSort [0] {{0,3}, {1,2}, {4,1}, {6,0}} tStart=0.397354824 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
2363debugShowSort [1] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.66166507 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
2364debugShowSort [2] {{0,3}, {1,2}, {4,1}, {6,0}} tStart=0.397354824 tEnd=0.355273081 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
2365debugShowSort [3] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.66166507 tEnd=0.6185225 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
2366findNextOp firstIndex=[0] sign=-1
2367activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2368markWinding id=3 (1,4 0,6 3,0 2,1) t=0.66166507 [3] (1.95119357,1.80793548) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2369markWinding id=4 (2,1 1,4) t=0 [0] (2,1) tEnd=0.311393586 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2370findNextOp chase.append id=4
2371activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
2372markDoneBinary id=1 (0,3 1,2 4,1 6,0) t=0.355273081 [1] (1.68860638,1.93418074) tEnd=0.397354824 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2373findNextOp chase.append id=1
2374activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2375markDoneBinary id=3 (1,4 0,6 3,0 2,1) t=0.6185225 [2] (1.84224784,2.07887602) tEnd=0.66166507 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2376findNextOp chase.append id=3
2377markDoneBinary id=1 (0,3 1,2 4,1 6,0) t=0.397354824 [2] (1.95119357,1.80793548) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2378findNextOp from:[1] to:[3] start=3 end=4
2379bridgeOp current id=1 from=(6,0) to=(1.95119357,1.80793548)
2380path.moveTo(6,0);
2381path.cubicTo(4.79470968,0.602645159, 3.22623801,1.20529044, 1.95119357,1.80793548);
2382findNextOp simple
2383markDoneBinary id=3 (1,4 0,6 3,0 2,1) t=0.66166507 [3] (1.95119357,1.80793548) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
2384bridgeOp current id=3 from=(1.95119357,1.80793548) to=(2,1)
2385path.cubicTo(2.21878767,1.12462389, 2.33833504,0.661665022, 2,1);
2386findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1
2387debugShowSort [1] {{2,1}, {1,4}} tStart=0.311393586 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
2388debugShowSort [2] {{0,3}, {1,2}, {4,1}, {6,0}} tStart=0.355273081 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
2389debugShowSort [3] {{2,1}, {1,4}} tStart=0.311393586 tEnd=0.4 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
2390debugShowSort [0] {{0,3}, {1,2}, {4,1}, {6,0}} tStart=0.355273081 tEnd=0.397354824 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
2391findNextOp firstIndex=[1] sign=1
2392activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2393markWinding id=1 (0,3 1,2 4,1 6,0) t=0 [0] (0,3) tEnd=0.355273081 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2394markWinding id=2 (6,0 0,3) t=0.733333333 [2] (1.60000002,2.20000005) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2395findNextOp chase.append id=2
2396activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
2397markDoneBinary id=4 (2,1 1,4) t=0.311393586 [1] (1.68860638,1.93418074) tEnd=0.4 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2398findNextOp chase.append id=4
2399activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
2400markDoneBinary id=4 (2,1 1,4) t=0 [0] (2,1) tEnd=0.311393586 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
2401findNextOp from:[4] to:[1] start=1 end=0
2402bridgeOp current id=4 from=(2,1) to=(1.68860638,1.93418074)
2403findNextOp simple
2404markDoneBinary id=1 (0,3 1,2 4,1 6,0) t=0 [0] (0,3) tEnd=0.355273081 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2405bridgeOp current id=1 from=(1.68860638,1.93418074) to=(0,3)
2406path.lineTo(1.68860638,1.93418074);
2407path.cubicTo(0.962984085,2.28945374, 0.355273068,2.64472699, 0,3);
2408findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
2409debugShowSort [2] {{6,0}, {0,3}} tStart=0.733333333 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
2410debugShowSort [3] {{2,1}, {1,4}} tStart=0.4 tEnd=0.962962963 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
2411debugShowSort [0] {{6,0}, {0,3}} tStart=0.733333333 tEnd=0.692958689 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
2412debugShowSort [1] {{2,1}, {1,4}} tStart=0.4 tEnd=0.311393586 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
2413findNextOp firstIndex=[2] sign=-1
2414activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2415markWinding id=4 (2,1 1,4) t=0.4 [2] (1.60000002,2.20000005) tEnd=0.962962963 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2416findNextOp chase.append id=4
2417activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
2418markDoneBinary id=2 (6,0 0,3) t=0.692958689 [1] (1.84224784,2.07887602) tEnd=0.733333333 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2419findNextOp chase.append id=2
2420activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2421markDoneBinary id=2 (6,0 0,3) t=0.733333333 [2] (1.60000002,2.20000005) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2422findNextOp from:[2] to:[4] start=2 end=3
2423bridgeOp current id=2 from=(0,3) to=(1.60000002,2.20000005)
2424findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1
2425debugShowSort [1] {{2,1}, {1,4}} tStart=0.962962963 tEnd=0.4 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
2426debugShowSort [2] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
2427debugShowSort [3] {{2,1}, {1,4}} tStart=0.962962963 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2428debugShowSort [0] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.333333333 tEnd=0.6185225 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
2429findNextOp firstIndex=[1] sign=1
2430activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2431markWinding id=3 (1,4 0,6 3,0 2,1) t=0 [0] (1,4) tEnd=0.333333333 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
2432markWinding id=4 (2,1 1,4) t=0.962962963 [3] (1.03703701,3.88888884) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
2433findNextOp chase.append id=4
2434activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
2435activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2436markWinding id=3 (1,4 0,6 3,0 2,1) t=0.333333333 [1] (1.03703701,3.88888884) tEnd=0.6185225 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2437findNextOp chase.append id=3
2438markDoneBinary id=4 (2,1 1,4) t=0.4 [2] (1.60000002,2.20000005) tEnd=0.962962963 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
2439findNextOp from:[4] to:[3] start=1 end=0
2440bridgeOp current id=4 from=(1.60000002,2.20000005) to=(1.03703701,3.88888884)
2441path.lineTo(1.60000002,2.20000005);
2442findNextOp simple
2443markDoneBinary id=3 (1,4 0,6 3,0 2,1) t=0 [0] (1,4) tEnd=0.333333333 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
2444bridgeOp current id=3 from=(1.03703701,3.88888884) to=(1,4)
2445path.lineTo(1.03703701,3.88888884);
2446path.cubicTo(0.777777791,4.44444466, 0.666666687,4.66666651, 1,4);
2447findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
2448debugShowSort [3] {{2,1}, {1,4}} tStart=0.962962963 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
2449debugShowSort [0] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.333333333 tEnd=0.6185225 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
2450debugShowSort [1] {{2,1}, {1,4}} tStart=0.962962963 tEnd=0.4 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
2451debugShowSort [2] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.333333333 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
2452findNextOp firstIndex=[3] sign=-1
2453activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2454activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
2455activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2456markDoneBinary id=4 (2,1 1,4) t=0.962962963 [3] (1.03703701,3.88888884) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
2457findNextOp from:[4] to:[3] start=1 end=2
2458bridgeOp current id=4 from=(1,4) to=(1.03703701,3.88888884)
2459findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1
2460debugShowSort [3] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.6185225 tEnd=0.333333333 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
2461debugShowSort [0] {{6,0}, {0,3}} tStart=0.692958689 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=1
2462debugShowSort [1] {{1,4}, {0,6}, {3,0}, {2,1}} tStart=0.6185225 tEnd=0.66166507 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
2463debugShowSort [2] {{6,0}, {0,3}} tStart=0.692958689 tEnd=0.733333333 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
2464findNextOp firstIndex=[3] sign=1
2465activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2466activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
2467activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
2468markDoneBinary id=3 (1,4 0,6 3,0 2,1) t=0.333333333 [1] (1.03703701,3.88888884) tEnd=0.6185225 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
2469findNextOp from:[3] to:[2] start=1 end=0
2470bridgeOp current id=3 from=(1.03703701,3.88888884) to=(1.84224784,2.07887602)
2471path.lineTo(1.03703701,3.88888884);
2472path.cubicTo(1.25885081,3.41357374, 1.58910847,2.69425988, 1.84224784,2.07887602);
2473findNextOp simple
2474markDoneBinary id=2 (6,0 0,3) t=0 [0] (6,0) tEnd=0.692958689 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2475bridgeOp current id=2 from=(1.84224784,2.07887602) to=(6,0)
2476path.lineTo(6,0);
2477path.close();
2478assemble
2479assemble contour start=(6,0) end=(6,0)
2480</div>
2481
2482<div id="cubicOp51da">
2483$1 = {{x = 1.9511935265302274, y = 1.8079355291007388}, {x = 3.2262380859340407, y = 1.2052903527338259}, {x = 4.794709647266175, y = 0.60264517636691295}, {x = 6, y = 0}}
2484(gdb) p startEdge
2485$2 = {{x = 1.9511935265302274, y = 1.8079355291007388}, {x = 2.5538387028971403, y = 3.0829800885045522}}
2486(gdb) p endEdge
2487$3 = {{x = 6, y = 0}, {x = 5.3973548236330871, y = -1.205290352733825}}
2488</div>
2489
2490<div id="cubicOp52da">
2491$3 = {{fX = 2.625, fY = 2.25}, {fX = 2.25, fY = 1.25}, {fX = 2, fY = 0.5}, {fX = 2, fY = 1}}
2492</div>
2493
2494<div id="cubicOp52db">
2495$3 = {{x = 1.9511935265302274, y = 1.8079355291007388}, {x = 3.2262380859340407, y = 1.2052903527338259}, {x = 4.794709647266175, y = 0.60264517636691295}, {x = 6, y = 0}}
2496(gdb) p startEdge
2497$4 = {{x = 1.9511935265302274, y = 1.8079355291007388}, {x = 3.7591290556309662, y = 5.8567420025705115}}
2498(gdb) p endEdge
2499$5 = {{x = 6, y = 0}, {x = 7.8079355291007388, y = 4.0488064734697726}}
2500</div>
2501
2502<div id="cubicOp53d">
2503 SimplifyNew_Test [cubicOp53d]
2504{{0,3}, {1,2}, {5,3}, {2,1}},
2505{{2,1}, {0,3}},
2506op difference
2507{{3,5}, {1,2}, {3,0}, {2,1}},
2508{{2,1}, {3,5}},
2509debugShowCubicIntersection no self intersect {{3,5}, {1,2}, {3,0}, {2,1}}
2510debugShowCubicLineIntersection wtTs[0]=0 {{3,5}, {1,2}, {3,0}, {2,1}} {{3,5}} wtTs[1]=0.5 {{2.125,1.5}} wtTs[2]=1 {{2,1}} wnTs[0]=1 {{2,1}, {3,5}} wnTs[1]=0.125 wnTs[2]=0
2511debugShowCubicIntersection wtTs[0]=0.32953467 {{3,5}, {1,2}, {3,0}, {2,1}} {{2.0754128281547217,2.4315376490509659}} wtTs[1]=0.59235675 {{2.2015477442470841,1.1371488033015213}} wtTs[2]=1 {{2,1}} wnTs[0]=0.414081 {{0,3}, {1,2}, {5,3}, {2,1}} wnTs[1]=0.976311205 wnTs[2]=1
2512debugShowCubicLineIntersection wtTs[0]=1 {{3,5}, {1,2}, {3,0}, {2,1}} {{2,1}} wnTs[0]=0 {{2,1}, {0,3}}
2513debugShowCubicLineIntersection wtTs[0]=0.467845317 {{0,3}, {1,2}, {5,3}, {2,1}} {{2.3494328385891112,2.3977313543564462}} wtTs[1]=1 {{2,1}} wnTs[0]=0.349433 {{2,1}, {3,5}} wnTs[1]=0
2514debugShowLineIntersection wtTs[0]=-0 {{2,1}, {3,5}} {{2,1}} wnTs[0]=0 {{2,1}, {0,3}}
2515debugShowCubicIntersection no self intersect {{0,3}, {1,2}, {5,3}, {2,1}}
2516debugShowCubicLineIntersection wtTs[0]=0 {{0,3}, {1,2}, {5,3}, {2,1}} {{0,3}} wtTs[1]=1 {{2,1}} wnTs[0]=1 {{2,1}, {0,3}} wnTs[1]=0
2517debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0 (3,5) tEnd=0.32953467 other=4 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
2518debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.32953467 (2.07541275,2.43153763) tEnd=0.5 other=1 otherT=0.414080655 otherIndex=1 windSum=? windValue=1 oppValue=0
2519debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0
2520debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.59235675 (2.20154786,1.13714886) tEnd=1 other=1 otherT=0.976311205 otherIndex=3 windSum=? windValue=1 oppValue=0
2521debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2522debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
2523debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0
2524debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
2525debugShowActiveSpans id=4 (2,1 3,5) t=0.349432839 (2.34943295,2.3977313) tEnd=1 other=1 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0
2526debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0 (0,3) tEnd=0.414080655 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2527debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.414080655 (2.07541275,2.43153763) tEnd=0.467845317 other=3 otherT=0.32953467 otherIndex=1 windSum=? windValue=1 oppValue=0
2528debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0
2529debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=? windValue=1 oppValue=0
2530debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=3 otherT=1 otherIndex=6 windSum=? windValue=1 oppValue=0
2531debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=4 otherT=-0 otherIndex=2 windSum=? windValue=1 oppValue=0
2532debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=1 otherT=1 otherIndex=6 windSum=? windValue=1 oppValue=0
2533findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
2534debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=1 tEnd=0.59235675 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
2535debugShowSort [1] {{2,1}, {0,3}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
2536debugShowSort [2] {{2,1}, {3,5}} tStart=0 tEnd=0.125 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2537debugShowSort [3] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=1 tEnd=0.976311205 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
2538markWinding id=3 (3,5 1,2 3,0 2,1) t=0.59235675 [3] (2.20154786,1.13714886) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
2539markWinding id=3 (3,5 1,2 3,0 2,1) t=0.59235675 [3] (2.20154786,1.13714886) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2540activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2541markDoneBinary id=3 (3,5 1,2 3,0 2,1) t=0.59235675 [3] (2.20154786,1.13714886) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2542findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
2543debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=1 tEnd=0.59235675 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
2544debugShowSort [1] {{2,1}, {0,3}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
2545debugShowSort [2] {{2,1}, {3,5}} tStart=0 tEnd=0.125 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2546debugShowSort [3] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=1 tEnd=0.976311205 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
2547findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
2548debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=1 tEnd=0.59235675 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
2549debugShowSort [1] {{2,1}, {0,3}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
2550debugShowSort [2] {{2,1}, {3,5}} tStart=0 tEnd=0.125 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2551debugShowSort [3] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=1 tEnd=0.976311205 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
2552markWinding id=2 (2,1 0,3) t=0 [0] (2,1) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
2553markWinding id=2 (2,1 0,3) t=0 [1] (2,1) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
2554markWinding id=2 (2,1 0,3) t=0 [2] (2,1) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
2555markWinding id=1 (0,3 1,2 5,3 2,1) t=0 [0] (0,3) tEnd=0.414080655 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
2556markWinding id=4 (2,1 3,5) t=0 [0] (2,1) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
2557markWinding id=4 (2,1 3,5) t=0 [1] (2,1) tEnd=-0 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
2558markWinding id=4 (2,1 3,5) t=-0 [2] (2,1) tEnd=0.125 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
2559markWinding id=1 (0,3 1,2 5,3 2,1) t=0.976311205 [3] (2.20154786,1.13714886) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2560debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0 (3,5) tEnd=0.32953467 other=4 otherT=1 otherIndex=5 windSum=? windValue=1 oppValue=0
2561debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.32953467 (2.07541275,2.43153763) tEnd=0.5 other=1 otherT=0.414080655 otherIndex=1 windSum=? windValue=1 oppValue=0
2562debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0
2563debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2564debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
2565debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=-1 windValue=1 oppValue=0
2566debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
2567debugShowActiveSpans id=4 (2,1 3,5) t=0.349432839 (2.34943295,2.3977313) tEnd=1 other=1 otherT=0.467845317 otherIndex=2 windSum=? windValue=1 oppValue=0
2568debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0 (0,3) tEnd=0.414080655 other=2 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0
2569debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.414080655 (2.07541275,2.43153763) tEnd=0.467845317 other=3 otherT=0.32953467 otherIndex=1 windSum=? windValue=1 oppValue=0
2570debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0
2571debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=1 windValue=1 oppValue=0
2572debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=3 otherT=1 otherIndex=6 windSum=1 windValue=1 oppValue=0
2573debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=4 otherT=-0 otherIndex=2 windSum=1 windValue=1 oppValue=0
2574debugShowActiveSpans id=2 (2,1 0,3) t=0 (2,1) tEnd=1 other=1 otherT=1 otherIndex=6 windSum=1 windValue=1 oppValue=0
2575activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
2576markDoneBinary id=2 (2,1 0,3) t=0 [0] (2,1) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
2577markDoneBinary id=2 (2,1 0,3) t=0 [1] (2,1) tEnd=0 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
2578markDoneBinary id=2 (2,1 0,3) t=0 [2] (2,1) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
2579markDoneBinary id=1 (0,3 1,2 5,3 2,1) t=0 [0] (0,3) tEnd=0.414080655 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
2580findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1
2581debugShowSort [0] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.414080655 tEnd=0.467845317 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
2582debugShowSort [1] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.32953467 tEnd=0.5 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
2583debugShowSort [2] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.414080655 tEnd=0 sign=1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=0
2584debugShowSort [3] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.32953467 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
2585findChaseOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1
2586debugShowSort [2] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.414080655 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
2587debugShowSort [3] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.32953467 tEnd=0 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=1
2588debugShowSort [0] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.414080655 tEnd=0.467845317 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
2589debugShowSort [1] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.32953467 tEnd=0.5 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=1
2590markWinding id=3 (3,5 1,2 3,0 2,1) t=0 [0] (3,5) tEnd=0.32953467 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1
2591markWinding id=4 (2,1 3,5) t=0.349432839 [4] (2.34943295,2.3977313) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1
2592markWinding id=1 (0,3 1,2 5,3 2,1) t=0.414080655 [1] (2.07541275,2.43153763) tEnd=0.467845317 newWindSum=1 newOppSum=-2 oppSum=? windSum=? windValue=1
2593markWinding id=3 (3,5 1,2 3,0 2,1) t=0.32953467 [1] (2.07541275,2.43153763) tEnd=0.5 newWindSum=-2 newOppSum=1 oppSum=? windSum=? windValue=1
2594debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0 (3,5) tEnd=0.32953467 other=4 otherT=1 otherIndex=5 windSum=-2 windValue=1 oppValue=0
2595debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.32953467 (2.07541275,2.43153763) tEnd=0.5 other=1 otherT=0.414080655 otherIndex=1 windSum=-2 windValue=1 oppValue=0
2596debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0
2597debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2598debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
2599debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=-1 windValue=1 oppValue=0
2600debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
2601debugShowActiveSpans id=4 (2,1 3,5) t=0.349432839 (2.34943295,2.3977313) tEnd=1 other=1 otherT=0.467845317 otherIndex=2 windSum=-2 windValue=1 oppValue=0
2602debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.414080655 (2.07541275,2.43153763) tEnd=0.467845317 other=3 otherT=0.32953467 otherIndex=1 windSum=1 windValue=1 oppValue=0
2603debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0
2604debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=1 windValue=1 oppValue=0
2605activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=1 result=0
2606markDoneBinary id=3 (3,5 1,2 3,0 2,1) t=0 [0] (3,5) tEnd=0.32953467 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1
2607markDoneBinary id=4 (2,1 3,5) t=0.349432839 [4] (2.34943295,2.3977313) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1
2608debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.32953467 (2.07541275,2.43153763) tEnd=0.5 other=1 otherT=0.414080655 otherIndex=1 windSum=-2 windValue=1 oppValue=0
2609debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0
2610debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2611debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
2612debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=-1 windValue=1 oppValue=0
2613debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
2614debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.414080655 (2.07541275,2.43153763) tEnd=0.467845317 other=3 otherT=0.32953467 otherIndex=1 windSum=1 windValue=1 oppValue=0
2615debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0
2616debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=1 windValue=1 oppValue=0
2617activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
2618markDoneBinary id=1 (0,3 1,2 5,3 2,1) t=0.414080655 [1] (2.07541275,2.43153763) tEnd=0.467845317 newWindSum=1 newOppSum=-2 oppSum=-2 windSum=1 windValue=1
2619debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.32953467 (2.07541275,2.43153763) tEnd=0.5 other=1 otherT=0.414080655 otherIndex=1 windSum=-2 windValue=1 oppValue=0
2620debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0
2621debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2622debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
2623debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=-1 windValue=1 oppValue=0
2624debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
2625debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0
2626debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=1 windValue=1 oppValue=0
2627activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
2628markDoneBinary id=3 (3,5 1,2 3,0 2,1) t=0.32953467 [1] (2.07541275,2.43153763) tEnd=0.5 newWindSum=-2 newOppSum=1 oppSum=1 windSum=-2 windValue=1
2629debugShowActiveSpans id=3 (3,5 1,2 3,0 2,1) t=0.5 (2.125,1.5) tEnd=0.59235675 other=4 otherT=0.125 otherIndex=3 windSum=? windValue=1 oppValue=0
2630debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=3 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2631debugShowActiveSpans id=4 (2,1 3,5) t=0 (2,1) tEnd=0.125 other=1 otherT=1 otherIndex=5 windSum=-1 windValue=1 oppValue=0
2632debugShowActiveSpans id=4 (2,1 3,5) t=-0 (2,1) tEnd=0.125 other=2 otherT=0 otherIndex=1 windSum=-1 windValue=1 oppValue=0
2633debugShowActiveSpans id=4 (2,1 3,5) t=0.125 (2.125,1.5) tEnd=0.349432839 other=3 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
2634debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.467845317 (2.34943295,2.3977313) tEnd=0.976311205 other=4 otherT=0.349432839 otherIndex=4 windSum=? windValue=1 oppValue=0
2635debugShowActiveSpans id=1 (0,3 1,2 5,3 2,1) t=0.976311205 (2.20154786,1.13714886) tEnd=1 other=3 otherT=0.59235675 otherIndex=3 windSum=1 windValue=1 oppValue=0
2636activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2637findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
2638debugShowSort [2] {{2,1}, {3,5}} tStart=-0 tEnd=0.125 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
2639debugShowSort [3] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=1 tEnd=0.976311205 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=1
2640debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=1 tEnd=0.59235675 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
2641debugShowSort [1] {{2,1}, {0,3}} tStart=0 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
2642findNextOp firstIndex=[2] sign=-1
2643activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2644activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
2645activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
2646markDoneBinary id=4 (2,1 3,5) t=0 [1] (2,1) tEnd=-0 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
2647markDoneBinary id=4 (2,1 3,5) t=0 [0] (2,1) tEnd=0 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
2648markDoneBinary id=4 (2,1 3,5) t=-0 [2] (2,1) tEnd=0.125 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
2649findNextOp from:[4] to:[1] start=5 end=3
2650bridgeOp current id=4 from=(2.125,1.5) to=(2,1)
2651findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
2652debugShowSort [1] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.976311205 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
2653debugShowSort [2] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.59235675 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
2654debugShowSort [3] {{0,3}, {1,2}, {5,3}, {2,1}} tStart=0.976311205 tEnd=0.467845317 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
2655debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.59235675 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
2656findNextOp firstIndex=[1] sign=-1
2657activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2658markWinding id=3 (3,5 1,2 3,0 2,1) t=0.5 [2] (2.125,1.5) tEnd=0.59235675 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
2659findNextOp chase.append id=3
2660activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
2661markDoneBinary id=1 (0,3 1,2 5,3 2,1) t=0.467845317 [2] (2.34943295,2.3977313) tEnd=0.976311205 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
2662findNextOp chase.append id=1
2663activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2664markDoneBinary id=1 (0,3 1,2 5,3 2,1) t=0.976311205 [3] (2.20154786,1.13714886) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2665findNextOp from:[1] to:[3] start=3 end=2
2666bridgeOp current id=1 from=(2,1) to=(2.20154786,1.13714886)
2667path.moveTo(2.125,1.5);
2668path.lineTo(2,1);
2669path.cubicTo(2.07106638,1.04737759, 2.13820457,1.0930717, 2.20154786,1.13714886);
2670findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
2671debugShowSort [0] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.5 tEnd=0.59235675 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
2672debugShowSort [1] {{2,1}, {3,5}} tStart=0.125 tEnd=-0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
2673debugShowSort [2] {{3,5}, {1,2}, {3,0}, {2,1}} tStart=0.5 tEnd=0.32953467 sign=1 windValue=1 windSum=-2 -1->-2 (max=-2) done=1 tiny=0 opp=0
2674debugShowSort [3] {{2,1}, {3,5}} tStart=0.125 tEnd=0.349432839 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=0
2675findNextOp firstIndex=[0] sign=-1
2676activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2677activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
2678activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
2679markDoneBinary id=4 (2,1 3,5) t=0.125 [3] (2.125,1.5) tEnd=0.349432839 newWindSum=-2 newOppSum=1 oppSum=? windSum=? windValue=1
2680findNextOp chase.append id=4
2681markDoneBinary id=3 (3,5 1,2 3,0 2,1) t=0.5 [2] (2.125,1.5) tEnd=0.59235675 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
2682findNextOp from:[3] to:[4] start=3 end=2
2683bridgeOp current id=3 from=(2.20154786,1.13714886) to=(2.125,1.5)
2684path.cubicTo(2.17544317,1.23998928, 2.14808917,1.36146486, 2.125,1.5);
2685path.close();
2686assemble
2687assemble contour start=(2.125,1.5) end=(2.125,1.5)
2688</div>
2689
2690<div id="cubicOp53da">
2691$1 = {{fX = 2.20154786, fY = 1.13714886}, {fX = 2.31676745, fY = 0.683232486}, {fX = 2.40764332, fY = 0.592356741}, {fX = 2, fY = 1}}
2692</div>
2693
2694<div id="cubicOp53db">
2695$5 = {{x = 2.2015477442470841, y = 1.1371488033015216}, {x = 2.3167674423028313, y = 0.68323255769716895}, {x = 2.4076432497431508, y = 0.59235675025684875}, {x = 2, y = 1}}
2696(gdb) p startEdge
2697$2 = {{x = 2.2015477442470841, y = 1.1371488033015216}, {x = 2.6554639898514365, y = 1.2523685013572687}}
2698(gdb) p endEdge
2699$3 = {{x = 2, y = 1}, {x = 2.4076432497431512, y = 1.4076432497431508}}
2700</div>
2701
2702<div id="cubicOp54d">
2703 SimplifyNew_Test [cubicOp54d]
2704{{0,4}, {1,3}, {5,4}, {4,2}},
2705{{4,2}, {0,4}},
2706op difference
2707{{4,5}, {2,4}, {4,0}, {3,1}},
2708{{3,1}, {4,5}},
2709debugShowCubicIntersection no self intersect {{4,5}, {2,4}, {4,0}, {3,1}}
2710debugShowCubicLineIntersection wtTs[0]=0 {{4,5}, {2,4}, {4,0}, {3,1}} {{4,5}} wtTs[1]=0.583333333 {{3.1938657407407405,1.7754629629629624}} wtTs[2]=1 {{3,1}} wnTs[0]=1 {{3,1}, {4,5}} wnTs[1]=0.193865741 wnTs[2]=0
2711debugShowCubicIntersection no intersect {{4,5}, {2,4}, {4,0}, {3,1}} {{0,4}, {1,3}, {5,4}, {4,2}}
2712debugShowCubicLineIntersection wtTs[0]=0.467349523 {{4,5}, {2,4}, {4,0}, {3,1}} {{3.1023548730676489,2.4488225634661758}} wnTs[0]=0.224411 {{4,2}, {0,4}}
2713debugShowCubicLineIntersection wtTs[0]=0.649488354 {{0,4}, {1,3}, {5,4}, {4,2}} {{3.5531651685912107,3.2126606743648427}} wnTs[0]=0.553165 {{3,1}, {4,5}}
2714debugShowLineIntersection wtTs[0]=0.333333333 {{3,1}, {4,5}} {{3.333333333333333,2.333333333333333}} wnTs[0]=0.166667 {{4,2}, {0,4}}
2715debugShowCubicIntersection no self intersect {{0,4}, {1,3}, {5,4}, {4,2}}
2716debugShowCubicLineIntersection wtTs[0]=0 {{0,4}, {1,3}, {5,4}, {4,2}} {{0,4}} wtTs[1]=0.166666667 {{0.7129629629629628,3.6435185185185186}} wtTs[2]=1 {{4,2}} wnTs[0]=1 {{4,2}, {0,4}} wnTs[1]=0.821759259 wnTs[2]=0
2717debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2718debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0.467349523 (3.10235476,2.4488225) tEnd=0.583333333 other=2 otherT=0.224411282 otherIndex=2 windSum=? windValue=1 oppValue=0
2719debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0.583333333 (3.19386578,1.77546299) tEnd=1 other=4 otherT=0.193865741 otherIndex=1 windSum=? windValue=1 oppValue=0
2720debugShowActiveSpans id=4 (3,1 4,5) t=0 (3,1) tEnd=0.193865741 other=3 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2721debugShowActiveSpans id=4 (3,1 4,5) t=0.193865741 (3.19386578,1.77546299) tEnd=0.333333333 other=3 otherT=0.583333333 otherIndex=2 windSum=? windValue=1 oppValue=0
2722debugShowActiveSpans id=4 (3,1 4,5) t=0.333333333 (3.33333325,2.33333325) tEnd=0.553165169 other=2 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0
2723debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=? windValue=1 oppValue=0
2724debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0 (0,4) tEnd=0.166666667 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2725debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.166666667 (0.712962985,3.64351845) tEnd=0.649488354 other=2 otherT=0.821759259 otherIndex=3 windSum=? windValue=1 oppValue=0
2726debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.649488354 (3.5531652,3.21266079) tEnd=1 other=4 otherT=0.553165169 otherIndex=3 windSum=? windValue=1 oppValue=0
2727debugShowActiveSpans id=2 (4,2 0,4) t=0 (4,2) tEnd=0.166666667 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2728debugShowActiveSpans id=2 (4,2 0,4) t=0.166666667 (3.33333325,2.33333325) tEnd=0.224411282 other=4 otherT=0.333333333 otherIndex=2 windSum=? windValue=1 oppValue=0
2729debugShowActiveSpans id=2 (4,2 0,4) t=0.224411282 (3.10235476,2.4488225) tEnd=0.821759259 other=3 otherT=0.467349523 otherIndex=1 windSum=? windValue=1 oppValue=0
2730debugShowActiveSpans id=2 (4,2 0,4) t=0.821759259 (0.712962985,3.64351845) tEnd=1 other=1 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0
2731findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
2732debugShowSort [0] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=1 tEnd=0.583333333 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
2733debugShowSort [1] {{3,1}, {4,5}} tStart=0 tEnd=0.193865741 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2734findTop swap serpentine=0
2735markWinding id=3 (4,5 2,4 4,0 3,1) t=0.583333333 [2] (3.19386578,1.77546299) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2736markWinding id=3 (4,5 2,4 4,0 3,1) t=0.583333333 [2] (3.19386578,1.77546299) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2737markWinding id=4 (3,1 4,5) t=0 [0] (3,1) tEnd=0.193865741 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2738activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2739markDoneBinary id=3 (4,5 2,4 4,0 3,1) t=0.583333333 [2] (3.19386578,1.77546299) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2740debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2741debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0.467349523 (3.10235476,2.4488225) tEnd=0.583333333 other=2 otherT=0.224411282 otherIndex=2 windSum=? windValue=1 oppValue=0
2742debugShowActiveSpans id=4 (3,1 4,5) t=0 (3,1) tEnd=0.193865741 other=3 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0
2743debugShowActiveSpans id=4 (3,1 4,5) t=0.193865741 (3.19386578,1.77546299) tEnd=0.333333333 other=3 otherT=0.583333333 otherIndex=2 windSum=? windValue=1 oppValue=0
2744debugShowActiveSpans id=4 (3,1 4,5) t=0.333333333 (3.33333325,2.33333325) tEnd=0.553165169 other=2 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0
2745debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=? windValue=1 oppValue=0
2746debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0 (0,4) tEnd=0.166666667 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2747debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.166666667 (0.712962985,3.64351845) tEnd=0.649488354 other=2 otherT=0.821759259 otherIndex=3 windSum=? windValue=1 oppValue=0
2748debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.649488354 (3.5531652,3.21266079) tEnd=1 other=4 otherT=0.553165169 otherIndex=3 windSum=? windValue=1 oppValue=0
2749debugShowActiveSpans id=2 (4,2 0,4) t=0 (4,2) tEnd=0.166666667 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2750debugShowActiveSpans id=2 (4,2 0,4) t=0.166666667 (3.33333325,2.33333325) tEnd=0.224411282 other=4 otherT=0.333333333 otherIndex=2 windSum=? windValue=1 oppValue=0
2751debugShowActiveSpans id=2 (4,2 0,4) t=0.224411282 (3.10235476,2.4488225) tEnd=0.821759259 other=3 otherT=0.467349523 otherIndex=1 windSum=? windValue=1 oppValue=0
2752debugShowActiveSpans id=2 (4,2 0,4) t=0.821759259 (0.712962985,3.64351845) tEnd=1 other=1 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0
2753activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2754markDoneBinary id=4 (3,1 4,5) t=0 [0] (3,1) tEnd=0.193865741 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2755findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
2756debugShowSort [0] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.583333333 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
2757debugShowSort [1] {{3,1}, {4,5}} tStart=0.193865741 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
2758debugShowSort [2] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.583333333 tEnd=0.467349523 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
2759debugShowSort [3] {{3,1}, {4,5}} tStart=0.193865741 tEnd=0.333333333 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2760findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
2761debugShowSort [0] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.583333333 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
2762debugShowSort [1] {{3,1}, {4,5}} tStart=0.193865741 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
2763debugShowSort [2] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.583333333 tEnd=0.467349523 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
2764debugShowSort [3] {{3,1}, {4,5}} tStart=0.193865741 tEnd=0.333333333 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2765markWinding id=3 (4,5 2,4 4,0 3,1) t=0.467349523 [1] (3.10235476,2.4488225) tEnd=0.583333333 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
2766markWinding id=4 (3,1 4,5) t=0.193865741 [1] (3.19386578,1.77546299) tEnd=0.333333333 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
2767debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2768debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0.467349523 (3.10235476,2.4488225) tEnd=0.583333333 other=2 otherT=0.224411282 otherIndex=2 windSum=-1 windValue=1 oppValue=0
2769debugShowActiveSpans id=4 (3,1 4,5) t=0.193865741 (3.19386578,1.77546299) tEnd=0.333333333 other=3 otherT=0.583333333 otherIndex=2 windSum=-1 windValue=1 oppValue=0
2770debugShowActiveSpans id=4 (3,1 4,5) t=0.333333333 (3.33333325,2.33333325) tEnd=0.553165169 other=2 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0
2771debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=? windValue=1 oppValue=0
2772debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0 (0,4) tEnd=0.166666667 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2773debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.166666667 (0.712962985,3.64351845) tEnd=0.649488354 other=2 otherT=0.821759259 otherIndex=3 windSum=? windValue=1 oppValue=0
2774debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.649488354 (3.5531652,3.21266079) tEnd=1 other=4 otherT=0.553165169 otherIndex=3 windSum=? windValue=1 oppValue=0
2775debugShowActiveSpans id=2 (4,2 0,4) t=0 (4,2) tEnd=0.166666667 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2776debugShowActiveSpans id=2 (4,2 0,4) t=0.166666667 (3.33333325,2.33333325) tEnd=0.224411282 other=4 otherT=0.333333333 otherIndex=2 windSum=? windValue=1 oppValue=0
2777debugShowActiveSpans id=2 (4,2 0,4) t=0.224411282 (3.10235476,2.4488225) tEnd=0.821759259 other=3 otherT=0.467349523 otherIndex=1 windSum=? windValue=1 oppValue=0
2778debugShowActiveSpans id=2 (4,2 0,4) t=0.821759259 (0.712962985,3.64351845) tEnd=1 other=1 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0
2779activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
2780markDoneBinary id=3 (4,5 2,4 4,0 3,1) t=0.467349523 [1] (3.10235476,2.4488225) tEnd=0.583333333 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2781findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1
2782debugShowSort [0] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.166666667 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
2783debugShowSort [1] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0.583333333 sign=-1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1
2784debugShowSort [2] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.821759259 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
2785debugShowSort [3] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
2786findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
2787debugShowSort [1] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0.583333333 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
2788debugShowSort [2] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.821759259 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
2789debugShowSort [3] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
2790debugShowSort [0] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.166666667 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
2791markWinding id=2 (4,2 0,4) t=0.224411282 [2] (3.10235476,2.4488225) tEnd=0.821759259 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2792markWinding id=3 (4,5 2,4 4,0 3,1) t=0 [0] (4,5) tEnd=0.467349523 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
2793markWinding id=4 (3,1 4,5) t=0.553165169 [3] (3.5531652,3.21266079) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
2794markWinding id=2 (4,2 0,4) t=0.166666667 [1] (3.33333325,2.33333325) tEnd=0.224411282 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
2795debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2796debugShowActiveSpans id=4 (3,1 4,5) t=0.193865741 (3.19386578,1.77546299) tEnd=0.333333333 other=3 otherT=0.583333333 otherIndex=2 windSum=-1 windValue=1 oppValue=0
2797debugShowActiveSpans id=4 (3,1 4,5) t=0.333333333 (3.33333325,2.33333325) tEnd=0.553165169 other=2 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0
2798debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=-1 windValue=1 oppValue=0
2799debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0 (0,4) tEnd=0.166666667 other=2 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2800debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.166666667 (0.712962985,3.64351845) tEnd=0.649488354 other=2 otherT=0.821759259 otherIndex=3 windSum=? windValue=1 oppValue=0
2801debugShowActiveSpans id=1 (0,4 1,3 5,4 4,2) t=0.649488354 (3.5531652,3.21266079) tEnd=1 other=4 otherT=0.553165169 otherIndex=3 windSum=? windValue=1 oppValue=0
2802debugShowActiveSpans id=2 (4,2 0,4) t=0 (4,2) tEnd=0.166666667 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2803debugShowActiveSpans id=2 (4,2 0,4) t=0.166666667 (3.33333325,2.33333325) tEnd=0.224411282 other=4 otherT=0.333333333 otherIndex=2 windSum=1 windValue=1 oppValue=0
2804debugShowActiveSpans id=2 (4,2 0,4) t=0.224411282 (3.10235476,2.4488225) tEnd=0.821759259 other=3 otherT=0.467349523 otherIndex=1 windSum=1 windValue=1 oppValue=0
2805debugShowActiveSpans id=2 (4,2 0,4) t=0.821759259 (0.712962985,3.64351845) tEnd=1 other=1 otherT=0.166666667 otherIndex=1 windSum=? windValue=1 oppValue=0
2806activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2807findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
2808debugShowSort [1] {{4,2}, {0,4}} tStart=0.821759259 tEnd=0.224411282 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
2809debugShowSort [2] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.166666667 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
2810debugShowSort [3] {{4,2}, {0,4}} tStart=0.821759259 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2811debugShowSort [0] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.166666667 tEnd=0.649488354 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
2812findNextOp firstIndex=[1] sign=1
2813activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2814markWinding id=1 (0,4 1,3 5,4 4,2) t=0 [0] (0,4) tEnd=0.166666667 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
2815markWinding id=2 (4,2 0,4) t=0.821759259 [3] (0.712962985,3.64351845) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
2816findNextOp chase.append id=2
2817activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2818activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2819markWinding id=1 (0,4 1,3 5,4 4,2) t=0.166666667 [1] (0.712962985,3.64351845) tEnd=0.649488354 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2820findNextOp chase.append id=1
2821markDoneBinary id=2 (4,2 0,4) t=0.224411282 [2] (3.10235476,2.4488225) tEnd=0.821759259 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2822findNextOp from:[2] to:[1] start=1 end=0
2823bridgeOp current id=2 from=(3.10235476,2.4488225) to=(0.712962985,3.64351845)
2824findNextOp simple
2825markDoneBinary id=1 (0,4 1,3 5,4 4,2) t=0 [0] (0,4) tEnd=0.166666667 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2826bridgeOp current id=1 from=(0.712962985,3.64351845) to=(0,4)
2827path.moveTo(3.10235476,2.4488225);
2828path.lineTo(0.712962985,3.64351845);
2829path.cubicTo(0.416666657,3.72222233, 0.166666672,3.83333325, 0,4);
2830findNextOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
2831debugShowSort [3] {{4,2}, {0,4}} tStart=0.821759259 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
2832debugShowSort [0] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.166666667 tEnd=0.649488354 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
2833debugShowSort [1] {{4,2}, {0,4}} tStart=0.821759259 tEnd=0.224411282 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
2834debugShowSort [2] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.166666667 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
2835findNextOp firstIndex=[3] sign=-1
2836activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2837activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2838activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2839markDoneBinary id=2 (4,2 0,4) t=0.821759259 [3] (0.712962985,3.64351845) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2840findNextOp from:[2] to:[1] start=1 end=2
2841bridgeOp current id=2 from=(0,4) to=(0.712962985,3.64351845)
2842findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
2843debugShowSort [2] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.649488354 tEnd=0.166666667 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
2844debugShowSort [3] {{3,1}, {4,5}} tStart=0.553165169 tEnd=1 sign=-1 windValue=1 windSum=-1 0->1 (max=1) done=0 tiny=0 opp=1
2845debugShowSort [0] {{0,4}, {1,3}, {5,4}, {4,2}} tStart=0.649488354 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
2846debugShowSort [1] {{3,1}, {4,5}} tStart=0.553165169 tEnd=0.333333333 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
2847findNextOp firstIndex=[2] sign=1
2848activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
2849activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
2850markDoneBinary id=1 (0,4 1,3 5,4 4,2) t=0.649488354 [2] (3.5531652,3.21266079) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2851markDoneBinary id=2 (4,2 0,4) t=0 [0] (4,2) tEnd=0.166666667 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2852findNextOp chase.append id=2
2853activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
2854markWinding id=4 (3,1 4,5) t=0.333333333 [2] (3.33333325,2.33333325) tEnd=0.553165169 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2855findNextOp chase.append id=4
2856markDoneBinary id=1 (0,4 1,3 5,4 4,2) t=0.166666667 [1] (0.712962985,3.64351845) tEnd=0.649488354 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2857findNextOp from:[1] to:[4] start=3 end=2
2858bridgeOp current id=1 from=(0.712962985,3.64351845) to=(3.5531652,3.21266079)
2859path.lineTo(0.712962985,3.64351845);
2860path.cubicTo(1.57131267,3.41551948, 2.81819034,3.45948982, 3.5531652,3.21266079);
2861findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=-1
2862debugShowSort [3] {{3,1}, {4,5}} tStart=0.333333333 tEnd=0.553165169 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
2863debugShowSort [0] {{4,2}, {0,4}} tStart=0.166666667 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
2864debugShowSort [1] {{3,1}, {4,5}} tStart=0.333333333 tEnd=0.193865741 sign=1 windValue=1 windSum=-1 1->0 (max=1) done=0 tiny=0 opp=0
2865debugShowSort [2] {{4,2}, {0,4}} tStart=0.166666667 tEnd=0.224411282 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=1
2866findNextOp firstIndex=[3] sign=-1
2867activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
2868activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2869activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2870markDoneBinary id=4 (3,1 4,5) t=0.333333333 [2] (3.33333325,2.33333325) tEnd=0.553165169 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
2871findNextOp from:[4] to:[2] start=1 end=2
2872bridgeOp current id=4 from=(3.5531652,3.21266079) to=(3.33333325,2.33333325)
2873findNextOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1
2874debugShowSort [0] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.166666667 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
2875debugShowSort [1] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0.583333333 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
2876debugShowSort [2] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.821759259 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
2877debugShowSort [3] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=1
2878findNextOp firstIndex=[0] sign=1
2879activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2880activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2881activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2882markDoneBinary id=2 (4,2 0,4) t=0.166666667 [1] (3.33333325,2.33333325) tEnd=0.224411282 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
2883findNextOp from:[2] to:[2] start=2 end=3
2884sharedlibrary apply-load-rules all
2885bridgeOp current id=2 from=(3.33333325,2.33333325) to=(3.10235476,2.4488225)
2886path.lineTo(3.33333325,2.33333325);
2887path.lineTo(3.10235476,2.4488225);
2888path.close();
2889debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2890debugShowActiveSpans id=4 (3,1 4,5) t=0.193865741 (3.19386578,1.77546299) tEnd=0.333333333 other=3 otherT=0.583333333 otherIndex=2 windSum=-1 windValue=1 oppValue=0
2891debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=-1 windValue=1 oppValue=0
2892activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
2893markDoneBinary id=4 (3,1 4,5) t=0.193865741 [1] (3.19386578,1.77546299) tEnd=0.333333333 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
2894debugShowActiveSpans id=3 (4,5 2,4 4,0 3,1) t=0 (4,5) tEnd=0.467349523 other=4 otherT=1 otherIndex=4 windSum=-1 windValue=1 oppValue=0
2895debugShowActiveSpans id=4 (3,1 4,5) t=0.553165169 (3.5531652,3.21266079) tEnd=1 other=1 otherT=0.649488354 otherIndex=2 windSum=-1 windValue=1 oppValue=0
2896activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
2897findNextOp simple
2898markDoneBinary id=4 (3,1 4,5) t=0.553165169 [3] (3.5531652,3.21266079) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
2899bridgeOp current id=4 from=(3.5531652,3.21266079) to=(4,5)
2900findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1
2901debugShowSort [3] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
2902debugShowSort [0] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.166666667 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
2903debugShowSort [1] {{4,5}, {2,4}, {4,0}, {3,1}} tStart=0.467349523 tEnd=0.583333333 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
2904debugShowSort [2] {{4,2}, {0,4}} tStart=0.224411282 tEnd=0.821759259 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
2905findNextOp firstIndex=[3] sign=1
2906activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
2907activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
2908activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
2909markDoneBinary id=3 (4,5 2,4 4,0 3,1) t=0 [0] (4,5) tEnd=0.467349523 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
2910findNextOp from:[3] to:[2] start=2 end=3
2911bridgeOp current id=3 from=(4,5) to=(3.10235476,2.4488225)
2912path.moveTo(3.5531652,3.21266079);
2913path.lineTo(4,5);
2914path.cubicTo(3.06530094,4.53265047, 3.00426435,3.41005421, 3.10235476,2.4488225);
2915</div>
2916
2917<div id="cubicOp54da">
2918computed quadratics given
2919 {{0,4}, {1,3}, {5,4}, {4,2}},
2920 {{4,5}, {2,4}, {4,0}, {3,1}},
2921computed quadratics set 1
2922 {{0,4}, {0.313151522,3.71221453}, {0.886767898,3.60197476}},
2923 {{0.886767898,3.60197476}, {1.46038427,3.491735}, {2.10714698,3.44196686}},
2924 {{2.10714698,3.44196686}, {3.12180288,3.38575704}, {3.75968569,3.1281838}},
2925 {{3.75968569,3.1281838}, {4.3975685,2.87061055}, {4,2}},
2926computed quadratics set 2
2927 {{4,5}, {3.59856947,4.79217123}, {3.39068129,4.44939202}},
2928 {{3.39068129,4.44939202}, {3.03659239,3.81843234}, {3.06844529,3.02100922}},
2929 {{3.06844529,3.02100922}, {3.09985637,2.22825976}, {3.22177695,1.60368348}},
2930 {{3.22177695,1.60368348}, {3.35239933,0.944897345}, {3.25461667,0.846601983}},
2931 {{3.25461667,0.846601983}, {3.19302952,0.807536747}, {3,1}},
2932</div>
2933
2934<div id="cubicOp54db">
2935 {{3.39068129,4.44939202}, {3.03659239,3.81843234}, {3.06844529,3.02100922}},
2936 {{2.10714698,3.44196686}, {3.12180288,3.38575704}, {3.75968569,3.1281838}},
2937</div>
2938
2939<div id="cubicOp54dc">
2940(gdb) p cSub1
2941$2 = {{x = 3.0774019473063863, y = 3.35198509346713}, {x = 3.0763003260366699, y = 3.3355427495692078}, {x = 3.0753041923884408, y = 3.3190757607779853}, {x = 3.0744102085015879, y = 3.3025879417907196}}
2942(gdb) p cSub2
2943$3 = {{x = 3.053913680774329, y = 3.3310471586283938}, {x = 3.0685526504546785, y = 3.3285797268698434}, {x = 3.0831050944309708, y = 3.3260658459407866}, {x = 3.0975671980059394, y = 3.3235031316554351}}
2944(gdb) p s1
2945$4 = {{x = 3.0774019473063863, y = 3.35198509346713}, {x = 3.0757503498668397, y = 3.327320623945933}, {x = 3.0744102085015879, y = 3.3025879417907196}}
2946(gdb) p s2
2947$5 = {{x = 3.053913680774329, y = 3.3310471586283938}, {x = 3.0758730889691694, y = 3.3273466070370152}, {x = 3.0975671980059394, y = 3.3235031316554351}}
2948</div>
2949
2950<div id="cubicOp54dd">
2951{{x = 3.053913680774329, y = 3.3310471586283938}, {x = 3.0758730889691694, y = 3.3273466070370152}, {x = 3.0975671980059394, y = 3.3235031316554351}}
2952{{x = 3.0744102085015879, y = 3.3025879417907196}, {x = 3.0774019473063863, y = 3.35198509346713}}
2953</div>
2954
2955<div id="cubicOp55d">
2956 SimplifyNew_Test [cubicOp55d]
2957{{0,5}, {1,3}, {3,2}, {5,0}},
2958{{5,0}, {0,5}},
2959op difference
2960{{2,3}, {0,5}, {5,0}, {3,1}},
2961{{3,1}, {2,3}},
2962debugShowCubicIntersection no self intersect {{0,5}, {1,3}, {3,2}, {5,0}}
2963debugShowCubicLineIntersection wtTs[0]=0 {{0,5}, {1,3}, {3,2}, {5,0}} {{0,5}} wtTs[1]=1 {{5,0}} wnTs[0]=1 {{5,0}, {0,5}} wnTs[1]=0
2964debugShowCubicIntersection wtTs[0]=0.658239823 {{0,5}, {1,3}, {3,2}, {5,0}} {{2.9893565350663849,1.7799961946192431}} wnTs[0]=0.613267 {{2,3}, {0,5}, {5,0}, {3,1}}
2965debugShowCubicLineIntersection wtTs[0]=0.540876747 {{0,5}, {1,3}, {3,2}, {5,0}} {{2.3420409812806477,2.3159180374387045}} wnTs[0]=0.657959 {{3,1}, {2,3}}
2966debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {0,5}, {5,0}, {3,1}} {{2,3}} wnTs[0]=0.6 {{5,0}, {0,5}}
2967debugShowLineIntersection wtTs[0]=0.6 {{5,0}, {0,5}} {{2,3}} wnTs[0]=1 {{3,1}, {2,3}}
2968debugShowCubicIntersection no self intersect {{2,3}, {0,5}, {5,0}, {3,1}}
2969debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {0,5}, {5,0}, {3,1}} {{2,3}} wtTs[1]=0.4 {{2.0640000000000005,2.871999999999999}} wtTs[2]=1 {{3,1}} wnTs[0]=1 {{3,1}, {2,3}} wnTs[1]=0.936 wnTs[2]=0
2970debugShowActiveSpans id=1 (0,5 1,3 3,2 5,0) t=0 (0,5) tEnd=0.540876747 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2971debugShowActiveSpans id=1 (0,5 1,3 3,2 5,0) t=0.540876747 (2.34204102,2.31591797) tEnd=0.658239823 other=4 otherT=0.657959019 otherIndex=1 windSum=? windValue=1 oppValue=0
2972debugShowActiveSpans id=1 (0,5 1,3 3,2 5,0) t=0.658239823 (2.98935652,1.77999616) tEnd=1 other=3 otherT=0.613266786 otherIndex=3 windSum=? windValue=1 oppValue=0
2973debugShowActiveSpans id=2 (5,0 0,5) t=0 (5,0) tEnd=0.6 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2974debugShowActiveSpans id=2 (5,0 0,5) t=0.6 (2,3) tEnd=1 other=3 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=0
2975debugShowActiveSpans id=2 (5,0 0,5) t=0.6 (2,3) tEnd=1 other=4 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
2976debugShowActiveSpans id=3 (2,3 0,5 5,0 3,1) t=0 (2,3) tEnd=0.4 other=2 otherT=0.6 otherIndex=1 windSum=? windValue=1 oppValue=0
2977debugShowActiveSpans id=3 (2,3 0,5 5,0 3,1) t=0 (2,3) tEnd=0.4 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2978debugShowActiveSpans id=3 (2,3 0,5 5,0 3,1) t=0.4 (2.06399989,2.87199998) tEnd=0.613266786 other=4 otherT=0.936 otherIndex=2 windSum=? windValue=1 oppValue=0
2979debugShowActiveSpans id=3 (2,3 0,5 5,0 3,1) t=0.613266786 (2.98935652,1.77999616) tEnd=1 other=1 otherT=0.658239823 otherIndex=2 windSum=? windValue=1 oppValue=0
2980debugShowActiveSpans id=4 (3,1 2,3) t=0 (3,1) tEnd=0.657959019 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
2981debugShowActiveSpans id=4 (3,1 2,3) t=0.657959019 (2.34204102,2.31591797) tEnd=0.936 other=1 otherT=0.540876747 otherIndex=1 windSum=? windValue=1 oppValue=0
2982debugShowActiveSpans id=4 (3,1 2,3) t=0.936 (2.06399989,2.87199998) tEnd=1 other=3 otherT=0.4 otherIndex=2 windSum=? windValue=1 oppValue=0
2983findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
2984debugShowSort [0] {{0,5}, {1,3}, {3,2}, {5,0}} tStart=1 tEnd=0.658239823 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
2985debugShowSort [1] {{5,0}, {0,5}} tStart=0 tEnd=0.6 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
2986findTop swap serpentine=0
2987markWinding id=1 (0,5 1,3 3,2 5,0) t=0.658239823 [2] (2.98935652,1.77999616) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2988markWinding id=1 (0,5 1,3 3,2 5,0) t=0.658239823 [2] (2.98935652,1.77999616) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
2989markWinding id=2 (5,0 0,5) t=0 [0] (5,0) tEnd=0.6 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
2990activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
2991findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
2992debugShowSort [0] {{0,5}, {1,3}, {3,2}, {5,0}} tStart=0.658239823 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
2993debugShowSort [1] {{2,3}, {0,5}, {5,0}, {3,1}} tStart=0.613266786 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
2994debugShowSort [2] {{0,5}, {1,3}, {3,2}, {5,0}} tStart=0.658239823 tEnd=0.540876747 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
2995debugShowSort [3] {{2,3}, {0,5}, {5,0}, {3,1}} tStart=0.613266786 tEnd=0.4 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
2996findNextOp firstIndex=[0] sign=-1
2997activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
2998markWinding id=3 (2,3 0,5 5,0 3,1) t=0.613266786 [3] (2.98935652,1.77999616) tEnd=1 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
2999markWinding id=4 (3,1 2,3) t=0 [0] (3,1) tEnd=0.657959019 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
3000findNextOp chase.append id=4
3001activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
3002markDoneBinary id=1 (0,5 1,3 3,2 5,0) t=0.540876747 [1] (2.34204102,2.31591797) tEnd=0.658239823 newWindSum=1 newOppSum=1 oppSum=? windSum=? windValue=1
3003findNextOp chase.append id=1
3004activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
3005markDoneBinary id=3 (2,3 0,5 5,0 3,1) t=0.4 [2] (2.06399989,2.87199998) tEnd=0.613266786 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3006findNextOp chase.append id=3
3007markDoneBinary id=1 (0,5 1,3 3,2 5,0) t=0.658239823 [2] (2.98935652,1.77999616) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3008findNextOp from:[1] to:[3] start=3 end=4
3009bridgeOp current id=1 from=(5,0) to=(2.98935652,1.77999616)
3010path.moveTo(5,0);
3011path.cubicTo(4.31647968,0.683520317, 3.63295937,1.25024068, 2.98935652,1.77999616);
3012findNextOp simple
3013markDoneBinary id=3 (2,3 0,5 5,0 3,1) t=0.613266786 [3] (2.98935652,1.77999616) tEnd=1 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
3014bridgeOp current id=3 from=(2.98935652,1.77999616) to=(3,1)
3015path.cubicTo(3.49999475,1.123909, 3.77346635,0.613266766, 3,1);
3016findNextOp debugShowSort contourWinding=1 oppContourWinding=1 sign=1
3017debugShowSort [1] {{3,1}, {2,3}} tStart=0.657959019 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
3018debugShowSort [2] {{0,5}, {1,3}, {3,2}, {5,0}} tStart=0.540876747 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
3019debugShowSort [3] {{3,1}, {2,3}} tStart=0.657959019 tEnd=0.936 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
3020debugShowSort [0] {{0,5}, {1,3}, {3,2}, {5,0}} tStart=0.540876747 tEnd=0.658239823 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
3021findNextOp firstIndex=[1] sign=1
3022activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
3023markWinding id=1 (0,5 1,3 3,2 5,0) t=0 [0] (0,5) tEnd=0.540876747 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3024markWinding id=2 (5,0 0,5) t=0.6 [1] (2,3) tEnd=0.6 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3025markWinding id=2 (5,0 0,5) t=0.6 [2] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3026findNextOp chase.append id=2
3027activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
3028markDoneBinary id=4 (3,1 2,3) t=0.657959019 [1] (2.34204102,2.31591797) tEnd=0.936 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3029findNextOp chase.append id=4
3030activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
3031markDoneBinary id=4 (3,1 2,3) t=0 [0] (3,1) tEnd=0.657959019 newWindSum=1 newOppSum=1 oppSum=1 windSum=1 windValue=1
3032findNextOp from:[4] to:[1] start=1 end=0
3033bridgeOp current id=4 from=(3,1) to=(2.34204102,2.31591797)
3034findNextOp simple
3035markDoneBinary id=1 (0,5 1,3 3,2 5,0) t=0 [0] (0,5) tEnd=0.540876747 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3036bridgeOp current id=1 from=(2.34204102,2.31591797) to=(0,5)
3037path.lineTo(2.34204102,2.31591797);
3038path.cubicTo(1.37430108,3.12904072, 0.540876746,3.91824651, 0,5);
3039findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
3040debugShowSort [3] {{5,0}, {0,5}} tStart=0.6 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
3041debugShowSort [0] {{5,0}, {0,5}} tStart=0.6 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
3042debugShowSort [1] {{3,1}, {2,3}} tStart=1 tEnd=0.936 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
3043debugShowSort [2] {{2,3}, {0,5}, {5,0}, {3,1}} tStart=0 tEnd=0.4 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
3044findNextOp firstIndex=[3] sign=-1
3045activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
3046activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
3047markDoneBinary id=4 (3,1 2,3) t=0.936 [2] (2.06399989,2.87199998) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3048findNextOp chase.append id=4
3049activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
3050markDoneBinary id=3 (2,3 0,5 5,0 3,1) t=0 [0] (2,3) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3051markDoneBinary id=3 (2,3 0,5 5,0 3,1) t=0 [1] (2,3) tEnd=0.4 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3052findNextOp chase.append id=3
3053markDoneBinary id=2 (5,0 0,5) t=0.6 [1] (2,3) tEnd=0.6 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3054markDoneBinary id=2 (5,0 0,5) t=0.6 [2] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3055findNextOp from:[2] to:[2] start=2 end=0
3056bridgeOp current id=2 from=(0,5) to=(2,3)
3057findNextOp simple
3058markDoneBinary id=2 (5,0 0,5) t=0 [0] (5,0) tEnd=0.6 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3059bridgeOp current id=2 from=(2,3) to=(5,0)
3060path.lineTo(5,0);
3061path.close();
3062assemble
3063assemble contour start=(5,0) end=(5,0)
3064</div>
3065
3066<div id="cubicOp55da">
3067$1 = {{x = 2.9893565350663844, y = 1.7799961946192431}, {x = 3.6329592934456443, y = 1.250240688218315}, {x = 4.3164796467228257, y = 0.68352035327717708}, {x = 5, y = 0}}
3068</div>
3069
3070<div id="cubicOp56da">
3071$3 = {{x = 3.2077595567431376, y = 1.2121007383531144}, {x = 3.0712003892698903, y = 0.91360430885366861}, {x = 2.6980028578011237, y = 0.76733238073295829}, {x = 2, y = 1}}
3072</div>
3073
3074<div id="cubicOp57da">
3075computed quadratics given
3076 {{0,5}, {0,5}, {5,4}, {6,4}},
3077 {{4,5}, {4,6}, {5,0}, {5,0}},
3078computed quadratics set 1
3079 {{0,5}, {0.0833333333,4.98148148}, {1.33333333,4.74074074}},
3080 {{1.33333333,4.74074074}, {2.58333333,4.5}, {4,4.25925926}},
3081 {{4,4.25925926}, {5.41666667,4.01851852}, {6,4}},
3082computed quadratics set 2
3083 {{4,5}, {4.0078125,5.32421875}, {4.15625,4.640625}},
3084 {{4.15625,4.640625}, {4.3046875,3.95703125}, {4.5,2.875}},
3085 {{4.5,2.875}, {4.6953125,1.79296875}, {4.84375,0.921875}},
3086 {{4.84375,0.921875}, {4.9921875,0.05078125}, {5,0}},
3087</div>
3088
3089<div id="cubicOp58d">
3090 SimplifyNew_Test [cubicOp58d]
3091{{0,5}, {3,4}, {6,5}, {5,3}},
3092{{5,3}, {0,5}},
3093op difference
3094{{5,6}, {3,5}, {5,0}, {4,3}},
3095{{4,3}, {5,6}},
3096debugShowCubicIntersection no self intersect {{5,6}, {3,5}, {5,0}, {4,3}}
3097debugShowCubicLineIntersection wtTs[0]=0 {{5,6}, {3,5}, {5,0}, {4,3}} {{5,6}} wtTs[1]=0.454545455 {{4.0946656649135988,3.2839969947407956}} wtTs[2]=1 {{4,3}} wnTs[0]=1 {{4,3}, {5,6}} wnTs[1]=0.0946656649 wnTs[2]=0
3098debugShowCubicIntersection wtTs[0]=0.297296392 {{5,6}, {3,5}, {5,0}, {4,3}} {{4.0929072920341625,4.362808103638363}} wnTs[0]=0.515735 {{0,5}, {3,4}, {6,5}, {5,3}}
3099debugShowCubicLineIntersection wtTs[0]=0.442158094 {{5,6}, {3,5}, {5,0}, {4,3}} {{4.0879917456946373,3.3648033017221453}} wnTs[0]=0.182402 {{5,3}, {0,5}}
3100debugShowCubicLineIntersection wtTs[0]=0.579011103 {{0,5}, {3,4}, {6,5}, {5,3}} {{4.4346371023199076,4.3039113069597246}} wnTs[0]=0.434637 {{4,3}, {5,6}}
3101debugShowLineIntersection wtTs[0]=0.117647059 {{4,3}, {5,6}} {{4.117647058823529,3.3529411764705879}} wnTs[0]=0.176471 {{5,3}, {0,5}}
3102debugShowCubicIntersection no self intersect {{0,5}, {3,4}, {6,5}, {5,3}}
3103debugShowCubicLineIntersection wtTs[0]=0 {{0,5}, {3,4}, {6,5}, {5,3}} {{0,5}} wtTs[1]=1 {{5,3}} wnTs[0]=1 {{5,3}, {0,5}} wnTs[1]=0
3104debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
3105debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.297296392 (4.09290743,4.36280823) tEnd=0.442158094 other=1 otherT=0.515734731 otherIndex=1 windSum=? windValue=1 oppValue=0
3106debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.442158094 (4.08799171,3.36480331) tEnd=0.454545455 other=2 otherT=0.182401651 otherIndex=2 windSum=? windValue=1 oppValue=0
3107debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.454545455 (4.09466553,3.28399706) tEnd=1 other=4 otherT=0.0946656649 otherIndex=1 windSum=? windValue=1 oppValue=0
3108debugShowActiveSpans id=4 (4,3 5,6) t=0 (4,3) tEnd=0.0946656649 other=3 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
3109debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=? windValue=1 oppValue=0
3110debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0
3111debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0
3112debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0 (0,5) tEnd=0.515734731 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3113debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0
3114debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0
3115debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3116debugShowActiveSpans id=2 (5,3 0,5) t=0.176470588 (4.11764717,3.35294127) tEnd=0.182401651 other=4 otherT=0.117647059 otherIndex=2 windSum=? windValue=1 oppValue=0
3117debugShowActiveSpans id=2 (5,3 0,5) t=0.182401651 (4.08799171,3.36480331) tEnd=1 other=3 otherT=0.442158094 otherIndex=2 windSum=? windValue=1 oppValue=0
3118findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
3119debugShowSort [0] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=1 tEnd=0.454545455 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
3120debugShowSort [1] {{4,3}, {5,6}} tStart=0 tEnd=0.0946656649 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
3121markWinding id=3 (5,6 3,5 5,0 4,3) t=0.454545455 [3] (4.09466553,3.28399706) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3122markWinding id=4 (4,3 5,6) t=0 [0] (4,3) tEnd=0.0946656649 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3123markWinding id=3 (5,6 3,5 5,0 4,3) t=0.454545455 [3] (4.09466553,3.28399706) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
3124activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
3125markDoneBinary id=3 (5,6 3,5 5,0 4,3) t=0.454545455 [3] (4.09466553,3.28399706) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
3126markDoneBinary id=4 (4,3 5,6) t=0 [0] (4,3) tEnd=0.0946656649 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
3127findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
3128debugShowSort [0] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.454545455 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
3129debugShowSort [1] {{4,3}, {5,6}} tStart=0.0946656649 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
3130debugShowSort [2] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.454545455 tEnd=0.442158094 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=0
3131debugShowSort [3] {{4,3}, {5,6}} tStart=0.0946656649 tEnd=0.117647059 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=0
3132findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
3133debugShowSort [0] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.454545455 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
3134debugShowSort [1] {{4,3}, {5,6}} tStart=0.0946656649 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
3135debugShowSort [2] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.454545455 tEnd=0.442158094 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=0
3136debugShowSort [3] {{4,3}, {5,6}} tStart=0.0946656649 tEnd=0.117647059 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=0
3137markWinding id=3 (5,6 3,5 5,0 4,3) t=0.442158094 [2] (4.08799171,3.36480331) tEnd=0.454545455 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1
3138markWinding id=4 (4,3 5,6) t=0.0946656649 [1] (4.09466553,3.28399706) tEnd=0.117647059 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1
3139debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
3140debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.297296392 (4.09290743,4.36280823) tEnd=0.442158094 other=1 otherT=0.515734731 otherIndex=1 windSum=? windValue=1 oppValue=0
3141debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.442158094 (4.08799171,3.36480331) tEnd=0.454545455 other=2 otherT=0.182401651 otherIndex=2 windSum=-2 windValue=1 oppValue=0
3142debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=-2 windValue=1 oppValue=0
3143debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0
3144debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0
3145debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0 (0,5) tEnd=0.515734731 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3146debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0
3147debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0
3148debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3149debugShowActiveSpans id=2 (5,3 0,5) t=0.176470588 (4.11764717,3.35294127) tEnd=0.182401651 other=4 otherT=0.117647059 otherIndex=2 windSum=? windValue=1 oppValue=0
3150debugShowActiveSpans id=2 (5,3 0,5) t=0.182401651 (4.08799171,3.36480331) tEnd=1 other=3 otherT=0.442158094 otherIndex=2 windSum=? windValue=1 oppValue=0
3151activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=1 result=0
3152markDoneBinary id=3 (5,6 3,5 5,0 4,3) t=0.442158094 [2] (4.08799171,3.36480331) tEnd=0.454545455 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1
3153findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1
3154debugShowSort [0] {{5,3}, {0,5}} tStart=0.182401651 tEnd=0.176470588 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
3155debugShowSort [1] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.442158094 tEnd=0.454545455 sign=-1 windValue=1 windSum=-2 ?->? (max=?) done=1 tiny=0 opp=1
3156debugShowSort [2] {{5,3}, {0,5}} tStart=0.182401651 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
3157debugShowSort [3] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.442158094 tEnd=0.297296392 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
3158findChaseOp debugShowSort contourWinding=-2 oppContourWinding=0 sign=-1
3159debugShowSort [1] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.442158094 tEnd=0.454545455 sign=-1 windValue=1 windSum=-2 -2->-1 (max=-2) done=1 tiny=0 opp=0
3160debugShowSort [2] {{5,3}, {0,5}} tStart=0.182401651 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
3161debugShowSort [3] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.442158094 tEnd=0.297296392 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=0
3162debugShowSort [0] {{5,3}, {0,5}} tStart=0.182401651 tEnd=0.176470588 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
3163markWinding id=2 (5,3 0,5) t=0.182401651 [2] (4.08799171,3.36480331) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
3164markWinding id=1 (0,5 3,4 6,5 5,3) t=0 [0] (0,5) tEnd=0.515734731 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
3165markWinding id=3 (5,6 3,5 5,0 4,3) t=0.297296392 [1] (4.09290743,4.36280823) tEnd=0.442158094 newWindSum=-2 newOppSum=1 oppSum=? windSum=? windValue=1
3166markWinding id=2 (5,3 0,5) t=0.176470588 [1] (4.11764717,3.35294127) tEnd=0.182401651 newWindSum=1 newOppSum=-2 oppSum=? windSum=? windValue=1
3167debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
3168debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.297296392 (4.09290743,4.36280823) tEnd=0.442158094 other=1 otherT=0.515734731 otherIndex=1 windSum=-2 windValue=1 oppValue=0
3169debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=-2 windValue=1 oppValue=0
3170debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0
3171debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0
3172debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0 (0,5) tEnd=0.515734731 other=2 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0
3173debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0
3174debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0
3175debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3176debugShowActiveSpans id=2 (5,3 0,5) t=0.176470588 (4.11764717,3.35294127) tEnd=0.182401651 other=4 otherT=0.117647059 otherIndex=2 windSum=1 windValue=1 oppValue=0
3177debugShowActiveSpans id=2 (5,3 0,5) t=0.182401651 (4.08799171,3.36480331) tEnd=1 other=3 otherT=0.442158094 otherIndex=2 windSum=1 windValue=1 oppValue=0
3178activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
3179markDoneBinary id=2 (5,3 0,5) t=0.182401651 [2] (4.08799171,3.36480331) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
3180markDoneBinary id=1 (0,5 3,4 6,5 5,3) t=0 [0] (0,5) tEnd=0.515734731 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
3181debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
3182debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0.297296392 (4.09290743,4.36280823) tEnd=0.442158094 other=1 otherT=0.515734731 otherIndex=1 windSum=-2 windValue=1 oppValue=0
3183debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=-2 windValue=1 oppValue=0
3184debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0
3185debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0
3186debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0
3187debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0
3188debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3189debugShowActiveSpans id=2 (5,3 0,5) t=0.176470588 (4.11764717,3.35294127) tEnd=0.182401651 other=4 otherT=0.117647059 otherIndex=2 windSum=1 windValue=1 oppValue=0
3190activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
3191markDoneBinary id=3 (5,6 3,5 5,0 4,3) t=0.297296392 [1] (4.09290743,4.36280823) tEnd=0.442158094 newWindSum=-2 newOppSum=1 oppSum=1 windSum=-2 windValue=1
3192debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
3193debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=-2 windValue=1 oppValue=0
3194debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0
3195debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0
3196debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0
3197debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0
3198debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3199debugShowActiveSpans id=2 (5,3 0,5) t=0.176470588 (4.11764717,3.35294127) tEnd=0.182401651 other=4 otherT=0.117647059 otherIndex=2 windSum=1 windValue=1 oppValue=0
3200activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
3201markDoneBinary id=2 (5,3 0,5) t=0.176470588 [1] (4.11764717,3.35294127) tEnd=0.182401651 newWindSum=1 newOppSum=-2 oppSum=-2 windSum=1 windValue=1
3202debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
3203debugShowActiveSpans id=4 (4,3 5,6) t=0.0946656649 (4.09466553,3.28399706) tEnd=0.117647059 other=3 otherT=0.454545455 otherIndex=3 windSum=-2 windValue=1 oppValue=0
3204debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0
3205debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=? windValue=1 oppValue=0
3206debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=? windValue=1 oppValue=0
3207debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0
3208debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3209activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=1 result=0
3210markDoneBinary id=4 (4,3 5,6) t=0.0946656649 [1] (4.09466553,3.28399706) tEnd=0.117647059 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1
3211findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1
3212debugShowSort [0] {{0,5}, {3,4}, {6,5}, {5,3}} tStart=0.515734731 tEnd=0.579011103 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
3213debugShowSort [1] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.297296392 tEnd=0.442158094 sign=-1 windValue=1 windSum=-2 ?->? (max=?) done=1 tiny=0 opp=1
3214debugShowSort [2] {{0,5}, {3,4}, {6,5}, {5,3}} tStart=0.515734731 tEnd=0 sign=1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=0
3215debugShowSort [3] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.297296392 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
3216findChaseOp debugShowSort contourWinding=-2 oppContourWinding=1 sign=-1
3217debugShowSort [1] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.297296392 tEnd=0.442158094 sign=-1 windValue=1 windSum=-2 -2->-1 (max=-2) done=1 tiny=0 opp=0
3218debugShowSort [2] {{0,5}, {3,4}, {6,5}, {5,3}} tStart=0.515734731 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
3219debugShowSort [3] {{5,6}, {3,5}, {5,0}, {4,3}} tStart=0.297296392 tEnd=0 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=0
3220debugShowSort [0] {{0,5}, {3,4}, {6,5}, {5,3}} tStart=0.515734731 tEnd=0.579011103 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
3221markWinding id=3 (5,6 3,5 5,0 4,3) t=0 [0] (5,6) tEnd=0.297296392 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1
3222markWinding id=4 (4,3 5,6) t=0.434637102 [3] (4.43463707,4.30391121) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1
3223markWinding id=1 (0,5 3,4 6,5 5,3) t=0.515734731 [1] (4.09290743,4.36280823) tEnd=0.579011103 newWindSum=1 newOppSum=-2 oppSum=? windSum=? windValue=1
3224debugShowActiveSpans id=3 (5,6 3,5 5,0 4,3) t=0 (5,6) tEnd=0.297296392 other=4 otherT=1 otherIndex=4 windSum=-2 windValue=1 oppValue=0
3225debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0
3226debugShowActiveSpans id=4 (4,3 5,6) t=0.434637102 (4.43463707,4.30391121) tEnd=1 other=1 otherT=0.579011103 otherIndex=2 windSum=-2 windValue=1 oppValue=0
3227debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=1 windValue=1 oppValue=0
3228debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0
3229debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3230activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=1 result=0
3231markDoneBinary id=3 (5,6 3,5 5,0 4,3) t=0 [0] (5,6) tEnd=0.297296392 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1
3232markDoneBinary id=4 (4,3 5,6) t=0.434637102 [3] (4.43463707,4.30391121) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1
3233debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=? windValue=1 oppValue=0
3234debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.515734731 (4.09290743,4.36280823) tEnd=0.579011103 other=3 otherT=0.297296392 otherIndex=1 windSum=1 windValue=1 oppValue=0
3235debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=? windValue=1 oppValue=0
3236debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3237activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
3238markDoneBinary id=1 (0,5 3,4 6,5 5,3) t=0.515734731 [1] (4.09290743,4.36280823) tEnd=0.579011103 newWindSum=1 newOppSum=-2 oppSum=-2 windSum=1 windValue=1
3239findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1
3240debugShowSort [0] {{5,3}, {0,5}} tStart=0.176470588 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
3241debugShowSort [1] {{4,3}, {5,6}} tStart=0.117647059 tEnd=0.0946656649 sign=1 windValue=1 windSum=-2 ?->? (max=?) done=1 tiny=0 opp=1
3242debugShowSort [2] {{5,3}, {0,5}} tStart=0.176470588 tEnd=0.182401651 sign=-1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=0
3243debugShowSort [3] {{4,3}, {5,6}} tStart=0.117647059 tEnd=0.434637102 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
3244findChaseOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=1
3245debugShowSort [1] {{4,3}, {5,6}} tStart=0.117647059 tEnd=0.0946656649 sign=1 windValue=1 windSum=-2 -1->-2 (max=-2) done=1 tiny=0 opp=0
3246debugShowSort [2] {{5,3}, {0,5}} tStart=0.176470588 tEnd=0.182401651 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=1
3247debugShowSort [3] {{4,3}, {5,6}} tStart=0.117647059 tEnd=0.434637102 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=0
3248debugShowSort [0] {{5,3}, {0,5}} tStart=0.176470588 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
3249markWinding id=4 (4,3 5,6) t=0.117647059 [2] (4.11764717,3.35294127) tEnd=0.434637102 newWindSum=-2 newOppSum=1 oppSum=? windSum=? windValue=1
3250markWinding id=2 (5,3 0,5) t=0 [0] (5,3) tEnd=0.176470588 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
3251markWinding id=1 (0,5 3,4 6,5 5,3) t=0.579011103 [2] (4.43463707,4.30391121) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
3252debugShowActiveSpans id=4 (4,3 5,6) t=0.117647059 (4.11764717,3.35294127) tEnd=0.434637102 other=2 otherT=0.176470588 otherIndex=1 windSum=-2 windValue=1 oppValue=0
3253debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=1 windValue=1 oppValue=0
3254debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0
3255activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=1 result=0
3256markDoneBinary id=4 (4,3 5,6) t=0.117647059 [2] (4.11764717,3.35294127) tEnd=0.434637102 newWindSum=-2 newOppSum=1 oppSum=1 windSum=-2 windValue=1
3257debugShowActiveSpans id=1 (0,5 3,4 6,5 5,3) t=0.579011103 (4.43463707,4.30391121) tEnd=1 other=4 otherT=0.434637102 otherIndex=3 windSum=1 windValue=1 oppValue=0
3258debugShowActiveSpans id=2 (5,3 0,5) t=0 (5,3) tEnd=0.176470588 other=1 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0
3259activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
3260markDoneBinary id=1 (0,5 3,4 6,5 5,3) t=0.579011103 [2] (4.43463707,4.30391121) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
3261markDoneBinary id=2 (5,3 0,5) t=0 [0] (5,3) tEnd=0.176470588 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
3262assemble
3263</div>
3264
3265<div id="cubicOp58da">
3266$1 = {{fX = 4.09466553, fY = 3.28399706}, {fX = 4.19834709, fY = 2.10743785}, {fX = 4.5454545, fY = 1.36363637}, {fX = 4, fY = 3}}
3267</div>
3268
3269<div id="cubicOp61d">
3270 SimplifyNew_Test [cubicOp61d]
3271{{1,2}, {0,5}, {3,2}, {6,1}},
3272{{6,1}, {1,2}},
3273op difference
3274{{2,3}, {1,6}, {2,1}, {5,0}},
3275{{5,0}, {2,3}},
3276debugShowCubicIntersection wtTs[0]=0 {{2,3}, {1,6}, {2,1}, {5,0}} {{2,3}} wtTs[1]=0.5
3277debugShowCubicLineIntersection wtTs[0]=0 {{2,3}, {1,6}, {2,1}, {5,0}} {{2,3}} wtTs[1]=0.5 {{2,3}} wtTs[2]=1 {{5,0}} wnTs[0]=1 {{5,0}, {2,3}} wnTs[1]=1 wnTs[2]=0
3278debugShowCubicIntersection wtTs[0]=0 {{2,3}, {1,6}, {2,1}, {5,0}} {{2,3}} wtTs[1]=0.5 {{2.0000000000728706,2.9999999998542584}} wnTs[0]=0.5 {{1,2}, {0,5}, {3,2}, {6,1}} wnTs[1]=0.500000029
3279debugShowCubicLineIntersection wtTs[0]=0.704088595 {{2,3}, {1,6}, {2,1}, {5,0}} {{2.8621787139852466,1.6275642572029505}} wnTs[0]=0.627564 {{6,1}, {1,2}}
3280debugShowCubicLineIntersection wtTs[0]=0.5 {{1,2}, {0,5}, {3,2}, {6,1}} {{2,3}} wnTs[0]=1 {{5,0}, {2,3}}
3281debugShowLineIntersection wtTs[0]=0.5 {{5,0}, {2,3}} {{3.5,1.5}} wnTs[0]=0.5 {{6,1}, {1,2}}
3282debugShowCubicIntersection no self intersect {{1,2}, {0,5}, {3,2}, {6,1}}
3283debugShowCubicLineIntersection wtTs[0]=0 {{1,2}, {0,5}, {3,2}, {6,1}} {{1,2}} wtTs[1]=1 {{6,1}} wnTs[0]=1 {{6,1}, {1,2}} wnTs[1]=0
3284debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
3285debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
3286debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
3287debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.5 (2,3) tEnd=0.704088595 other=1 otherT=0.500000029 otherIndex=3 windSum=? windValue=1 oppValue=0
3288debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.704088595 (2.8621788,1.62756431) tEnd=1 other=2 otherT=0.627564257 otherIndex=2 windSum=? windValue=1 oppValue=0
3289debugShowActiveSpans id=4 (5,0 2,3) t=0 (5,0) tEnd=0.5 other=3 otherT=1 otherIndex=7 windSum=? windValue=1 oppValue=0
3290debugShowActiveSpans id=4 (5,0 2,3) t=0.5 (3.5,1.5) tEnd=1 other=2 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
3291debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0 (1,2) tEnd=0.5 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3292debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=? windValue=1 oppValue=0
3293debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
3294debugShowActiveSpans id=2 (6,1 1,2) t=0.5 (3.5,1.5) tEnd=0.627564257 other=4 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
3295debugShowActiveSpans id=2 (6,1 1,2) t=0.627564257 (2.8621788,1.62756431) tEnd=1 other=3 otherT=0.704088595 otherIndex=6 windSum=? windValue=1 oppValue=0
3296(gdb) continue
3297findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=1
3298debugShowSort [0] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=1 tEnd=0.704088595 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
3299debugShowSort [1] {{5,0}, {2,3}} tStart=0 tEnd=0.5 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
3300markWinding id=3 (2,3 1,6 2,1 5,0) t=0.704088595 [6] (2.8621788,1.62756431) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3301markWinding id=4 (5,0 2,3) t=0 [0] (5,0) tEnd=0.5 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3302markWinding id=3 (2,3 1,6 2,1 5,0) t=0.704088595 [6] (2.8621788,1.62756431) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
3303activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
3304markDoneBinary id=3 (2,3 1,6 2,1 5,0) t=0.704088595 [6] (2.8621788,1.62756431) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
3305markDoneBinary id=4 (5,0 2,3) t=0 [0] (5,0) tEnd=0.5 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
3306findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1
3307debugShowSort [0] {{6,1}, {1,2}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
3308debugShowSort [1] {{5,0}, {2,3}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1
3309debugShowSort [2] {{6,1}, {1,2}} tStart=0.5 tEnd=0.627564257 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
3310debugShowSort [3] {{5,0}, {2,3}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
3311findChaseOp debugShowSort contourWinding=0 oppContourWinding=0 sign=1
3312debugShowSort [1] {{5,0}, {2,3}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
3313debugShowSort [2] {{6,1}, {1,2}} tStart=0.5 tEnd=0.627564257 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
3314debugShowSort [3] {{5,0}, {2,3}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
3315debugShowSort [0] {{6,1}, {1,2}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
3316markWinding id=2 (6,1 1,2) t=0.5 [1] (3.5,1.5) tEnd=0.627564257 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
3317markWinding id=4 (5,0 2,3) t=0.5 [1] (3.5,1.5) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
3318markWinding id=2 (6,1 1,2) t=0 [0] (6,1) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3319markWinding id=1 (1,2 0,5 3,2 6,1) t=0.500000029 [3] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3320debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
3321debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
3322debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
3323debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.5 (2,3) tEnd=0.704088595 other=1 otherT=0.500000029 otherIndex=3 windSum=? windValue=1 oppValue=0
3324debugShowActiveSpans id=4 (5,0 2,3) t=0.5 (3.5,1.5) tEnd=1 other=2 otherT=0.5 otherIndex=1 windSum=-1 windValue=1 oppValue=0
3325debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0 (1,2) tEnd=0.5 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3326debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=1 windValue=1 oppValue=0
3327debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0
3328debugShowActiveSpans id=2 (6,1 1,2) t=0.5 (3.5,1.5) tEnd=0.627564257 other=4 otherT=0.5 otherIndex=1 windSum=1 windValue=1 oppValue=0
3329debugShowActiveSpans id=2 (6,1 1,2) t=0.627564257 (2.8621788,1.62756431) tEnd=1 other=3 otherT=0.704088595 otherIndex=6 windSum=? windValue=1 oppValue=0
3330activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
3331markDoneBinary id=2 (6,1 1,2) t=0.5 [1] (3.5,1.5) tEnd=0.627564257 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
3332findChaseOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1
3333debugShowSort [0] {{6,1}, {1,2}} tStart=0.627564257 tEnd=0.5 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
3334debugShowSort [1] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.704088595 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
3335debugShowSort [2] {{6,1}, {1,2}} tStart=0.627564257 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
3336debugShowSort [3] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.704088595 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
3337findChaseOp debugShowSort contourWinding=1 oppContourWinding=-1 sign=1
3338debugShowSort [0] {{6,1}, {1,2}} tStart=0.627564257 tEnd=0.5 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
3339debugShowSort [1] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.704088595 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
3340debugShowSort [2] {{6,1}, {1,2}} tStart=0.627564257 tEnd=1 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
3341debugShowSort [3] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.704088595 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
3342markWinding id=2 (6,1 1,2) t=0.627564257 [2] (2.8621788,1.62756431) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3343markWinding id=1 (1,2 0,5 3,2 6,1) t=0 [0] (1,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3344markWinding id=3 (2,3 1,6 2,1 5,0) t=0.5 [5] (2,3) tEnd=0.704088595 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
3345debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
3346debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
3347debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
3348debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.5 (2,3) tEnd=0.704088595 other=1 otherT=0.500000029 otherIndex=3 windSum=-1 windValue=1 oppValue=0
3349debugShowActiveSpans id=4 (5,0 2,3) t=0.5 (3.5,1.5) tEnd=1 other=2 otherT=0.5 otherIndex=1 windSum=-1 windValue=1 oppValue=0
3350debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0 (1,2) tEnd=0.5 other=2 otherT=1 otherIndex=3 windSum=1 windValue=1 oppValue=0
3351debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=1 windValue=1 oppValue=0
3352debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0
3353debugShowActiveSpans id=2 (6,1 1,2) t=0.627564257 (2.8621788,1.62756431) tEnd=1 other=3 otherT=0.704088595 otherIndex=6 windSum=1 windValue=1 oppValue=0
3354activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
3355findNextOp simple
3356markDoneBinary id=2 (6,1 1,2) t=0.627564257 [2] (2.8621788,1.62756431) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3357bridgeOp current id=2 from=(2.8621788,1.62756431) to=(1,2)
3358setSpans all tiny unsortable [1] (2,3) [0] (1,2)
3359setSpans all tiny unsortable [1] (2,3) [3] (2.00000024,3)
3360markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0 [0] (1,2) tEnd=0.5 newWindSum=0 windSum=1 windValue=1
3361markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.5 [1] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1
3362markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0 [2] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1
3363markUnsortable id=4 (5,0 2,3) t=1 [3] (2,3) tEnd=1 newWindSum=0 windSum=? windValue=1
3364findNextOp debugShowSort contourWinding=1 oppContourWinding=0 sign=1
3365debugShowSort [0] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=0 tiny=0 opp=0
3366debugShowSort [1] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.5 tEnd=0.500000029 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=1 tiny=1 opp=0
3367debugShowSort [2] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
3368debugShowSort [3] {{5,0}, {2,3}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=-1 1->0 (max=1) done=0 tiny=0 opp=1
3369path.moveTo(2.8621788,1.62756431);
3370path.lineTo(1,2);
3371path.cubicTo(0.5,3.5, 1,3.5, 2,3);
3372markDoneBinary id=1 (1,2 0,5 3,2 6,1) t=0 [0] (1,2) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3373debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
3374debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
3375debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
3376debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.5 (2,3) tEnd=0.704088595 other=1 otherT=0.500000029 otherIndex=3 windSum=-1 windValue=1 oppValue=0
3377debugShowActiveSpans id=4 (5,0 2,3) t=0.5 (3.5,1.5) tEnd=1 other=2 otherT=0.5 otherIndex=1 windSum=-1 windValue=1 oppValue=0
3378debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=1 windValue=1 oppValue=0
3379debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0
3380activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
3381setSpans unsortable [2] (2,3) [3] (2,3)
3382setSpans all tiny unsortable [4] (2,3) [2] (2,3)
3383setSpans all tiny unsortable [2] (2,3) [3] (2.00000024,3)
3384setSpans all tiny unsortable [2] (2,3) [0] (1,2)
3385markUnsortable id=4 (5,0 2,3) t=0.5 [1] (3.5,1.5) tEnd=1 newWindSum=0 windSum=-1 windValue=1
3386markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0 [1] (2,3) tEnd=0 newWindSum=0 windSum=? windValue=1
3387markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [4] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1
3388markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [3] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1
3389markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.5 [2] (2,3) tEnd=0.500000029 newWindSum=0 windSum=? windValue=1
3390markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.5 [1] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1
3391findNextOp debugShowSort contourWinding=0 oppContourWinding=1 sign=1
3392debugShowSort [0] {{5,0}, {2,3}} tStart=1 tEnd=0.5 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
3393debugShowSort [1] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0 tEnd=0.5 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
3394debugShowSort [2] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=1 tiny=1 opp=0
3395debugShowSort [3] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
3396debugShowSort [4] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.5 tEnd=0.500000029 sign=-1 windValue=1 windSum=? 1->2 (max=2) done=1 tiny=1 opp=1
3397debugShowSort [5] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=1 2->1 (max=2) done=1 tiny=0 opp=1
3398markDoneBinary id=4 (5,0 2,3) t=0.5 [1] (3.5,1.5) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
3399path.moveTo(3.5,1.5);
3400path.lineTo(2,3);
3401debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
3402debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
3403debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
3404debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0.5 (2,3) tEnd=0.704088595 other=1 otherT=0.500000029 otherIndex=3 windSum=-1 windValue=1 oppValue=0
3405debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=1 windValue=1 oppValue=0
3406debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0
3407activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
3408markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [5] (2,3) tEnd=0.704088595 newWindSum=0 windSum=-1 windValue=1
3409markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [4] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1
3410markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.500000029 [3] (2,3) tEnd=1 newWindSum=0 windSum=1 windValue=1
3411markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.5 [2] (2,3) tEnd=0.500000029 newWindSum=0 windSum=? windValue=1
3412findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
3413debugShowSort [0] {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0.704088595 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
3414debugShowSort [1] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0.5 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=1 tiny=1 opp=0
3415debugShowSort [2] {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.500000029 tEnd=1 sign=-1 windValue=1 windSum=1 1->2 (max=2) done=0 tiny=0 opp=1
3416debugShowSort [3] {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.500000029 tEnd=0.5 sign=1 windValue=1 windSum=? 2->1 (max=2) done=1 tiny=1 opp=1
3417path.moveTo(2.8621788,1.62756431);
3418path.cubicTo(2.49148154,2.10034132, 2.20408869,2.59182286, 2,3);
3419markDoneBinary id=3 (2,3 1,6 2,1 5,0) t=0.5 [5] (2,3) tEnd=0.704088595 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
3420debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
3421debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
3422debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
3423debugShowActiveSpans id=1 (1,2 0,5 3,2 6,1) t=0.500000029 (2,3) tEnd=1 other=3 otherT=0.5 otherIndex=5 windSum=1 windValue=1 oppValue=0
3424debugShowActiveSpans id=2 (6,1 1,2) t=0 (6,1) tEnd=0.5 other=1 otherT=1 otherIndex=4 windSum=1 windValue=1 oppValue=0
3425activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
3426findNextOp simple
3427markDoneBinary id=2 (6,1 1,2) t=0 [0] (6,1) tEnd=0.5 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3428bridgeOp current id=2 from=(3.5,1.5) to=(6,1)
3429setSpans unsortable [3] (2.00000024,3) [4] (6,1)
3430setSpans unsortable [3] (2.00000024,3) [2] (2,3)
3431setSpans unsortable [5] (2,3) [6] (2.8621788,1.62756431)
3432markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.500000029 [3] (2,3) tEnd=1 newWindSum=0 windSum=1 windValue=1
3433markUnsortable id=1 (1,2 0,5 3,2 6,1) t=0.5 [2] (2,3) tEnd=0.500000029 newWindSum=0 windSum=? windValue=1
3434markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [5] (2,3) tEnd=0.704088595 newWindSum=0 windSum=-1 windValue=1
3435markUnsortable id=3 (2,3 1,6 2,1 5,0) t=0.5 [4] (2,3) tEnd=0.5 newWindSum=0 windSum=? windValue=1
3436findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
3437debugShowSort [0] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.500000029 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
3438debugShowSort [1] *** UNSORTABLE *** {{1,2}, {0,5}, {3,2}, {6,1}} tStart=0.500000029 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=1 tiny=1 opp=0
3439debugShowSort [2] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0.704088595 sign=-1 windValue=1 windSum=-1 0->1 (max=1) done=1 tiny=0 opp=1
3440debugShowSort [3] *** UNSORTABLE *** {{2,3}, {1,6}, {2,1}, {5,0}} tStart=0.5 tEnd=0.5 sign=1 windValue=1 windSum=? 1->0 (max=1) done=1 tiny=1 opp=1
3441path.moveTo(3.5,1.5);
3442path.lineTo(6,1);
3443path.cubicTo(4.5,1.5, 3.00000024,2.49999976, 2,3);
3444markDoneBinary id=1 (1,2 0,5 3,2 6,1) t=0.500000029 [3] (2,3) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3445debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=3 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
3446debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=4 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
3447debugShowActiveSpans id=3 (2,3 1,6 2,1 5,0) t=0 (2,3) tEnd=0.5 other=1 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
3448</div>
3449
caryclark@google.com996d78b2013-03-14 16:24:30 +00003450<div id="cubicOp62d">
3451 SimplifyNew_Test [cubicOp62d]
3452{{1,3}, {5,6}, {5,3}, {5,4}},
3453{{5,4}, {1,3}},
3454op difference
3455{{3,5}, {4,5}, {3,1}, {6,5}},
3456{{6,5}, {3,5}},
3457debugShowCubicIntersection no self intersect {{1,3}, {5,6}, {5,3}, {5,4}}
3458debugShowCubicLineIntersection wtTs[0]=0 {{1,3}, {5,6}, {5,3}, {5,4}} {{1,3}} wtTs[1]=0.666666667 {{4.8518518518518512,3.9629629629629628}} wtTs[2]=1 {{5,4}} wnTs[0]=1 {{5,4}, {1,3}} wnTs[1]=0.037037037 wnTs[2]=0
3459debugShowCubicIntersection wtTs[0]=0.278899971 {{1,3}, {5,6}, {5,3}, {5,4}} {{3.5001544800676263,4.3269091333431628}} wtTs[1]=0.855895664 {{4.9880300830066844,3.7869549154423883}} wtTs[2]=0.865207906 {{4.9902038991416013,3.7891603690182212}} wtTs[3]=0.865213351 {{4.9902050861407137,3.789162057358868}} wnTs[0]=0.2789 {{3,5}, {4,5}, {3,1}, {6,5}} wnTs[1]=0.864850875 wnTs[2]=0.865207887 wnTs[3]=0.865208087
3460debugShowCubicLineIntersection wtTs[0]=0.448187637 {{3,5}, {4,5}, {3,1}, {6,5}} {{3.6795004703683416,3.6698751175920856}} wnTs[0]=0.330125 {{5,4}, {1,3}}
3461debugShowCubicIntersection no self intersect {{3,5}, {4,5}, {3,1}, {6,5}}
3462debugShowCubicLineIntersection wtTs[0]=0 {{3,5}, {4,5}, {3,1}, {6,5}} {{3,5}} wtTs[1]=1 {{6,5}} wnTs[0]=1 {{6,5}, {3,5}} wnTs[1]=0
3463debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0 (1,3) tEnd=0.278899971 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3464debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.278899971 (3.5001545,4.32690907) tEnd=0.666666667 other=3 otherT=0.278899971 otherIndex=1 windSum=? windValue=1 oppValue=0
3465debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.666666667 (4.85185194,3.96296287) tEnd=0.855895664 other=2 otherT=0.037037037 otherIndex=1 windSum=? windValue=1 oppValue=0
3466debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.855895664 (4.98802996,3.78695488) tEnd=0.865207906 other=3 otherT=0.864850875 otherIndex=3 windSum=? windValue=1 oppValue=0
3467debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.865207906 (4.99020386,3.78916025) tEnd=0.865213351 other=3 otherT=0.865207887 otherIndex=4 windSum=? windValue=1 oppValue=0
3468debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.865213351 (4.99020529,3.78916216) tEnd=1 other=3 otherT=0.865208087 otherIndex=5 windSum=? windValue=1 oppValue=0
3469debugShowActiveSpans id=2 (5,4 1,3) t=0 (5,4) tEnd=0.037037037 other=1 otherT=1 otherIndex=6 windSum=? windValue=1 oppValue=0
3470debugShowActiveSpans id=2 (5,4 1,3) t=0.037037037 (4.85185194,3.96296287) tEnd=0.330124882 other=1 otherT=0.666666667 otherIndex=2 windSum=? windValue=1 oppValue=0
3471debugShowActiveSpans id=2 (5,4 1,3) t=0.330124882 (3.67950058,3.66987514) tEnd=1 other=3 otherT=0.448187637 otherIndex=2 windSum=? windValue=1 oppValue=0
3472debugShowActiveSpans id=3 (3,5 4,5 3,1 6,5) t=0 (3,5) tEnd=0.278899971 other=4 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0
3473debugShowActiveSpans id=3 (3,5 4,5 3,1 6,5) t=0.278899971 (3.5001545,4.32690907) tEnd=0.448187637 other=1 otherT=0.278899971 otherIndex=1 windSum=? windValue=1 oppValue=0
3474debugShowActiveSpans id=3 (3,5 4,5 3,1 6,5) t=0.448187637 (3.67950058,3.66987514) tEnd=0.864850875 other=2 otherT=0.330124882 otherIndex=2 windSum=? windValue=1 oppValue=0
3475debugShowActiveSpans id=3 (3,5 4,5 3,1 6,5) t=0.864850875 (4.98802996,3.78695488) tEnd=0.865207887 other=1 otherT=0.855895664 otherIndex=3 windSum=? windValue=1 oppValue=0
3476debugShowActiveSpans id=3 (3,5 4,5 3,1 6,5) t=0.865207887 (4.99020386,3.78916025) tEnd=0.865208087 other=1 otherT=0.865207906 otherIndex=4 windSum=? windValue=1 oppValue=0
3477debugShowActiveSpans id=3 (3,5 4,5 3,1 6,5) t=0.865208087 (4.99020529,3.78916216) tEnd=1 other=1 otherT=0.865213351 otherIndex=5 windSum=? windValue=1 oppValue=0
3478debugShowActiveSpans id=4 (6,5 3,5) t=0 (6,5) tEnd=1 other=3 otherT=1 otherIndex=6 windSum=? windValue=1 oppValue=0
3479findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
3480debugShowSort [0] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0 tEnd=0.278899971 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
3481debugShowSort [1] {{5,4}, {1,3}} tStart=1 tEnd=0.330124882 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
3482markWinding id=1 (1,3 5,6 5,3 5,4) t=0 [0] (1,3) tEnd=0.278899971 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3483markWinding id=2 (5,4 1,3) t=0.330124882 [2] (3.67950058,3.66987514) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1
3484markWinding id=1 (1,3 5,6 5,3 5,4) t=0 [0] (1,3) tEnd=0.278899971 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3485activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
3486findNextOp simple
3487markDoneBinary id=1 (1,3 5,6 5,3 5,4) t=0 [0] (1,3) tEnd=0.278899971 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3488bridgeOp current id=1 from=(3.5001545,4.32690907) to=(1,3)
3489path.moveTo(3.5001545,4.32690907);
3490path.cubicTo(2.92005897,4.20668888, 2.11559987,3.83669996, 1,3);
3491findNextOp debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
3492debugShowSort [1] {{5,4}, {1,3}} tStart=0.330124882 tEnd=1 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
3493debugShowSort [2] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.448187637 tEnd=0.278899971 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
3494debugShowSort [3] {{5,4}, {1,3}} tStart=0.330124882 tEnd=0.037037037 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
3495debugShowSort [0] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.448187637 tEnd=0.864850875 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=1
3496findNextOp firstIndex=[1] sign=-1
3497activeOp op=diff miFrom=1 miTo=1 suFrom=0 suTo=1 result=1
3498markWinding id=3 (3,5 4,5 3,1 6,5) t=0.278899971 [1] (3.5001545,4.32690907) tEnd=0.448187637 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
3499findNextOp chase.append id=3
3500activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
3501markDoneBinary id=2 (5,4 1,3) t=0.037037037 [1] (4.85185194,3.96296287) tEnd=0.330124882 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
3502findNextOp chase.append id=2
3503activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
3504markDoneBinary id=3 (3,5 4,5 3,1 6,5) t=0.448187637 [2] (3.67950058,3.66987514) tEnd=0.864850875 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3505findNextOp chase.append id=3
3506markDoneBinary id=2 (5,4 1,3) t=0.330124882 [2] (3.67950058,3.66987514) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1
3507findNextOp from:[2] to:[3] start=2 end=1
3508bridgeOp current id=2 from=(1,3) to=(3.67950058,3.66987514)
3509findNextOp debugShowSort contourWinding=-1 oppContourWinding=1 sign=-1
3510debugShowSort [0] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.278899971 tEnd=0.448187637 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
3511debugShowSort [1] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.278899971 tEnd=0 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=1
3512debugShowSort [2] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.278899971 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
3513debugShowSort [3] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.278899971 tEnd=0.666666667 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=1
3514findNextOp firstIndex=[0] sign=-1
3515activeOp op=diff miFrom=1 miTo=0 suFrom=0 suTo=0 result=1
3516activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
3517markDoneBinary id=3 (3,5 4,5 3,1 6,5) t=0 [0] (3,5) tEnd=0.278899971 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3518markDoneBinary id=4 (6,5 3,5) t=0 [0] (6,5) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3519markDoneBinary id=3 (3,5 4,5 3,1 6,5) t=0.865208087 [5] (4.99020529,3.78916216) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3520findNextOp chase.append id=3
3521activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
3522markDoneBinary id=1 (1,3 5,6 5,3 5,4) t=0.278899971 [1] (3.5001545,4.32690907) tEnd=0.666666667 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
3523findNextOp chase.append id=1
3524markDoneBinary id=3 (3,5 4,5 3,1 6,5) t=0.278899971 [1] (3.5001545,4.32690907) tEnd=0.448187637 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1
3525findNextOp from:[3] to:[1] start=1 end=0
3526bridgeOp current id=3 from=(3.67950058,3.66987514) to=(3.5001545,4.32690907)
3527path.lineTo(3.67950058,3.66987514);
3528path.cubicTo(3.60967231,3.86879396, 3.5595932,4.10721159, 3.5001545,4.32690907);
3529path.close();
3530findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=-1
3531debugShowSort [0] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.666666667 tEnd=0.855895664 sign=-1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
3532debugShowSort [1] {{5,4}, {1,3}} tStart=0.037037037 tEnd=0.330124882 sign=-1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=0
3533debugShowSort [2] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.666666667 tEnd=0.278899971 sign=1 windValue=1 windSum=1 ?->? (max=?) done=1 tiny=0 opp=0
3534debugShowSort [3] {{5,4}, {1,3}} tStart=0.037037037 tEnd=0 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
3535findChaseOp debugShowSort contourWinding=0 oppContourWinding=-1 sign=-1
3536debugShowSort [1] {{5,4}, {1,3}} tStart=0.037037037 tEnd=0.330124882 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
3537debugShowSort [2] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.666666667 tEnd=0.278899971 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
3538debugShowSort [3] {{5,4}, {1,3}} tStart=0.037037037 tEnd=0 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
3539debugShowSort [0] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.666666667 tEnd=0.855895664 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
3540markWinding id=2 (5,4 1,3) t=0 [0] (5,4) tEnd=0.037037037 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
3541markWinding id=1 (1,3 5,6 5,3 5,4) t=0.865213351 [5] (4.99020529,3.78916216) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
3542markWinding id=1 (1,3 5,6 5,3 5,4) t=0.666666667 [2] (4.85185194,3.96296287) tEnd=0.855895664 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
3543debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.666666667 (4.85185194,3.96296287) tEnd=0.855895664 other=2 otherT=0.037037037 otherIndex=1 windSum=-1 windValue=1 oppValue=0
3544debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.855895664 (4.98802996,3.78695488) tEnd=0.865207906 other=3 otherT=0.864850875 otherIndex=3 windSum=? windValue=1 oppValue=0
3545debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.865207906 (4.99020386,3.78916025) tEnd=0.865213351 other=3 otherT=0.865207887 otherIndex=4 windSum=? windValue=1 oppValue=0
3546debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.865213351 (4.99020529,3.78916216) tEnd=1 other=3 otherT=0.865208087 otherIndex=5 windSum=-1 windValue=1 oppValue=0
3547debugShowActiveSpans id=2 (5,4 1,3) t=0 (5,4) tEnd=0.037037037 other=1 otherT=1 otherIndex=6 windSum=-1 windValue=1 oppValue=0
3548debugShowActiveSpans id=3 (3,5 4,5 3,1 6,5) t=0.864850875 (4.98802996,3.78695488) tEnd=0.865207887 other=1 otherT=0.855895664 otherIndex=3 windSum=? windValue=1 oppValue=0
3549debugShowActiveSpans id=3 (3,5 4,5 3,1 6,5) t=0.865207887 (4.99020386,3.78916025) tEnd=0.865208087 other=1 otherT=0.865207906 otherIndex=4 windSum=? windValue=1 oppValue=0
3550activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
3551markDoneBinary id=2 (5,4 1,3) t=0 [0] (5,4) tEnd=0.037037037 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
3552markDoneBinary id=1 (1,3 5,6 5,3 5,4) t=0.865213351 [5] (4.99020529,3.78916216) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
3553findChaseOp debugShowSort contourWinding=? oppContourWinding=? sign=1
3554debugShowSort [0] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.865213351 tEnd=0.865207906 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=0
3555debugShowSort [1] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.865208087 tEnd=0.865207887 sign=1 windValue=1 windSum=? ?->? (max=?) done=0 tiny=0 opp=1
3556debugShowSort [2] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.865213351 tEnd=1 sign=-1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=0
3557debugShowSort [3] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.865208087 tEnd=1 sign=-1 windValue=1 windSum=-1 ?->? (max=?) done=1 tiny=0 opp=1
3558findChaseOp debugShowSort contourWinding=-1 oppContourWinding=-1 sign=-1
3559debugShowSort [2] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.865213351 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
3560debugShowSort [3] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.865208087 tEnd=1 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
3561debugShowSort [0] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.865213351 tEnd=0.865207906 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
3562debugShowSort [1] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.865208087 tEnd=0.865207887 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=1
3563markWinding id=1 (1,3 5,6 5,3 5,4) t=0.865207906 [4] (4.99020386,3.78916025) tEnd=0.865213351 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3564markWinding id=3 (3,5 4,5 3,1 6,5) t=0.865207887 [4] (4.99020386,3.78916025) tEnd=0.865208087 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1
3565debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.666666667 (4.85185194,3.96296287) tEnd=0.855895664 other=2 otherT=0.037037037 otherIndex=1 windSum=-1 windValue=1 oppValue=0
3566debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.855895664 (4.98802996,3.78695488) tEnd=0.865207906 other=3 otherT=0.864850875 otherIndex=3 windSum=? windValue=1 oppValue=0
3567debugShowActiveSpans id=1 (1,3 5,6 5,3 5,4) t=0.865207906 (4.99020386,3.78916025) tEnd=0.865213351 other=3 otherT=0.865207887 otherIndex=4 windSum=-1 windValue=1 oppValue=0
3568debugShowActiveSpans id=3 (3,5 4,5 3,1 6,5) t=0.864850875 (4.98802996,3.78695488) tEnd=0.865207887 other=1 otherT=0.855895664 otherIndex=3 windSum=? windValue=1 oppValue=0
3569debugShowActiveSpans id=3 (3,5 4,5 3,1 6,5) t=0.865207887 (4.99020386,3.78916025) tEnd=0.865208087 other=1 otherT=0.865207906 otherIndex=4 windSum=-1 windValue=1 oppValue=0
3570activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
3571findNextOp debugShowSort contourWinding=-1 oppContourWinding=0 sign=-1
3572debugShowSort [2] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.865207906 tEnd=0.865213351 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
3573debugShowSort [3] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.865207887 tEnd=0.865208087 sign=-1 windValue=1 windSum=-1 0->1 (max=1) done=0 tiny=0 opp=1
3574debugShowSort [0] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.865207906 tEnd=0.855895664 sign=1 windValue=1 windSum=? 0->-1 (max=-1) done=0 tiny=0 opp=0
3575debugShowSort [1] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.865207887 tEnd=0.864850875 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=1
3576findNextOp firstIndex=[2] sign=-1
3577activeOp op=diff miFrom=0 miTo=0 suFrom=0 suTo=1 result=0
3578activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
3579markDoneBinary id=1 (1,3 5,6 5,3 5,4) t=0.855895664 [3] (4.98802996,3.78695488) tEnd=0.865207906 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1
3580findNextOp chase.append id=1
3581activeOp op=diff miFrom=1 miTo=1 suFrom=1 suTo=0 result=1
3582markWinding id=3 (3,5 4,5 3,1 6,5) t=0.864850875 [3] (4.98802996,3.78695488) tEnd=0.865207887 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1
3583findNextOp chase.append id=3
3584markDoneBinary id=1 (1,3 5,6 5,3 5,4) t=0.865207906 [4] (4.99020386,3.78916025) tEnd=0.865213351 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
3585findNextOp from:[1] to:[3] start=4 end=3
3586bridgeOp current id=1 from=(4.99020529,3.78916216) to=(4.99020386,3.78916025)
3587path.moveTo(4.99020529,3.78916216);
3588path.cubicTo(4.99020433,3.78916144, 4.99020433,3.78916097, 4.99020386,3.78916025);
3589findNextOp debugShowSort contourWinding=0 oppContourWinding=-1 sign=-1
3590debugShowSort [2] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.864850875 tEnd=0.865207887 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=0 tiny=0 opp=0
3591debugShowSort [3] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.855895664 tEnd=0.865207906 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=1
3592debugShowSort [0] {{3,5}, {4,5}, {3,1}, {6,5}} tStart=0.864850875 tEnd=0.448187637 sign=1 windValue=1 windSum=-1 1->0 (max=1) done=1 tiny=0 opp=0
3593debugShowSort [1] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.855895664 tEnd=0.666666667 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=1
3594findNextOp firstIndex=[2] sign=-1
3595activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
3596activeOp op=diff miFrom=0 miTo=0 suFrom=1 suTo=0 result=0
3597activeOp op=diff miFrom=0 miTo=1 suFrom=0 suTo=0 result=1
3598markDoneBinary id=3 (3,5 4,5 3,1 6,5) t=0.864850875 [3] (4.98802996,3.78695488) tEnd=0.865207887 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1
3599findNextOp from:[3] to:[1] start=3 end=2
3600bridgeOp current id=3 from=(4.99020386,3.78916025) to=(4.98802996,3.78695488)
3601path.cubicTo(4.98947859,3.78842425, 4.98875427,3.78768921, 4.98802996,3.78695488);
3602findNextOp debugShowSort contourWinding=-1 oppContourWinding=-1 sign=-1
3603debugShowSort [0] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.666666667 tEnd=0.855895664 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=0 tiny=0 opp=0
3604debugShowSort [1] {{5,4}, {1,3}} tStart=0.037037037 tEnd=0.330124882 sign=-1 windValue=1 windSum=1 0->1 (max=1) done=1 tiny=0 opp=0
3605debugShowSort [2] {{1,3}, {5,6}, {5,3}, {5,4}} tStart=0.666666667 tEnd=0.278899971 sign=1 windValue=1 windSum=1 1->0 (max=1) done=1 tiny=0 opp=0
3606debugShowSort [3] {{5,4}, {1,3}} tStart=0.037037037 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=1 tiny=0 opp=0
3607findNextOp firstIndex=[0] sign=-1
3608activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
3609activeOp op=diff miFrom=1 miTo=0 suFrom=1 suTo=1 result=0
3610activeOp op=diff miFrom=0 miTo=1 suFrom=1 suTo=1 result=0
3611markDoneBinary id=1 (1,3 5,6 5,3 5,4) t=0.666666667 [2] (4.85185194,3.96296287) tEnd=0.855895664 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1
3612path.cubicTo(4.97231197,3.77658033, 4.93595362,3.85783577, 4.85185194,3.96296287);
3613</div>
3614
caryclark@google.comebf95ba2013-04-08 11:53:42 +00003615<div id="testQuad1">
3616 RunTestSet [testQuad1]
3617{{0,0}, {0,0}, {0,1}},
3618{{0,1}, {1,1}},
3619{{1,1}, {0,0}},
3620{{0,0}, {1,1}, {0,2}},
3621{{0,2}, {0,0}},
3622debugShowLineIntersection wtTs[0]=0 {{0,0}, {0,1}} {{0,1}} wnTs[0]=1 {{0,1}, {1,1}}
3623debugShowLineIntersection wtTs[0]=1 {{0,0}, {0,1}} {{0,0}} wnTs[0]=0 {{1,1}, {0,0}}
3624debugShowLineIntersection wtTs[0]=-0 {{0,1}, {1,1}} {{1,1}} wnTs[0]=1 {{1,1}, {0,0}}
3625debugShowQuadLineIntersection wtTs[0]=0 {{0,0}, {1,1}, {0,2}} {{0,0}} wnTs[0]=0 {{0,0}, {0,1}}
3626debugShowLineIntersection wtTs[0]=1 {{0,0}, {0,1}} {{0,0}} wtTs[1]=0.5 {{0,1}} wnTs[0]=-0 {{0,2}, {0,0}} wnTs[1]=1
3627debugShowQuadLineIntersection wtTs[0]=0.5 {{0,0}, {1,1}, {0,2}} {{0.5,1}} wnTs[0]=0.5 {{0,1}, {1,1}}
3628debugShowLineIntersection wtTs[0]=0.5 {{0,1}, {1,1}} {{0,1}} wnTs[0]=0 {{0,2}, {0,0}}
3629debugShowQuadLineIntersection wtTs[0]=0 {{0,0}, {1,1}, {0,2}} {{0,0}} wnTs[0]=1 {{1,1}, {0,0}}
3630debugShowLineIntersection wtTs[0]=1 {{1,1}, {0,0}} {{0,0}} wnTs[0]=1 {{0,2}, {0,0}}
3631debugShowQuadLineIntersection wtTs[0]=0 {{0,0}, {1,1}, {0,2}} {{0,0}} wtTs[1]=1 {{0,2}} wnTs[0]=1 {{0,2}, {0,0}} wnTs[1]=0
3632debugShowTs id=1 [o=3,4 t=0 0,0 w=1 o=0] [o=2 t=1 0,1 w=1 o=0]
3633debugShowTs id=5 [o=4 t=0 0,2 w=1 o=0] [o=2 t=0.5 0,1 w=1 o=0] [o=3,4 t=1 0,0 w=1 o=0]
3634addTPair addTPair this=5 0.5 other=1 1
3635debugShowTs id=1 [o=3,4 t=0 0,0 w=1 o=0] [o=2,5 t=1 0,1 w=1 o=0]
3636debugShowTs id=5 [o=4 t=0 0,2 w=1 o=0] [o=2,1 t=0.5 0,1 w=1 o=0] [o=3,4 t=1 0,0 w=1 o=0]
3637debugShowTs id=1 [o=3,4 t=0 0,0 w=0 o=0] [o=2,5 t=1 0,1 w=1 o=0] done
3638debugShowTs id=5 [o=4 t=0 0,2 w=1 o=0] [o=2,1 t=0.5 0,1 w=0 o=0] [o=3,4 t=1 0,0 w=1 o=0]
3639debugShowActiveSpans id=2 (0,1 1,1) t=0 (0,1) tEnd=0.5 other=1 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
3640debugShowActiveSpans id=2 (0,1 1,1) t=0 (0,1) tEnd=0.5 other=5 otherT=0.5 otherIndex=1 windSum=? windValue=1 oppValue=0
3641debugShowActiveSpans id=2 (0,1 1,1) t=0.5 (0.5,1) tEnd=1 other=4 otherT=0.5 otherIndex=3 windSum=? windValue=1 oppValue=0
3642debugShowActiveSpans id=3 (1,1 0,0) t=-0 (1,1) tEnd=1 other=2 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0
3643debugShowActiveSpans id=4 (0,0 1,1 0,2) t=0 (0,0) tEnd=0.5 other=1 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0
3644debugShowActiveSpans id=4 (0,0 1,1 0,2) t=0 (0,0) tEnd=0.5 other=3 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0
3645debugShowActiveSpans id=4 (0,0 1,1 0,2) t=0 (0,0) tEnd=0.5 other=5 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
3646debugShowActiveSpans id=4 (0,0 1,1 0,2) t=0.5 (0.5,1) tEnd=1 other=2 otherT=0.5 otherIndex=2 windSum=? windValue=1 oppValue=0
3647debugShowActiveSpans id=5 (0,2 0,0) t=0 (0,2) tEnd=0.5 other=4 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=0
3648findTop debugShowSort contourWinding=0 oppContourWinding=0 sign=-1
3649debugShowSort [0] {{0,0}, {1,1}, {0,2}} tStart=0 tEnd=0.5 sign=-1 windValue=1 windSum=? 0->1 (max=1) done=0 tiny=0 opp=0
3650debugShowSort [1] {{1,1}, {0,0}} tStart=1 tEnd=-0 sign=1 windValue=1 windSum=? 1->0 (max=1) done=0 tiny=0 opp=0
3651findTop swap=1 serpentine=0 controls_contained_by_ends=0
3652markWinding id=4 (0,0 1,1 0,2) t=0 [0] (0,0) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3653markWinding id=4 (0,0 1,1 0,2) t=0 [1] (0,0) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3654markWinding id=4 (0,0 1,1 0,2) t=0 [2] (0,0) tEnd=0.5 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1
3655markWinding id=4 (0,0 1,1 0,2) t=0 [0] (0,0) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
3656markWinding id=4 (0,0 1,1 0,2) t=0 [1] (0,0) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
3657markWinding id=4 (0,0 1,1 0,2) t=0 [2] (0,0) tEnd=0.5 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1
3658findNextWinding debugShowSort contourWinding=0 oppContourWinding=0 sign=1
3659debugShowSort [0] {{0,0}, {1,1}, {0,2}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
3660debugShowSort [1] {{0,1}, {1,1}} tStart=0.5 tEnd=0 sign=1 windValue=1 windSum=? -1->-2 (max=-2) done=0 tiny=0 opp=0
3661debugShowSort [2] {{0,0}, {1,1}, {0,2}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=? -2->-1 (max=-2) done=0 tiny=0 opp=0
3662debugShowSort [3] {{0,1}, {1,1}} tStart=0.5 tEnd=1 sign=-1 windValue=1 windSum=? -1->0 (max=-1) done=0 tiny=0 opp=0
3663findNextWinding firstIndex=[0] sign=1
3664markDone id=2 (0,1 1,1) t=0 [0] (0,1) tEnd=0 newWindSum=-2 windSum=? windValue=1
3665markDone id=2 (0,1 1,1) t=0 [1] (0,1) tEnd=0.5 newWindSum=-2 windSum=? windValue=1
3666findNextWinding chase.append id=2
3667markDone id=4 (0,0 1,1 0,2) t=0.5 [3] (0.5,1) tEnd=1 newWindSum=-2 windSum=? windValue=1
3668markDone id=5 (0,2 0,0) t=0 [0] (0,2) tEnd=0.5 newWindSum=-2 windSum=? windValue=1
3669findNextWinding chase.append id=5
3670markWinding id=2 (0,1 1,1) t=0.5 [2] (0.5,1) tEnd=1 newWindSum=-1 windSum=? windValue=1
3671markWinding id=3 (1,1 0,0) t=-0 [0] (1,1) tEnd=1 newWindSum=-1 windSum=? windValue=1
3672findNextWinding chase.append id=3
3673markDoneUnary id=4 (0,0 1,1 0,2) t=0 [0] (0,0) tEnd=0 newWindSum=-1 windSum=-1 windValue=1
3674markDoneUnary id=4 (0,0 1,1 0,2) t=0 [1] (0,0) tEnd=0 newWindSum=-1 windSum=-1 windValue=1
3675markDoneUnary id=4 (0,0 1,1 0,2) t=0 [2] (0,0) tEnd=0.5 newWindSum=-1 windSum=-1 windValue=1
3676findNextWinding from:[4] to:[2] start=2 end=3
3677bridgeWinding current id=4 from=(0,0) to=(0.5,1)
3678path.moveTo(0,0);
3679path.quadTo(0.5,0.5, 0.5,1);
3680findNextWinding simple
3681markDoneUnary id=2 (0,1 1,1) t=0.5 [2] (0.5,1) tEnd=1 newWindSum=-1 windSum=-1 windValue=1
3682bridgeWinding current id=2 from=(0.5,1) to=(1,1)
3683findNextWinding debugShowSort contourWinding=0 oppContourWinding=? sign=1
3684debugShowSort [1] {{1,1}, {0,0}} tStart=1 tEnd=-0 sign=1 windValue=1 windSum=-1 0->-1 (max=-1) done=0 tiny=0 opp=0
3685debugShowSort [0] {{0,0}, {1,1}, {0,2}} tStart=0 tEnd=0.5 sign=-1 windValue=1 windSum=-1 -1->0 (max=-1) done=1 tiny=0 opp=0
3686findNextWinding firstIndex=[1] sign=1
3687markDoneUnary id=3 (1,1 0,0) t=-0 [0] (1,1) tEnd=1 newWindSum=-1 windSum=-1 windValue=1
3688findNextWinding from:[3] to:[4] start=1 end=3
3689bridgeWinding current id=3 from=(1,1) to=(0,0)
3690path.lineTo(1,1);
3691path.lineTo(0,0);
3692path.close();
3693</div>
3694
caryclark@google.comf839c032012-10-26 21:03:50 +00003695</div>
3696
3697<script type="text/javascript">
3698
3699var testDivs = [
caryclark@google.comebf95ba2013-04-08 11:53:42 +00003700 testQuad1,
caryclark@google.com996d78b2013-03-14 16:24:30 +00003701 cubicOp62d,
caryclark@google.com1304bb22013-03-13 20:29:41 +00003702 cubicOp61d,
3703 cubicOp58da,
3704 cubicOp58d,
3705 cubicOp57da,
3706 cubicOp56da,
3707 cubicOp55da,
3708 cubicOp55d,
3709 cubicOp54dd,
3710 cubicOp54dc,
3711 cubicOp54db,
3712 cubicOp54da,
3713 cubicOp54d,
3714 cubicOp53db,
3715 cubicOp53da,
3716 cubicOp53d,
3717 cubicOp52db,
3718 cubicOp52da,
3719 cubicOp51da,
3720 cubicOp51d,
3721 cubicOp50d,
3722 cubicOp49d,
3723 cubicOp48dc,
3724 cubicOp48db,
3725 cubicOp48da,
3726 cubicOp48d,
3727 cubicOp47db,
3728 cubicOp47da,
3729 cubicOp47d,
3730 cubicOp46db,
3731 cubicOp46da,
3732 cubicOp46d,
3733 cubicOp45d,
3734 cubicOp44d,
3735 cubicOp43d,
3736 cubicOp42d,
3737 cubicOp42da,
3738 cubicOp42db,
3739 cubicOp41i,
3740 cubicOp40d,
3741 cubicOp39da,
3742 cubicOp39d,
3743 cubicOp38d,
3744 cubicOp38da,
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003745 cubicOp36u,
3746 cubicOp35da,
caryclark@google.com1304bb22013-03-13 20:29:41 +00003747 cubicOp32d,
caryclark@google.comf839c032012-10-26 21:03:50 +00003748];
3749
3750var decimal_places = 3; // make this 3 to show more precision
3751
3752var tests = [];
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003753var testLines = [];
caryclark@google.comf839c032012-10-26 21:03:50 +00003754var testTitles = [];
3755var testIndex = 0;
3756var ctx;
3757
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003758var xmin, xmax;
3759var ymin, ymax;
caryclark@google.comf839c032012-10-26 21:03:50 +00003760var scale;
3761var mouseX, mouseY;
3762var srcLeft, srcTop;
caryclark@google.comf839c032012-10-26 21:03:50 +00003763var screenWidth, screenHeight;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003764var drawnPts, drawnLines, drawnQuads, drawnCubics;
3765var curveT = 0;
caryclark@google.comf839c032012-10-26 21:03:50 +00003766
caryclark@google.com1304bb22013-03-13 20:29:41 +00003767var pt_labels = 2;
3768var control_lines = 0;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003769var curve_t = false;
caryclark@google.comf839c032012-10-26 21:03:50 +00003770var debug_xy = false;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003771var step_limit = 0;
3772var draw_active = false;
3773var draw_add = false;
caryclark@google.com1304bb22013-03-13 20:29:41 +00003774var draw_deriviatives = 0;
3775var draw_hints = false;
3776var draw_hodo = 0;
3777var draw_intersection = 0;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003778var draw_intersectT = false;
caryclark@google.com1304bb22013-03-13 20:29:41 +00003779var draw_legend = true;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003780var draw_log = false;
3781var draw_mark = false;
caryclark@google.com1304bb22013-03-13 20:29:41 +00003782var draw_midpoint = false;
3783var draw_sequence = false;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003784var draw_sort = false;
caryclark@google.com1304bb22013-03-13 20:29:41 +00003785var draw_path = 3;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003786var draw_computed = 0;
caryclark@google.comf839c032012-10-26 21:03:50 +00003787
caryclark@google.com1304bb22013-03-13 20:29:41 +00003788var activeCount = 0;
3789var addCount = 0;
3790var sectCount = 0;
3791var sortCount = 0;
3792var markCount = 0;
3793var activeMax = 0;
3794var addMax = 0;
3795var sectMax = 0;
3796var sectMax2 = 0;
3797var sortMax = 0;
3798var markMax = 0;
3799var stepMax = 0;
3800var lastIndex = 0;
3801var hasPath = false;
3802var hasComputedPath = false;
3803
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003804var SPAN_ID = 0;
3805var SPAN_X1 = SPAN_ID + 1;
3806var SPAN_Y1 = SPAN_X1 + 1;
3807var SPAN_X2 = SPAN_Y1 + 1;
3808var SPAN_Y2 = SPAN_X2 + 1;
3809var SPAN_L_T = SPAN_Y2 + 1;
3810var SPAN_L_TX = SPAN_L_T + 1;
3811var SPAN_L_TY = SPAN_L_TX + 1;
3812var SPAN_L_TEND = SPAN_L_TY + 1;
3813var SPAN_L_OTHER = SPAN_L_TEND + 1;
3814var SPAN_L_OTHERT = SPAN_L_OTHER + 1;
3815var SPAN_L_OTHERI = SPAN_L_OTHERT + 1;
3816var SPAN_L_SUM = SPAN_L_OTHERI + 1;
3817var SPAN_L_VAL = SPAN_L_SUM + 1;
3818var SPAN_L_OPP = SPAN_L_VAL + 1;
caryclark@google.comf839c032012-10-26 21:03:50 +00003819
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003820var SPAN_X3 = SPAN_Y2 + 1;
3821var SPAN_Y3 = SPAN_X3 + 1;
3822var SPAN_Q_T = SPAN_Y3 + 1;
3823var SPAN_Q_TX = SPAN_Q_T + 1;
3824var SPAN_Q_TY = SPAN_Q_TX + 1;
3825var SPAN_Q_TEND = SPAN_Q_TY + 1;
3826var SPAN_Q_OTHER = SPAN_Q_TEND + 1;
3827var SPAN_Q_OTHERT = SPAN_Q_OTHER + 1;
3828var SPAN_Q_OTHERI = SPAN_Q_OTHERT + 1;
3829var SPAN_Q_SUM = SPAN_Q_OTHERI + 1;
3830var SPAN_Q_VAL = SPAN_Q_SUM + 1;
3831var SPAN_Q_OPP = SPAN_Q_VAL + 1;
caryclark@google.com47d73da2013-02-17 01:41:25 +00003832
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003833var SPAN_X4 = SPAN_Y3 + 1;
3834var SPAN_Y4 = SPAN_X4 + 1;
3835var SPAN_C_T = SPAN_Y4 + 1;
3836var SPAN_C_TX = SPAN_C_T + 1;
3837var SPAN_C_TY = SPAN_C_TX + 1;
3838var SPAN_C_TEND = SPAN_C_TY + 1;
3839var SPAN_C_OTHER = SPAN_C_TEND + 1;
3840var SPAN_C_OTHERT = SPAN_C_OTHER + 1;
3841var SPAN_C_OTHERI = SPAN_C_OTHERT + 1;
3842var SPAN_C_SUM = SPAN_C_OTHERI + 1;
3843var SPAN_C_VAL = SPAN_C_SUM + 1;
3844var SPAN_C_OPP = SPAN_C_VAL + 1;
caryclark@google.comf839c032012-10-26 21:03:50 +00003845
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003846var ACTIVE_LINE_SPAN = 1;
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003847var ACTIVE_QUAD_SPAN = ACTIVE_LINE_SPAN + 1;
3848var ACTIVE_CUBIC_SPAN = ACTIVE_QUAD_SPAN + 1;
3849
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003850var ADD_MOVETO = ACTIVE_CUBIC_SPAN + 1;
3851var ADD_LINETO = ADD_MOVETO + 1;
3852var ADD_QUADTO = ADD_LINETO + 1;
3853var ADD_CUBICTO = ADD_QUADTO + 1;
3854var ADD_CLOSE = ADD_CUBICTO + 1;
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003855
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003856var PATH_LINE = ADD_CLOSE + 1;
3857var PATH_QUAD = PATH_LINE + 1;
3858var PATH_CUBIC = PATH_QUAD + 1;
3859
3860var INTERSECT_LINE = PATH_CUBIC + 1;
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003861var INTERSECT_LINE_2 = INTERSECT_LINE + 1;
3862var INTERSECT_LINE_NO = INTERSECT_LINE_2 + 1;
3863var INTERSECT_QUAD_LINE = INTERSECT_LINE_NO + 1;
3864var INTERSECT_QUAD_LINE_2 = INTERSECT_QUAD_LINE + 1;
3865var INTERSECT_QUAD_LINE_NO = INTERSECT_QUAD_LINE_2 + 1;
3866var INTERSECT_QUAD = INTERSECT_QUAD_LINE_NO + 1;
3867var INTERSECT_QUAD_2 = INTERSECT_QUAD + 1;
3868var INTERSECT_QUAD_NO = INTERSECT_QUAD_2 + 1;
3869var INTERSECT_SELF_CUBIC = INTERSECT_QUAD_NO + 1;
3870var INTERSECT_SELF_CUBIC_NO = INTERSECT_SELF_CUBIC + 1;
3871var INTERSECT_CUBIC_LINE = INTERSECT_SELF_CUBIC_NO + 1;
3872var INTERSECT_CUBIC_LINE_2 = INTERSECT_CUBIC_LINE + 1;
3873var INTERSECT_CUBIC_LINE_3 = INTERSECT_CUBIC_LINE_2 + 1;
3874var INTERSECT_CUBIC_LINE_NO = INTERSECT_CUBIC_LINE_3 + 1;
3875// FIXME: add cubic/quad
3876var INTERSECT_CUBIC = INTERSECT_CUBIC_LINE_NO + 1;
3877var INTERSECT_CUBIC_2 = INTERSECT_CUBIC + 1;
3878var INTERSECT_CUBIC_3 = INTERSECT_CUBIC_2 + 1;
3879var INTERSECT_CUBIC_4 = INTERSECT_CUBIC_3 + 1;
3880// FIXME: add cubic 5- 9
3881var INTERSECT_CUBIC_NO = INTERSECT_CUBIC_4 + 1;
3882
3883var SORT_LINE = INTERSECT_CUBIC_NO + 1;
3884var SORT_QUAD = SORT_LINE + 1;
3885var SORT_CUBIC = SORT_QUAD + 1;
3886
caryclark@google.com1304bb22013-03-13 20:29:41 +00003887var SORT_LINE_UNSORTABLE = SORT_CUBIC + 1;
3888var SORT_QUAD_UNSORTABLE = SORT_LINE_UNSORTABLE + 1;
3889var SORT_CUBIC_UNSORTABLE = SORT_QUAD_UNSORTABLE + 1;
3890
3891var SORT_LINE_COMPACT = SORT_CUBIC_UNSORTABLE + 1;
3892var SORT_QUAD_COMPACT = SORT_LINE_COMPACT + 1;
3893var SORT_CUBIC_COMPACT = SORT_QUAD_COMPACT + 1;
3894
3895var OP_DIFFERENCE = SORT_CUBIC_COMPACT + 1;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003896var OP_INTERSECT = OP_DIFFERENCE + 1;
3897var OP_UNION = OP_INTERSECT + 1;
3898var OP_XOR = OP_UNION + 1;
3899
3900var MARK_LINE = OP_XOR + 1;
3901var MARK_QUAD = MARK_LINE + 1;
3902var MARK_CUBIC = MARK_QUAD + 1;
3903var MARK_DONE_LINE = MARK_CUBIC + 1;
3904var MARK_DONE_QUAD = MARK_DONE_LINE + 1;
3905var MARK_DONE_CUBIC = MARK_DONE_QUAD + 1;
caryclark@google.com1304bb22013-03-13 20:29:41 +00003906var MARK_UNSORTABLE_LINE = MARK_DONE_CUBIC + 1;
3907var MARK_UNSORTABLE_QUAD = MARK_UNSORTABLE_LINE + 1;
3908var MARK_UNSORTABLE_CUBIC = MARK_UNSORTABLE_QUAD + 1;
caryclark@google.comebf95ba2013-04-08 11:53:42 +00003909var MARK_SIMPLE_LINE = MARK_UNSORTABLE_CUBIC + 1;
3910var MARK_SIMPLE_QUAD = MARK_SIMPLE_LINE + 1;
3911var MARK_SIMPLE_CUBIC = MARK_SIMPLE_QUAD + 1;
3912var MARK_SIMPLE_DONE_LINE = MARK_SIMPLE_CUBIC + 1;
3913var MARK_SIMPLE_DONE_QUAD = MARK_SIMPLE_DONE_LINE + 1;
3914var MARK_SIMPLE_DONE_CUBIC = MARK_SIMPLE_DONE_QUAD + 1;
3915var MARK_DONE_UNARY_LINE = MARK_SIMPLE_DONE_CUBIC + 1;
3916var MARK_DONE_UNARY_QUAD = MARK_DONE_UNARY_LINE + 1;
3917var MARK_DONE_UNARY_CUBIC = MARK_DONE_UNARY_QUAD + 1;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003918
caryclark@google.comebf95ba2013-04-08 11:53:42 +00003919var COMPUTED_SET_1 = MARK_DONE_UNARY_CUBIC + 1;
caryclark@google.com1304bb22013-03-13 20:29:41 +00003920var COMPUTED_SET_2 = COMPUTED_SET_1 + 1;
3921var FRAG_TYPE_LAST = COMPUTED_SET_2;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003922
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003923var REC_TYPE_UNKNOWN = -1;
3924var REC_TYPE_PATH = 0;
3925var REC_TYPE_SECT = 1;
3926var REC_TYPE_ACTIVE = 2;
3927var REC_TYPE_ADD = 3;
3928var REC_TYPE_SORT = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003929var REC_TYPE_OP = 5;
3930var REC_TYPE_MARK = 6;
3931var REC_TYPE_COMPUTED = 7;
caryclark@google.comebf95ba2013-04-08 11:53:42 +00003932var REC_TYPE_COIN = 8;
3933var REC_TYPE_LAST = REC_TYPE_COIN;
caryclark@google.comf839c032012-10-26 21:03:50 +00003934
3935function strs_to_nums(strs) {
3936 var result = [];
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00003937 for (var idx = 1; idx < strs.length; ++idx) {
caryclark@google.comf839c032012-10-26 21:03:50 +00003938 var str = strs[idx];
3939 var num = parseFloat(str);
3940 if (isNaN(num)) {
3941 result.push(str);
3942 } else {
3943 result.push(num);
3944 }
3945 }
3946 return result;
3947}
3948
caryclark@google.com0b7da432012-10-31 19:00:20 +00003949function filter_str_by(id, str, regex, array) {
3950 if (regex.test(str)) {
3951 var strs = regex.exec(str);
3952 var result = strs_to_nums(strs);
3953 array.push(id);
3954 array.push(result);
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003955 return true;
caryclark@google.com0b7da432012-10-31 19:00:20 +00003956 }
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003957 return false;
caryclark@google.com0b7da432012-10-31 19:00:20 +00003958}
3959
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003960function construct_regexp2(pattern) {
3961 var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
caryclark@google.com1304bb22013-03-13 20:29:41 +00003962 escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*");
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003963 escape = escape.replace(/CUBIC_VAL/g, "\\(P_VAL P_VAL P_VAL P_VAL\\)");
3964 escape = escape.replace(/QUAD_VAL/g, "\\(P_VAL P_VAL P_VAL\\)");
3965 escape = escape.replace(/LINE_VAL/g, "\\(P_VAL P_VAL\\)");
3966 escape = escape.replace(/PT_VAL/g, "\\(P_VAL\\)");
caryclark@google.com996d78b2013-03-14 16:24:30 +00003967 escape = escape.replace(/P_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?),(-?\\d+\\.?\\d*(?:e-?\\d+)?)");
3968 escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)");
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003969 escape = escape.replace(/IDX/g, "(\\d+)");
3970 escape = escape.replace(/NUM/g, "(-?\\d+)");
3971 escape = escape.replace(/OPT/g, "(\\?|-?\\d+)");
3972 return new RegExp(escape, 'i');
3973}
3974
3975function construct_regexp2c(pattern) {
3976 var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
caryclark@google.com1304bb22013-03-13 20:29:41 +00003977 escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*");
3978 escape = escape.replace(/CUBIC_VAL/g, "(?:\\$\\d = )?\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}");
3979 escape = escape.replace(/QUAD_VAL/g, "(?:\\$\\d = )?\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}");
3980 escape = escape.replace(/LINE_VAL/g, "(?:\\$\\d = )?\\{\\{P_VAL\\}, \\{P_VAL\\}\\}");
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003981 escape = escape.replace(/PT_VAL/g, "\\{\\{P_VAL\\}\\}");
caryclark@google.com996d78b2013-03-14 16:24:30 +00003982 escape = escape.replace(/P_VAL/g, "(?:f?[xX] = )?(-?\\d+\\.?\\d*(?:e-?\\d+)?),(?: f?[yY] = )?(-?\\d+\\.?\\d*(?:e-?\\d+)?)");
3983 escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)");
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00003984 escape = escape.replace(/IDX/g, "(\\d+)");
3985 escape = escape.replace(/NUM/g, "(-?\\d+)");
3986 escape = escape.replace(/OPT/g, "(\\?|-?\\d+)");
3987 return new RegExp(escape, 'i');
3988}
3989
3990function match_regexp(str, lineNo, array, id, pattern) {
3991 var regex = construct_regexp2(pattern);
3992 if (filter_str_by(id, str, regex, array)) {
3993 return true;
3994 }
3995 regex = construct_regexp2c(pattern);
3996 return filter_str_by(id, str, regex, array);
3997}
3998
caryclark@google.com1304bb22013-03-13 20:29:41 +00003999function parse_all(test) {
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004000 var lines = test.match(/[^\r\n]+/g);
4001 var records = []; // a rec can be the original paths, a set of intersections, a set of active spans, a sort, or a path add
4002 var record = [];
4003 var recType = REC_TYPE_UNKNOWN;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004004 var lastLineNo;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004005 var moveX, moveY;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004006 for (var lineNo = 0; lineNo < lines.length; ++lineNo) {
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004007 var line = lines[lineNo];
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004008 if (line.length == 0) {
4009 continue;
4010 }
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004011 var type = line.lastIndexOf("debugShowSort", 0) === 0 ? REC_TYPE_SORT
4012 : line.lastIndexOf("debugShowActiveSpans", 0) === 0 ? REC_TYPE_ACTIVE
caryclark@google.comebf95ba2013-04-08 11:53:42 +00004013 : line.lastIndexOf("debugShowTs", 0) === 0 ? REC_TYPE_COIN
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004014 : line.lastIndexOf("debugShow", 0) === 0 ? REC_TYPE_SECT
caryclark@google.com1304bb22013-03-13 20:29:41 +00004015 : line.lastIndexOf("computed", 0) === 0 ? REC_TYPE_COMPUTED
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004016 : line.lastIndexOf("path.", 0) === 0 ? REC_TYPE_ADD
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004017 : line.lastIndexOf("mark", 0) === 0 ? REC_TYPE_MARK
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004018 : line.lastIndexOf(" {{", 0) === 0 ? REC_TYPE_COMPUTED
caryclark@google.com1304bb22013-03-13 20:29:41 +00004019 : line.lastIndexOf("{{", 0) === 0 ? REC_TYPE_PATH
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004020 : line.lastIndexOf("op", 0) === 0 ? REC_TYPE_OP
caryclark@google.com1304bb22013-03-13 20:29:41 +00004021 : line.lastIndexOf("$", 0) === 0 ? REC_TYPE_PATH
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004022 : REC_TYPE_UNKNOWN;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004023 if (recType != type || recType == REC_TYPE_ADD || recType == REC_TYPE_SECT) {
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004024 if (recType != REC_TYPE_UNKNOWN) {
4025 records.push(recType);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004026 records.push(lastLineNo);
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004027 records.push(record);
4028 }
4029 record = [];
4030 recType = type;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004031 lastLineNo = lineNo;
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004032 }
4033 var found = false;
4034 switch (recType) {
4035 case REC_TYPE_ACTIVE:
4036 found = match_regexp(line, lineNo, record, ACTIVE_LINE_SPAN, "debugShowActiveSpans" +
4037" id=IDX LINE_VAL t=T_VAL PT_VAL tEnd=T_VAL other=IDX otherT=T_VAL otherIndex=IDX windSum=OPT windValue=IDX oppValue=IDX"
4038 ) || match_regexp(line, lineNo, record, ACTIVE_QUAD_SPAN, "debugShowActiveSpans" +
4039" id=IDX QUAD_VAL t=T_VAL PT_VAL tEnd=T_VAL other=IDX otherT=T_VAL otherIndex=IDX windSum=OPT windValue=IDX oppValue=IDX"
4040 ) || match_regexp(line, lineNo, record, ACTIVE_CUBIC_SPAN, "debugShowActiveSpans" +
4041" id=IDX CUBIC_VAL t=T_VAL PT_VAL tEnd=T_VAL other=IDX otherT=T_VAL otherIndex=IDX windSum=OPT windValue=IDX oppValue=IDX"
4042 );
4043 break;
4044 case REC_TYPE_ADD:
caryclark@google.com1304bb22013-03-13 20:29:41 +00004045 if (match_regexp(line, lineNo, record, ADD_MOVETO, "path.moveTo(P_VAL);")) {
4046 moveX = record[1][0];
4047 moveY = record[1][1];
4048 found = true;
4049 } else if (match_regexp(line, lineNo, record, ADD_LINETO, "path.lineTo(P_VAL);")) {
4050 record[1].unshift(moveY);
4051 record[1].unshift(moveX);
4052 moveX = record[1][2];
4053 moveY = record[1][3];
4054 found = true;
4055 } else if (match_regexp(line, lineNo, record, ADD_QUADTO, "path.quadTo(P_VAL, P_VAL);")) {
4056 record[1].unshift(moveY);
4057 record[1].unshift(moveX);
4058 moveX = record[1][4];
4059 moveY = record[1][5];
4060 found = true;
4061 } else if (match_regexp(line, lineNo, record, ADD_CUBICTO, "path.cubicTo(P_VAL, P_VAL, P_VAL);")) {
4062 record[1].unshift(moveY);
4063 record[1].unshift(moveX);
4064 moveX = record[1][6];
4065 moveY = record[1][7];
4066 found = true;
4067 } else {
4068 found = match_regexp(line, lineNo, record, ADD_CLOSE, "path.close();");
4069 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004070 break;
caryclark@google.comebf95ba2013-04-08 11:53:42 +00004071 case REC_TYPE_COIN:
4072 found = true;
4073 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004074 case REC_TYPE_COMPUTED:
caryclark@google.com1304bb22013-03-13 20:29:41 +00004075 found = line == "computed quadratics given"
4076 || match_regexp(line, lineNo, record, COMPUTED_SET_1, "computed quadratics set 1"
4077 ) || match_regexp(line, lineNo, record, COMPUTED_SET_2, "computed quadratics set 2"
4078 ) || match_regexp(line, lineNo, record, PATH_QUAD, " QUAD_VAL,"
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004079 ) || match_regexp(line, lineNo, record, PATH_CUBIC, " CUBIC_VAL,"
4080 );
4081 break;
4082 case REC_TYPE_PATH:
4083 found = match_regexp(line, lineNo, record, PATH_LINE, "LINE_VAL"
4084 ) || match_regexp(line, lineNo, record, PATH_QUAD, "QUAD_VAL"
4085 ) || match_regexp(line, lineNo, record, PATH_CUBIC, "CUBIC_VAL"
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004086 );
4087 break;
4088 case REC_TYPE_SECT:
4089 found = match_regexp(line, lineNo, record, INTERSECT_LINE, "debugShowLineIntersection" +
4090" wtTs[0]=T_VAL LINE_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL"
4091 ) || match_regexp(line, lineNo, record, INTERSECT_LINE_2, "debugShowLineIntersection" +
4092" wtTs[0]=T_VAL LINE_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL"
4093 ) || match_regexp(line, lineNo, record, INTERSECT_LINE_NO, "debugShowLineIntersection" +
4094" no intersect LINE_VAL LINE_VAL"
4095 ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE, "debugShowQuadLineIntersection" +
4096" wtTs[0]=T_VAL QUAD_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL"
4097 ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE_2, "debugShowQuadLineIntersection" +
4098" wtTs[0]=T_VAL QUAD_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL"
4099 ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE_NO, "debugShowQuadLineIntersection" +
4100" no intersect QUAD_VAL LINE_VAL"
4101 ) || match_regexp(line, lineNo, record, INTERSECT_QUAD, "debugShowQuadIntersection" +
4102" wtTs[0]=T_VAL QUAD_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL"
4103 ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_2, "debugShowQuadIntersection" +
4104" wtTs[0]=T_VAL QUAD_VAL PT_VAL wtTs[1]=T_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL"
4105 ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_NO, "debugShowQuadIntersection" +
4106" no intersect QUAD_VAL QUAD_VAL"
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004107 ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE, "debugShowCubicLineIntersection" +
4108" wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL"
4109 ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_2, "debugShowCubicLineIntersection" +
4110" wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL"
4111 ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_3, "debugShowCubicLineIntersection" +
4112" wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wtTs[2]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL"
4113 ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_NO, "debugShowCubicLineIntersection" +
4114" no intersect CUBIC_VAL LINE_VAL"
4115 ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC, "debugShowCubicIntersection" +
4116" wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL"
4117 ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_2, "debugShowCubicIntersection" +
4118" wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL wnTs[1]=T_VAL"
4119 ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_3, "debugShowCubicIntersection" +
4120" wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wtTs[2]=T_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL"
4121 ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_4, "debugShowCubicIntersection" +
4122" wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wtTs[2]=T_VAL PT_VAL wtTs[3]=T_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL wnTs[3]=T_VAL"
4123 ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_NO, "debugShowCubicIntersection" +
4124" no intersect CUBIC_VAL CUBIC_VAL"
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004125 ) || match_regexp(line, lineNo, record, INTERSECT_SELF_CUBIC, "debugShowCubicIntersection" +
4126" wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL"
4127 ) || match_regexp(line, lineNo, record, INTERSECT_SELF_CUBIC_NO, "debugShowCubicIntersection" +
4128" no self intersect CUBIC_VAL"
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004129 );
4130 break;
4131 case REC_TYPE_SORT:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004132 found = match_regexp(line, lineNo, record, SORT_LINE, "debugShowSort" +
caryclark@google.com1304bb22013-03-13 20:29:41 +00004133" [IDX] LINE_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX"
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004134 ) || match_regexp(line, lineNo, record, SORT_QUAD, "debugShowSort" +
caryclark@google.com1304bb22013-03-13 20:29:41 +00004135" [IDX] QUAD_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX"
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004136 ) || match_regexp(line, lineNo, record, SORT_CUBIC, "debugShowSort" +
caryclark@google.com1304bb22013-03-13 20:29:41 +00004137" [IDX] CUBIC_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX"
4138 ) || match_regexp(line, lineNo, record, SORT_LINE_UNSORTABLE, "debugShowSort" +
4139" [IDX] UNSORTABLE LINE_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX"
4140 ) || match_regexp(line, lineNo, record, SORT_QUAD_UNSORTABLE, "debugShowSort" +
4141" [IDX] UNSORTABLE QUAD_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX"
4142 ) || match_regexp(line, lineNo, record, SORT_CUBIC_UNSORTABLE, "debugShowSort" +
4143" [IDX] UNSORTABLE CUBIC_VAL tStart=T_VAL tEnd=T_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX"
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004144 ) || match_regexp(line, lineNo, record, SORT_LINE_COMPACT, "debugShowSort" +
caryclark@google.com1304bb22013-03-13 20:29:41 +00004145" [IDX] id=IDX line start=IDX PT_VAL end=IDX PT_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX"
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004146 ) || match_regexp(line, lineNo, record, SORT_QUAD_COMPACT, "debugShowSort" +
caryclark@google.com1304bb22013-03-13 20:29:41 +00004147" [IDX] id=IDX quad start=IDX PT_VAL end=IDX PT_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX"
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004148 ) || match_regexp(line, lineNo, record, SORT_CUBIC_COMPACT, "debugShowSort" +
caryclark@google.com1304bb22013-03-13 20:29:41 +00004149" [IDX] id=IDX cubic start=IDX PT_VAL end=IDX PT_VAL sign=NUM windValue=IDX windSum=OPT OPT->OPT (max=OPT) done=IDX tiny=IDX opp=IDX"
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004150 );
4151 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004152 case REC_TYPE_MARK:
4153 found = match_regexp(line, lineNo, record, MARK_LINE, "markWinding" +
4154" id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX"
4155 ) || match_regexp(line, lineNo, record, MARK_QUAD, "markWinding" +
4156" id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX"
4157 ) || match_regexp(line, lineNo, record, MARK_CUBIC, "markWinding" +
4158" id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX"
4159 ) || match_regexp(line, lineNo, record, MARK_DONE_LINE, "markDoneBinary" +
4160" id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX"
4161 ) || match_regexp(line, lineNo, record, MARK_DONE_QUAD, "markDoneBinary" +
4162" id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX"
4163 ) || match_regexp(line, lineNo, record, MARK_DONE_CUBIC, "markDoneBinary" +
4164" id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX"
caryclark@google.com1304bb22013-03-13 20:29:41 +00004165 ) || match_regexp(line, lineNo, record, MARK_UNSORTABLE_LINE, "markUnsortable" +
4166" id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
4167 ) || match_regexp(line, lineNo, record, MARK_UNSORTABLE_QUAD, "markUnsortable" +
4168" id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
4169 ) || match_regexp(line, lineNo, record, MARK_UNSORTABLE_CUBIC, "markUnsortable" +
4170" id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
caryclark@google.comebf95ba2013-04-08 11:53:42 +00004171 ) || match_regexp(line, lineNo, record, MARK_SIMPLE_LINE, "markWinding" +
4172" id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
4173 ) || match_regexp(line, lineNo, record, MARK_SIMPLE_QUAD, "markWinding" +
4174" id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
4175 ) || match_regexp(line, lineNo, record, MARK_SIMPLE_CUBIC, "markWinding" +
4176" id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
4177 ) || match_regexp(line, lineNo, record, MARK_SIMPLE_DONE_LINE, "markDone" +
4178" id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
4179 ) || match_regexp(line, lineNo, record, MARK_SIMPLE_DONE_QUAD, "markDone" +
4180" id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
4181 ) || match_regexp(line, lineNo, record, MARK_SIMPLE_DONE_CUBIC, "markDone" +
4182" id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
4183 ) || match_regexp(line, lineNo, record, MARK_DONE_UNARY_LINE, "markDoneUnary" +
4184" id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
4185 ) || match_regexp(line, lineNo, record, MARK_DONE_UNARY_QUAD, "markDoneUnary" +
4186" id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
4187 ) || match_regexp(line, lineNo, record, MARK_DONE_UNARY_CUBIC, "markDoneUnary" +
4188" id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX"
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004189 );
4190 break;
4191 case REC_TYPE_OP:
4192 found = match_regexp(line, lineNo, record, OP_DIFFERENCE, "op difference"
4193 ) || match_regexp(line, lineNo, record, OP_INTERSECT, "op intersect"
4194 ) || match_regexp(line, lineNo, record, OP_UNION, "op union"
4195 ) || match_regexp(line, lineNo, record, OP_XOR, "op xor"
4196 );
4197 break;
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004198 case REC_TYPE_UNKNOWN:
4199 found = true;
4200 break;
4201 }
4202 if (!found) {
4203 console.log(line + " [" + lineNo + "] of type " + type + " not found");
4204 }
4205 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004206 if (recType != REC_TYPE_UNKNOWN) {
4207 records.push(recType);
4208 records.push(lastLineNo);
4209 records.push(record);
4210 }
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004211 if (records.length >= 1) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00004212 tests[testIndex] = records;
4213 testLines[testIndex] = lines;
caryclark@google.com4aaaaea2013-02-28 16:12:39 +00004214 }
4215}
4216
caryclark@google.comf839c032012-10-26 21:03:50 +00004217function init(test) {
4218 var canvas = document.getElementById('canvas');
4219 if (!canvas.getContext) return;
4220 screenWidth = canvas.width = window.innerWidth - 20;
4221 screenHeight = canvas.height = window.innerHeight - 20;
4222 ctx = canvas.getContext('2d');
4223 xmin = Infinity;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004224 xmax = -Infinity;
caryclark@google.comf839c032012-10-26 21:03:50 +00004225 ymin = Infinity;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004226 ymax = -Infinity;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004227 hasPath = hasComputedPath = false;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004228 for (var testIndex = 0; testIndex < test.length; testIndex += 3) {
4229 var recType = test[testIndex];
4230 if (!typeof recType == 'number' || recType < REC_TYPE_UNKNOWN || recType > REC_TYPE_LAST) {
4231 console.log("unknown rec type: " + recType);
4232 throw "stop execution";
caryclark@google.comf839c032012-10-26 21:03:50 +00004233 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004234 var records = test[testIndex + 2];
4235 for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) {
4236 var fragType = records[recordIndex];
caryclark@google.com1304bb22013-03-13 20:29:41 +00004237 if (!typeof fragType == 'number' || fragType < 1 || fragType > FRAG_TYPE_LAST) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004238 console.log("unknown in range frag type: " + fragType);
4239 throw "stop execution";
caryclark@google.com0b7da432012-10-31 19:00:20 +00004240 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004241 var frags = records[recordIndex + 1];
4242 var first = 0;
4243 var last = -1;
4244 var first2 = 0;
4245 var last2 = 0;
4246 switch (recType) {
4247 case REC_TYPE_COMPUTED:
caryclark@google.com1304bb22013-03-13 20:29:41 +00004248 if (fragType == COMPUTED_SET_1 || fragType == COMPUTED_SET_2) {
4249 break;
4250 }
4251 hasComputedPath = true;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004252 case REC_TYPE_PATH:
4253 switch (fragType) {
4254 case PATH_LINE:
4255 last = 4;
4256 break;
4257 case PATH_QUAD:
4258 last = 6;
4259 break;
4260 case PATH_CUBIC:
4261 last = 8;
4262 break;
4263 default:
4264 console.log("unknown " + (recType == REC_TYPE_PATH ? "REC_TYPE_PATH"
4265 : "REC_TYPE_COMPUTED") + " frag type:" + fragType);
4266 throw "stop execution";
4267 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00004268 if (recType == REC_TYPE_PATH) {
4269 hasPath = true;
4270 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004271 break;
4272 case REC_TYPE_ACTIVE:
4273 first = 1;
4274 switch (fragType) {
4275 case ACTIVE_LINE_SPAN:
4276 last = 5;
4277 break;
4278 case ACTIVE_QUAD_SPAN:
4279 last = 7;
4280 break;
4281 case ACTIVE_CUBIC_SPAN:
4282 last = 9;
4283 break;
4284 default:
4285 console.log("unknown REC_TYPE_ACTIVE frag type: " + fragType);
4286 throw "stop execution";
4287 }
4288 break;
4289 case REC_TYPE_ADD:
4290 switch (fragType) {
4291 case ADD_MOVETO:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004292 break;
4293 case ADD_LINETO:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004294 last = 4;
4295 break;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004296 case ADD_QUADTO:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004297 last = 6;
4298 break;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004299 case ADD_CUBICTO:
4300 last = 8;
4301 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004302 case ADD_CLOSE:
4303 break;
4304 default:
4305 console.log("unknown REC_TYPE_ADD frag type: " + fragType);
4306 throw "stop execution";
4307 }
4308 break;
4309 case REC_TYPE_SECT:
4310 switch (fragType) {
4311 case INTERSECT_LINE:
4312 first = 1; last = 5; first2 = 8; last2 = 12;
4313 break;
4314 case INTERSECT_LINE_2:
4315 first = 1; last = 5; first2 = 11; last2 = 15;
4316 break;
4317 case INTERSECT_LINE_NO:
4318 first = 0; last = 4; first2 = 4; last2 = 8;
4319 break;
4320 case INTERSECT_QUAD_LINE:
4321 first = 1; last = 7; first2 = 10; last2 = 14;
4322 break;
4323 case INTERSECT_QUAD_LINE_2:
4324 first = 1; last = 7; first2 = 13; last2 = 17;
4325 break;
4326 case INTERSECT_QUAD_LINE_NO:
4327 first = 0; last = 6; first2 = 6; last2 = 10;
4328 break;
4329 case INTERSECT_QUAD:
4330 first = 1; last = 7; first2 = 10; last2 = 16;
4331 break;
4332 case INTERSECT_QUAD_2:
4333 first = 1; last = 7; first2 = 13; last2 = 19;
4334 break;
4335 case INTERSECT_QUAD_NO:
4336 first = 0; last = 6; first2 = 6; last2 = 12;
4337 break;
4338 case INTERSECT_SELF_CUBIC:
4339 first = 1; last = 9;
4340 break;
4341 case INTERSECT_SELF_CUBIC_NO:
4342 first = 0; last = 8;
4343 break;
4344 case INTERSECT_CUBIC_LINE:
4345 first = 1; last = 9; first2 = 12; last2 = 16;
4346 break;
4347 case INTERSECT_CUBIC_LINE_2:
4348 first = 1; last = 9; first2 = 15; last2 = 19;
4349 break;
4350 case INTERSECT_CUBIC_LINE_3:
4351 first = 1; last = 9; first2 = 18; last2 = 22;
4352 break;
4353 case INTERSECT_CUBIC_LINE_NO:
4354 first = 0; last = 8; first2 = 8; last2 = 12;
4355 break;
4356 case INTERSECT_CUBIC:
4357 first = 1; last = 9; first2 = 12; last2 = 20;
4358 break;
4359 case INTERSECT_CUBIC_2:
4360 first = 1; last = 9; first2 = 15; last2 = 23;
4361 break;
4362 case INTERSECT_CUBIC_3:
4363 first = 1; last = 9; first2 = 18; last2 = 26;
4364 break;
4365 case INTERSECT_CUBIC_4:
4366 first = 1; last = 9; first2 = 21; last2 = 29;
4367 break;
4368 case INTERSECT_CUBIC_NO:
4369 first = 0; last = 8; first2 = 8; last2 = 16;
4370 break;
4371 default:
4372 console.log("unknown REC_TYPE_SECT frag type: " + fragType);
4373 throw "stop execution";
4374 }
4375 break;
4376 default:
4377 continue;
caryclark@google.com0b7da432012-10-31 19:00:20 +00004378 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004379 for (var idx = first; idx < last; idx += 2) {
4380 xmin = Math.min(xmin, frags[idx]);
4381 xmax = Math.max(xmax, frags[idx]);
4382 ymin = Math.min(ymin, frags[idx + 1]);
4383 ymax = Math.max(ymax, frags[idx + 1]);
caryclark@google.com0b7da432012-10-31 19:00:20 +00004384 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004385 for (var idx = first2; idx < last2; idx += 2) {
4386 xmin = Math.min(xmin, frags[idx]);
4387 xmax = Math.max(xmax, frags[idx]);
4388 ymin = Math.min(ymin, frags[idx + 1]);
4389 ymax = Math.max(ymax, frags[idx + 1]);
caryclark@google.com0b7da432012-10-31 19:00:20 +00004390 }
4391 }
caryclark@google.comf839c032012-10-26 21:03:50 +00004392 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004393 setScale();
caryclark@google.com1304bb22013-03-13 20:29:41 +00004394 if (hasPath == false && hasComputedPath == true && !draw_computed) {
4395 draw_computed = 3; // show both quadratics and cubics
4396 }
4397 if (hasPath == true && hasComputedPath == false && draw_computed) {
4398 draw_computed = 0;
4399 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004400}
4401
4402function setScale() {
4403 var srcWidth = xmax - xmin;
4404 var srcHeight = ymax - ymin;
caryclark@google.comf839c032012-10-26 21:03:50 +00004405 var hscale = ctx.canvas.width / srcWidth;
4406 var vscale = ctx.canvas.height / srcHeight;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004407 scale = Math.min(hscale, vscale);
4408 var invScale = 1 / scale;
4409 var sxmin = xmin - invScale * 5;
4410 var symin = ymin - invScale * 10;
4411 var sxmax = xmax + invScale * (6 * decimal_places + 10);
4412 var symax = ymax + invScale * 10;
4413 srcWidth = sxmax - sxmin;
4414 srcHeight = symax - symin;
4415 hscale = ctx.canvas.width / srcWidth;
4416 vscale = ctx.canvas.height / srcHeight;
4417 scale = Math.min(hscale, vscale);
4418 srcLeft = sxmin;
4419 srcTop = symin;
caryclark@google.comf839c032012-10-26 21:03:50 +00004420}
4421
caryclark@google.com1304bb22013-03-13 20:29:41 +00004422function drawPoint(px, py, end) {
caryclark@google.comf839c032012-10-26 21:03:50 +00004423 for (var pts = 0; pts < drawnPts.length; pts += 2) {
4424 var x = drawnPts[pts];
4425 var y = drawnPts[pts + 1];
4426 if (px == x && py == y) {
4427 return;
4428 }
4429 }
4430 drawnPts.push(px);
4431 drawnPts.push(py);
4432 var label = px.toFixed(decimal_places) + ", " + py.toFixed(decimal_places);
caryclark@google.com1304bb22013-03-13 20:29:41 +00004433 var _px = (px - srcLeft) * scale;
caryclark@google.comf839c032012-10-26 21:03:50 +00004434 var _py = (py - srcTop) * scale;
4435 ctx.beginPath();
4436 ctx.arc(_px, _py, 3, 0, Math.PI*2, true);
4437 ctx.closePath();
caryclark@google.com1304bb22013-03-13 20:29:41 +00004438 if (end) {
4439 ctx.fill();
4440 } else {
4441 ctx.stroke();
4442 }
4443 ctx.textAlign = "left";
caryclark@google.comf839c032012-10-26 21:03:50 +00004444 ctx.fillText(label, _px + 5, _py);
4445}
4446
caryclark@google.com1304bb22013-03-13 20:29:41 +00004447function drawPoints(ptArray, curveType, drawControls) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004448 var count = (curveType - PATH_LINE + 2) * 2;
4449 for (var idx = 0; idx < count; idx += 2) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00004450 if (!drawControls && idx != 0 && idx != count - 2) {
4451 continue;
4452 }
4453 drawPoint(ptArray[idx], ptArray[idx + 1], idx == 0 || idx == count - 2);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004454 }
4455}
4456
caryclark@google.com1304bb22013-03-13 20:29:41 +00004457function drawControlLines(curve, curveType, drawEnd) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004458 if (curveType == PATH_LINE) {
4459 return;
4460 }
4461 ctx.strokeStyle = "rgba(0,0,0, 0.3)";
4462 drawLine(curve[0], curve[1], curve[2], curve[3]);
4463 drawLine(curve[2], curve[3], curve[4], curve[5]);
caryclark@google.com1304bb22013-03-13 20:29:41 +00004464 if (curveType == PATH_CUBIC) {
4465 drawLine(curve[4], curve[5], curve[6], curve[7]);
4466 if (drawEnd > 1) {
4467 drawLine(curve[6], curve[7], curve[0], curve[1]);
4468 if (drawEnd > 2) {
4469 drawLine(curve[0], curve[1], curve[4], curve[5]);
4470 drawLine(curve[6], curve[7], curve[2], curve[3]);
4471 }
4472 }
4473 } else if (drawEnd > 1) {
4474 drawLine(curve[4], curve[5], curve[0], curve[1]);
4475 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004476}
4477
caryclark@google.com1304bb22013-03-13 20:29:41 +00004478function pointAtT(curve, curveType, t) {
4479 var xy = {};
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004480 switch (curveType) {
4481 case PATH_LINE:
4482 var a = 1 - t;
4483 var b = t;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004484 xy.x = a * curve[0] + b * curve[2];
4485 xy.y = a * curve[1] + b * curve[3];
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004486 break;
4487 case PATH_QUAD:
4488 var one_t = 1 - t;
4489 var a = one_t * one_t;
4490 var b = 2 * one_t * t;
4491 var c = t * t;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004492 xy.x = a * curve[0] + b * curve[2] + c * curve[4];
4493 xy.y = a * curve[1] + b * curve[3] + c * curve[5];
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004494 break;
4495 case PATH_CUBIC:
4496 var one_t = 1 - t;
4497 var one_t2 = one_t * one_t;
4498 var a = one_t2 * one_t;
4499 var b = 3 * one_t2 * t;
4500 var t2 = t * t;
4501 var c = 3 * one_t * t2;
4502 var d = t2 * t;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004503 xy.x = a * curve[0] + b * curve[2] + c * curve[4] + d * curve[6];
4504 xy.y = a * curve[1] + b * curve[3] + c * curve[5] + d * curve[7];
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004505 break;
4506 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00004507 return xy;
4508}
4509
4510function drawPointAtT(curve, curveType) {
4511 var x, y;
4512 var xy = pointAtT(curve, curveType, curveT);
4513 drawPoint(xy.x, xy.y, true);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004514 if (!draw_intersectT) {
4515 return;
4516 }
4517 ctx.fillStyle = "red";
caryclark@google.com1304bb22013-03-13 20:29:41 +00004518 drawTAtPointUp(xy.x, xy.y, curveT);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004519}
4520
4521function drawTAtPointUp(px, py, t) {
4522 var label = t.toFixed(decimal_places);
4523 var _px = (px - srcLeft)* scale;
4524 var _py = (py - srcTop) * scale;
4525 ctx.fillText(label, _px + 5, _py - 10);
4526}
4527
4528function drawTAtPointDown(px, py, t) {
4529 var label = t.toFixed(decimal_places);
4530 var _px = (px - srcLeft)* scale;
4531 var _py = (py - srcTop) * scale;
4532 ctx.fillText(label, _px + 5, _py + 10);
4533}
4534
caryclark@google.com1304bb22013-03-13 20:29:41 +00004535function alreadyDrawnLine(x1, y1, x2, y2) {
caryclark@google.com0b7da432012-10-31 19:00:20 +00004536 for (var pts = 0; pts < drawnLines.length; pts += 4) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00004537 if (x1 == drawnLines[pts] && y1 == drawnLines[pts + 1]
4538 && x2 == drawnLines[pts + 2] && y2 == drawnLines[pts + 3]) {
4539 return true;
caryclark@google.com0b7da432012-10-31 19:00:20 +00004540 }
4541 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004542 drawnLines.push(x1);
4543 drawnLines.push(y1);
4544 drawnLines.push(x2);
4545 drawnLines.push(y2);
caryclark@google.com1304bb22013-03-13 20:29:41 +00004546 return false;
4547}
4548
4549function drawLine(x1, y1, x2, y2) {
4550 if (alreadyDrawnLine(x1, y1, x2, y2)) {
4551 return;
4552 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004553 ctx.beginPath();
4554 ctx.moveTo((x1 - srcLeft) * scale,
4555 (y1 - srcTop) * scale);
4556 ctx.lineTo((x2 - srcLeft) * scale,
4557 (y2 - srcTop) * scale);
4558 ctx.stroke();
caryclark@google.com0b7da432012-10-31 19:00:20 +00004559}
4560
caryclark@google.com1304bb22013-03-13 20:29:41 +00004561function linePartial(x1, y1, x2, y2, t1, t2) {
caryclark@google.com47d73da2013-02-17 01:41:25 +00004562 var dx = x1 - x2;
4563 var dy = y1 - y2;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004564 var array = [
4565 x1 - t1 * dx,
4566 y1 - t1 * dy,
4567 x1 - t2 * dx,
4568 y1 - t2 * dy
4569 ];
4570 return array;
4571}
4572
4573function drawLinePartial(x1, y1, x2, y2, t1, t2) {
4574 var a = linePartial(x1, y1, x2, y2, t1, t2);
4575 var ax = a[0];
4576 var ay = a[1];
4577 var bx = a[2];
4578 var by = a[3];
4579 if (alreadyDrawnLine(ax, ay, bx, by)) {
4580 return;
4581 }
caryclark@google.com47d73da2013-02-17 01:41:25 +00004582 ctx.beginPath();
4583 ctx.moveTo((ax - srcLeft) * scale,
4584 (ay - srcTop) * scale);
4585 ctx.lineTo((bx - srcLeft) * scale,
4586 (by - srcTop) * scale);
4587 ctx.stroke();
4588}
4589
caryclark@google.com1304bb22013-03-13 20:29:41 +00004590function alreadyDrawnQuad(x1, y1, x2, y2, x3, y3) {
caryclark@google.com0b7da432012-10-31 19:00:20 +00004591 for (var pts = 0; pts < drawnQuads.length; pts += 6) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00004592 if (x1 == drawnQuads[pts] && y1 == drawnQuads[pts + 1]
4593 && x2 == drawnQuads[pts + 2] && y2 == drawnQuads[pts + 3]
4594 && x3 == drawnQuads[pts + 4] && x3 == drawnQuads[pts + 5]) {
4595 return true;
caryclark@google.com0b7da432012-10-31 19:00:20 +00004596 }
4597 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004598 drawnQuads.push(x1);
4599 drawnQuads.push(y1);
4600 drawnQuads.push(x2);
4601 drawnQuads.push(y2);
4602 drawnQuads.push(x3);
4603 drawnQuads.push(y3);
caryclark@google.com1304bb22013-03-13 20:29:41 +00004604 return false;
4605}
4606
4607function drawQuad(x1, y1, x2, y2, x3, y3) {
4608 if (alreadyDrawnQuad(x1, y1, x2, y2, x3, y3)) {
4609 return;
4610 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004611 ctx.beginPath();
4612 ctx.moveTo((x1 - srcLeft) * scale,
4613 (y1 - srcTop) * scale);
4614 ctx.quadraticCurveTo((x2 - srcLeft) * scale,
4615 (y2 - srcTop) * scale,
4616 (x3 - srcLeft) * scale,
4617 (y3 - srcTop) * scale);
4618 ctx.stroke();
caryclark@google.com0b7da432012-10-31 19:00:20 +00004619}
4620
caryclark@google.com47d73da2013-02-17 01:41:25 +00004621function interp(A, B, t) {
4622 return A + (B - A) * t;
4623}
4624
4625function interp_quad_coords(x1, x2, x3, t)
4626{
4627 var ab = interp(x1, x2, t);
4628 var bc = interp(x2, x3, t);
4629 var abc = interp(ab, bc, t);
4630 return abc;
4631}
4632
caryclark@google.com1304bb22013-03-13 20:29:41 +00004633function quadPartial(x1, y1, x2, y2, x3, y3, t1, t2) {
caryclark@google.com47d73da2013-02-17 01:41:25 +00004634 var ax = interp_quad_coords(x1, x2, x3, t1);
4635 var ay = interp_quad_coords(y1, y2, y3, t1);
4636 var dx = interp_quad_coords(x1, x2, x3, (t1 + t2) / 2);
4637 var dy = interp_quad_coords(y1, y2, y3, (t1 + t2) / 2);
4638 var cx = interp_quad_coords(x1, x2, x3, t2);
4639 var cy = interp_quad_coords(y1, y2, y3, t2);
4640 var bx = 2*dx - (ax + cx)/2;
4641 var by = 2*dy - (ay + cy)/2;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004642 var array = [
4643 ax, ay, bx, by, cx, cy
4644 ];
4645 return array;
4646}
4647
4648function drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2) {
4649 var a = quadPartial(x1, y1, x2, y2, x3, y3, t1, t2);
4650 var ax = a[0];
4651 var ay = a[1];
4652 var bx = a[2];
4653 var by = a[3];
4654 var cx = a[4];
4655 var cy = a[5];
4656 if (alreadyDrawnQuad(ax, ay, bx, by, cx, cy)) {
4657 return;
4658 }
caryclark@google.com47d73da2013-02-17 01:41:25 +00004659 ctx.beginPath();
4660 ctx.moveTo((ax - srcLeft) * scale,
4661 (ay - srcTop) * scale);
4662 ctx.quadraticCurveTo((bx - srcLeft) * scale,
4663 (by - srcTop) * scale,
4664 (cx - srcLeft) * scale,
4665 (cy - srcTop) * scale);
4666 ctx.stroke();
4667}
4668
caryclark@google.com1304bb22013-03-13 20:29:41 +00004669function alreadyDrawnCubic(x1, y1, x2, y2, x3, y3, x4, y4) {
caryclark@google.com47d73da2013-02-17 01:41:25 +00004670 for (var pts = 0; pts < drawnCubics.length; pts += 8) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00004671 if (x1 == drawnCubics[pts] && y1 == drawnCubics[pts + 1]
4672 && x2 == drawnCubics[pts + 2] && y2 == drawnCubics[pts + 3]
4673 && x3 == drawnCubics[pts + 4] && y3 == drawnCubics[pts + 5]
4674 && x4 == drawnCubics[pts + 6] && y4 == drawnCubics[pts + 7]) {
4675 return true;
caryclark@google.com47d73da2013-02-17 01:41:25 +00004676 }
4677 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004678 drawnCubics.push(x1);
4679 drawnCubics.push(y1);
4680 drawnCubics.push(x2);
4681 drawnCubics.push(y2);
4682 drawnCubics.push(x3);
4683 drawnCubics.push(y3);
4684 drawnCubics.push(x4);
4685 drawnCubics.push(y4);
caryclark@google.com1304bb22013-03-13 20:29:41 +00004686 return false;
4687}
4688
4689function drawCubic(x1, y1, x2, y2, x3, y3, x4, y4) {
4690 if (alreadyDrawnCubic(x1, y1, x2, y2, x3, y3, x4, y4)) {
4691 return;
4692 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00004693 ctx.beginPath();
4694 ctx.moveTo((x1 - srcLeft) * scale,
4695 (y1 - srcTop) * scale);
4696 ctx.bezierCurveTo((x2 - srcLeft) * scale,
4697 (y2 - srcTop) * scale,
4698 (x3 - srcLeft) * scale,
4699 (y3 - srcTop) * scale,
4700 (x4 - srcLeft) * scale,
4701 (y4 - srcTop) * scale);
4702 ctx.stroke();
caryclark@google.com47d73da2013-02-17 01:41:25 +00004703}
4704
4705function interp_cubic_coords(x1, x2, x3, x4, t)
4706{
4707 var ab = interp(x1, x2, t);
4708 var bc = interp(x2, x3, t);
4709 var cd = interp(x3, x4, t);
4710 var abc = interp(ab, bc, t);
4711 var bcd = interp(bc, cd, t);
4712 var abcd = interp(abc, bcd, t);
4713 return abcd;
4714}
4715
caryclark@google.com1304bb22013-03-13 20:29:41 +00004716function cubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) {
caryclark@google.com47d73da2013-02-17 01:41:25 +00004717 var ax = interp_cubic_coords(x1, x2, x3, x4, t1);
4718 var ay = interp_cubic_coords(y1, y2, y3, y4, t1);
4719 var ex = interp_cubic_coords(x1, x2, x3, x4, (t1*2+t2)/3);
4720 var ey = interp_cubic_coords(y1, y2, y3, y4, (t1*2+t2)/3);
4721 var fx = interp_cubic_coords(x1, x2, x3, x4, (t1+t2*2)/3);
4722 var fy = interp_cubic_coords(y1, y2, y3, y4, (t1+t2*2)/3);
4723 var dx = interp_cubic_coords(x1, x2, x3, x4, t2);
4724 var dy = interp_cubic_coords(y1, y2, y3, y4, t2);
4725 var mx = ex * 27 - ax * 8 - dx;
4726 var my = ey * 27 - ay * 8 - dy;
4727 var nx = fx * 27 - ax - dx * 8;
4728 var ny = fy * 27 - ay - dy * 8;
4729 var bx = (mx * 2 - nx) / 18;
4730 var by = (my * 2 - ny) / 18;
4731 var cx = (nx * 2 - mx) / 18;
4732 var cy = (ny * 2 - my) / 18;
caryclark@google.com1304bb22013-03-13 20:29:41 +00004733 var array = [
4734 ax, ay, bx, by, cx, cy, dx, dy
4735 ];
4736 return array;
4737}
4738
4739function drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) {
4740 var a = cubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2);
4741 var ax = a[0];
4742 var ay = a[1];
4743 var bx = a[2];
4744 var by = a[3];
4745 var cx = a[4];
4746 var cy = a[5];
4747 var dx = a[6];
4748 var dy = a[7];
4749 if (alreadyDrawnCubic(ax, ay, bx, by, cx, cy, dx, dy)) {
4750 return;
4751 }
caryclark@google.com47d73da2013-02-17 01:41:25 +00004752 ctx.beginPath();
4753 ctx.moveTo((ax - srcLeft) * scale,
4754 (ay - srcTop) * scale);
4755 ctx.bezierCurveTo((bx - srcLeft) * scale,
4756 (by - srcTop) * scale,
4757 (cx - srcLeft) * scale,
4758 (cy - srcTop) * scale,
4759 (dx - srcLeft) * scale,
caryclark@google.com1304bb22013-03-13 20:29:41 +00004760 (dy - srcTop) * scale);
caryclark@google.com47d73da2013-02-17 01:41:25 +00004761 ctx.stroke();
4762}
4763
caryclark@google.com1304bb22013-03-13 20:29:41 +00004764function boundsWidth(pts) {
4765 var min = pts[0];
4766 var max = pts[0];
4767 for (var idx = 2; idx < pts.length; idx += 2) {
4768 min = Math.min(min, pts[idx]);
4769 max = Math.max(max, pts[idx]);
4770 }
4771 return max - min;
4772}
4773
4774function boundsHeight(pts) {
4775 var min = pts[1];
4776 var max = pts[1];
4777 for (var idx = 3; idx < pts.length; idx += 2) {
4778 min = Math.min(min, pts[idx]);
4779 max = Math.max(max, pts[idx]);
4780 }
4781 return max - min;
4782}
4783
4784function tangent(pts) {
4785 var dx = pts[2] - pts[0];
4786 var dy = pts[3] - pts[1];
4787 if (dx == 0 && dy == 0 && pts.length > 4) {
4788 dx = pts[4] - pts[0];
4789 dy = pts[5] - pts[1];
4790 if (dx == 0 && dy == 0 && pts.length > 6) {
4791 dx = pts[6] - pts[0];
4792 dy = pts[7] - pts[1];
4793 }
4794 }
4795 return Math.atan2(-dy, dx);
4796}
4797
4798function hodograph(cubic) {
4799 var hodo = [];
4800 hodo[0] = 3 * (cubic[2] - cubic[0]);
4801 hodo[1] = 3 * (cubic[3] - cubic[1]);
4802 hodo[2] = 3 * (cubic[4] - cubic[2]);
4803 hodo[3] = 3 * (cubic[5] - cubic[3]);
4804 hodo[4] = 3 * (cubic[6] - cubic[4]);
4805 hodo[5] = 3 * (cubic[7] - cubic[5]);
4806 return hodo;
4807}
4808
4809function hodograph2(cubic) {
4810 var quad = hodograph(cubic);
4811 var hodo = [];
4812 hodo[0] = 2 * (quad[2] - quad[0]);
4813 hodo[1] = 2 * (quad[3] - quad[1]);
4814 hodo[2] = 2 * (quad[4] - quad[2]);
4815 hodo[3] = 2 * (quad[5] - quad[3]);
4816 return hodo;
4817}
4818
4819function quadraticRootsReal(A, B, C, s) {
4820 if (A == 0) {
4821 if (B == 0) {
4822 s[0] = 0;
4823 return C == 0;
4824 }
4825 s[0] = -C / B;
4826 return 1;
4827 }
4828 /* normal form: x^2 + px + q = 0 */
4829 var p = B / (2 * A);
4830 var q = C / A;
4831 var p2 = p * p;
4832 if (p2 < q) {
4833 return 0;
4834 }
4835 var sqrt_D = 0;
4836 if (p2 > q) {
4837 sqrt_D = sqrt(p2 - q);
4838 }
4839 s[0] = sqrt_D - p;
4840 s[1] = -sqrt_D - p;
4841 return 1 + s[0] != s[1];
4842}
4843
4844function add_valid_ts(s, realRoots, t) {
4845 var foundRoots = 0;
4846 for (var index = 0; index < realRoots; ++index) {
4847 var tValue = s[index];
4848 if (tValue >= 0 && tValue <= 1) {
4849 for (var idx2 = 0; idx2 < foundRoots; ++idx2) {
4850 if (t[idx2] != tValue) {
4851 t[foundRoots++] = tValue;
4852 }
4853 }
4854 }
4855 }
4856 return foundRoots;
4857}
4858
4859function quadraticRootsValidT(a, b, c, t) {
4860 var s = [];
4861 var realRoots = quadraticRootsReal(A, B, C, s);
4862 var foundRoots = add_valid_ts(s, realRoots, t);
4863 return foundRoots != 0;
4864}
4865
4866function find_cubic_inflections(cubic, tValues) {
4867 var Ax = src[2] - src[0];
4868 var Ay = src[3] - src[1];
4869 var Bx = src[4] - 2 * src[2] + src[0];
4870 var By = src[5] - 2 * src[3] + src[1];
4871 var Cx = src[6] + 3 * (src[2] - src[4]) - src[0];
4872 var Cy = src[7] + 3 * (src[3] - src[5]) - src[1];
4873 return quadraticRootsValidT(Bx * Cy - By * Cx, (Ax * Cy - Ay * Cx),
4874 Ax * By - Ay * Bx, tValues);
4875}
4876
4877function dxy_at_t(curve, type, t) {
4878 var dxy = {};
4879 if (type == PATH_QUAD) {
4880 var a = t - 1;
4881 var b = 1 - 2 * t;
4882 var c = t;
4883 dxy.x = a * curve[0] + b * curve[2] + c * curve[4];
4884 dxy.y = a * curve[1] + b * curve[3] + c * curve[5];
4885 } else if (type == PATH_CUBIC) {
4886 var one_t = 1 - t;
4887 var a = curve[0];
4888 var b = curve[2];
4889 var c = curve[4];
4890 var d = curve[6];
4891 dxy.x = 3 * ((b - a) * one_t * one_t + 2 * (c - b) * t * one_t + (d - c) * t * t);
4892 a = curve[1];
4893 b = curve[3];
4894 c = curve[5];
4895 d = curve[7];
4896 dxy.y = 3 * ((b - a) * one_t * one_t + 2 * (c - b) * t * one_t + (d - c) * t * t);
4897 }
4898 return dxy;
4899}
4900
4901function drawLabel(num, px, py) {
4902 ctx.beginPath();
4903 ctx.arc(px, py, 8, 0, Math.PI*2, true);
4904 ctx.closePath();
4905 ctx.strokeStyle = "rgba(0,0,0, 0.4)";
4906 ctx.lineWidth = num == 0 || num == 3 ? 2 : 1;
4907 ctx.stroke();
4908 ctx.fillStyle = "black";
4909 ctx.font = "normal 10px Arial";
4910 // ctx.rotate(0.001);
4911 ctx.fillText(num, px - 2, py + 3);
4912 // ctx.rotate(-0.001);
4913}
4914
4915function drawLabelX(ymin, num, loc) {
4916 var px = (loc - srcLeft) * scale;
4917 var py = (ymin - srcTop) * scale - 20;
4918 drawLabel(num, px, py);
4919}
4920
4921function drawLabelY(xmin, num, loc) {
4922 var px = (xmin - srcLeft) * scale - 20;
4923 var py = (loc - srcTop) * scale;
4924 drawLabel(num, px, py);
4925}
4926
4927function drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY) {
4928 ctx.beginPath();
4929 ctx.moveTo(hx, hy - 100);
4930 ctx.lineTo(hx, hy);
4931 ctx.strokeStyle = hMinY < 0 ? "green" : "blue";
4932 ctx.stroke();
4933 ctx.beginPath();
4934 ctx.moveTo(hx, hy);
4935 ctx.lineTo(hx, hy + 100);
4936 ctx.strokeStyle = hMaxY > 0 ? "green" : "blue";
4937 ctx.stroke();
4938 ctx.beginPath();
4939 ctx.moveTo(hx - 100, hy);
4940 ctx.lineTo(hx, hy);
4941 ctx.strokeStyle = hMinX < 0 ? "green" : "blue";
4942 ctx.stroke();
4943 ctx.beginPath();
4944 ctx.moveTo(hx, hy);
4945 ctx.lineTo(hx + 100, hy);
4946 ctx.strokeStyle = hMaxX > 0 ? "green" : "blue";
4947 ctx.stroke();
4948}
4949
4950function scalexy(x, y, mag) {
4951 var length = Math.sqrt(x * x + y * y);
4952 return mag / length;
4953}
4954
4955function drawArrow(x, y, dx, dy) {
4956 var dscale = scalexy(dx, dy, 1 / scale * 100);
4957 dx *= dscale;
4958 dy *= dscale;
4959 ctx.beginPath();
4960 ctx.moveTo((x - srcLeft) * scale, (y - srcTop) * scale);
4961 x += dx;
4962 y += dy;
4963 ctx.lineTo((x - srcLeft) * scale, (y - srcTop) * scale);
4964 dx /= 10;
4965 dy /= 10;
4966 ctx.lineTo((x - dy - srcLeft) * scale, (y + dx - srcTop) * scale);
4967 ctx.lineTo((x + dx * 2 - srcLeft) * scale, (y + dy * 2 - srcTop) * scale);
4968 ctx.lineTo((x + dy - srcLeft) * scale, (y - dx - srcTop) * scale);
4969 ctx.lineTo((x - srcLeft) * scale, (y - srcTop) * scale);
4970 ctx.strokeStyle = "rgba(0,75,0, 0.4)";
4971 ctx.stroke();
4972}
4973
4974function drawCurveSpecials(curve, type) {
4975 if (pt_labels) {
4976 drawPoints(curve, type, pt_labels == 2);
4977 }
4978 if (control_lines != 0) {
4979 drawControlLines(curve, type, control_lines);
4980 }
4981 if (curve_t) {
4982 drawPointAtT(curve, type);
4983 }
4984 if (draw_midpoint) {
4985 var mid = pointAtT(curve, type, 0.5);
4986 drawPoint(mid.x, mid.y, true);
4987 }
4988 if (type == PATH_LINE) {
4989 return;
4990 }
4991 if (draw_deriviatives > 0) {
4992 var d = dxy_at_t(curve, type, 0);
4993 drawArrow(curve[0], curve[1], d.x, d.y);
4994 if (draw_deriviatives == 2) {
4995 d = dxy_at_t(curve, type, 1);
4996 if (type == PATH_CUBIC) {
4997 drawArrow(curve[6], curve[7], d.x, d.y);
4998 } else {
4999 drawArrow(curve[4], curve[5], d.x, d.y);
5000 }
5001 }
5002 if (draw_midpoint) {
5003 var mid = pointAtT(curve, 0.5);
5004 d = dxy_at_t(curve, type, 0.5);
5005 drawArrow(mid.x, mid.y, d.x, d.y);
5006 }
5007 }
5008 if (type != PATH_CUBIC) {
5009 return;
5010 }
5011 if (draw_hodo == 1 || draw_hodo == 2) {
5012 var hodo = hodograph(curve);
5013 var hMinX = Math.min(0, hodo[0], hodo[2], hodo[4]);
5014 var hMinY = Math.min(0, hodo[1], hodo[3], hodo[5]);
5015 var hMaxX = Math.max(0, hodo[0], hodo[2], hodo[4]);
5016 var hMaxY = Math.max(0, hodo[1], hodo[3], hodo[5]);
5017 var hScaleX = hMaxX - hMinX > 0 ? ctx.canvas.width / (hMaxX - hMinX) : 1;
5018 var hScaleY = hMaxY - hMinY > 0 ? ctx.canvas.height / (hMaxY - hMinY) : 1;
5019 var hUnit = Math.min(hScaleX, hScaleY);
5020 hUnit /= 2;
5021 var hx = xoffset - hMinX * hUnit;
5022 var hy = yoffset - hMinY * hUnit;
5023 ctx.moveTo(hx + hodo[0] * hUnit, hy + hodo[1] * hUnit);
5024 ctx.quadraticCurveTo(
5025 hx + hodo[2] * hUnit, hy + hodo[3] * hUnit,
5026 hx + hodo[4] * hUnit, hy + hodo[5] * hUnit);
5027 ctx.strokeStyle = "red";
5028 ctx.stroke();
5029 if (draw_hodo == 1) {
5030 drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY);
5031 }
5032 }
5033 if (draw_hodo == 3) {
5034 var hodo = hodograph2(curve);
5035 var hMinX = Math.min(0, hodo[0], hodo[2]);
5036 var hMinY = Math.min(0, hodo[1], hodo[3]);
5037 var hMaxX = Math.max(0, hodo[0], hodo[2]);
5038 var hMaxY = Math.max(0, hodo[1], hodo[3]);
5039 var hScaleX = hMaxX - hMinX > 0 ? ctx.canvas.width / (hMaxX - hMinX) : 1;
5040 var hScaleY = hMaxY - hMinY > 0 ? ctx.canvas.height / (hMaxY - hMinY) : 1;
5041 var hUnit = Math.min(hScaleX, hScaleY);
5042 hUnit /= 2;
5043 var hx = xoffset - hMinX * hUnit;
5044 var hy = yoffset - hMinY * hUnit;
5045 ctx.moveTo(hx + hodo[0] * hUnit, hy + hodo[1] * hUnit);
5046 ctx.lineTo(hx + hodo[2] * hUnit, hy + hodo[3] * hUnit);
5047 ctx.strokeStyle = "red";
5048 ctx.stroke();
5049 drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY);
5050 }
5051 if (draw_sequence) {
5052 var ymin = Math.min(curve[1], curve[3], curve[5], curve[7]);
5053 for (var i = 0; i < 8; i+= 2) {
5054 drawLabelX(ymin, i >> 1, curve[i]);
5055 }
5056 var xmin = Math.min(curve[0], curve[2], curve[4], curve[6]);
5057 for (var i = 1; i < 8; i+= 2) {
5058 drawLabelY(xmin, i >> 1, curve[i]);
5059 }
5060 }
5061}
5062
5063function logCurves(test) {
5064 for (curves in test) {
5065 var curve = test[curves];
5066 if (curve.length != 8) {
5067 continue;
5068 }
5069 var str = "{{";
5070 for (i = 0; i < 8; i += 2) {
5071 str += curve[i].toFixed(decimal_places) + "," + curve[i + 1].toFixed(decimal_places);
5072 if (i < 6) {
5073 str += "}, {";
5074 }
5075 }
5076 str += "}}";
5077 console.log(str);
5078 }
5079}
5080
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005081function draw(test, lines, title) {
caryclark@google.comf839c032012-10-26 21:03:50 +00005082 ctx.fillStyle = "rgba(0,0,0, 0.1)";
5083 ctx.font = "normal 50px Arial";
caryclark@google.com1304bb22013-03-13 20:29:41 +00005084 ctx.textAlign = "left";
caryclark@google.comf839c032012-10-26 21:03:50 +00005085 ctx.fillText(title, 50, 50);
5086 ctx.font = "normal 10px Arial";
5087 ctx.lineWidth = "1.001"; "0.999";
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005088 var secondPath = test.length;
5089 var closeCount = 0;
5090 var logStart = -1;
5091 var logRange = 0;
5092 // find last active rec type at this step
5093 var curType = test[0];
5094 var curStep = 0;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005095 var hasOp = false;
5096 var lastActive = 0;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005097 var lastAdd = 0;
5098 var lastSect = 0;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005099 var lastSort = 0;
5100 var lastMark = 0;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005101 activeCount = 0;
5102 addCount = 0;
5103 sectCount = 0;
5104 sortCount = 0;
5105 markCount = 0;
5106 activeMax = 0;
5107 addMax = 0;
5108 sectMax = 0;
5109 sectMax2 = 0;
5110 sortMax = 0;
5111 markMax = 0;
5112 lastIndex = test.length - 3;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005113 for (var testIndex = 0; testIndex < test.length; testIndex += 3) {
5114 var recType = test[testIndex];
5115 if (!typeof recType == 'number' || recType < REC_TYPE_UNKNOWN || recType > REC_TYPE_LAST) {
5116 console.log("unknown rec type: " + recType);
5117 throw "stop execution";
5118 }
5119 // if (curType == recType && curType != REC_TYPE_ADD) {
5120 // continue;
5121 // }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005122 var inStepRange = step_limit == 0 || curStep < step_limit;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005123 curType = recType;
5124 if (recType == REC_TYPE_OP) {
5125 hasOp = true;
5126 continue;
5127 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005128 if (recType == REC_TYPE_UNKNOWN) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005129 // these types do not advance step
5130 continue;
5131 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005132 var bumpStep = false;
5133 var records = test[testIndex + 2];
5134 var fragType = records[0];
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005135 if (recType == REC_TYPE_ADD) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005136 if (records.length != 2) {
5137 console.log("expect only two elements: " + records.length);
5138 throw "stop execution";
5139 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005140 if (fragType == ADD_MOVETO || fragType == ADD_CLOSE) {
5141 continue;
5142 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005143 ++addMax;
5144 if (!draw_add || !inStepRange) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005145 continue;
5146 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005147 lastAdd = testIndex;
5148 ++addCount;
5149 bumpStep = true;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005150 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005151 if (recType == REC_TYPE_PATH && hasOp) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005152 secondPath = testIndex;
5153 }
5154 if (recType == REC_TYPE_ACTIVE) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00005155 ++activeMax;
5156 if (!draw_active || !inStepRange) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005157 continue;
5158 }
5159 lastActive = testIndex;
5160 ++activeCount;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005161 bumpStep = true;
5162 }
5163 if (recType == REC_TYPE_SECT) {
5164 if (records.length != 2) {
5165 console.log("expect only two elements: " + records.length);
5166 throw "stop execution";
5167 }
5168 ++sectMax;
5169 var sectBump = 1;
5170 switch (fragType) {
5171 case INTERSECT_LINE:
5172 case INTERSECT_QUAD_LINE:
5173 case INTERSECT_QUAD:
5174 case INTERSECT_SELF_CUBIC:
5175 case INTERSECT_CUBIC_LINE:
5176 case INTERSECT_CUBIC:
5177 sectBump = 1;
5178 break;
5179 case INTERSECT_LINE_2:
5180 case INTERSECT_QUAD_LINE_2:
5181 case INTERSECT_QUAD_2:
5182 case INTERSECT_CUBIC_LINE_2:
5183 case INTERSECT_CUBIC_2:
5184 sectBump = 2;
5185 break;
5186 case INTERSECT_LINE_NO:
5187 case INTERSECT_QUAD_LINE_NO:
5188 case INTERSECT_QUAD_NO:
5189 case INTERSECT_SELF_CUBIC_NO:
5190 case INTERSECT_CUBIC_LINE_NO:
5191 case INTERSECT_CUBIC_NO:
5192 sectBump = 0;
5193 break;
5194 case INTERSECT_CUBIC_LINE_3:
5195 case INTERSECT_CUBIC_3:
5196 sectBump = 3;
5197 break;
5198 case INTERSECT_CUBIC_4:
5199 sectBump = 4;
5200 break;
5201 default:
5202 console.log("missing case " + records.length);
5203 throw "stop execution";
5204 }
5205 sectMax2 += sectBump;
5206 if (draw_intersection <= 1 || !inStepRange) {
5207 continue;
5208 }
5209 lastSect = testIndex;
5210 sectCount += sectBump;
5211 bumpStep = true;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005212 }
5213 if (recType == REC_TYPE_SORT) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00005214 ++sortMax;
5215 if (!draw_sort || !inStepRange) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005216 continue;
5217 }
5218 lastSort = testIndex;
5219 ++sortCount;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005220 bumpStep = true;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005221 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005222 if (recType == REC_TYPE_MARK) {
5223 ++markMax;
5224 if (!draw_mark || !inStepRange) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005225 continue;
5226 }
5227 lastMark = testIndex;
5228 ++markCount;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005229 bumpStep = true;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005230 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005231 if (bumpStep) {
5232 lastIndex = testIndex;
5233 logStart = test[testIndex + 1];
5234 logRange = records.length / 2;
5235 ++curStep;
5236 }
5237 }
5238 stepMax = (draw_add ? addMax : 0) + (draw_active ? activeMax : 0)
5239 + (draw_sort ? sortMax : 0) + (draw_mark ? markMax : 0)
5240 + (draw_intersection == 2 ? sectMax : draw_intersection == 3 ? sectMax2 : 0);
5241 if (stepMax == 0) {
5242 stepMax = addMax + activeMax + sortMax + markMax;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005243 }
caryclark@google.comf839c032012-10-26 21:03:50 +00005244 drawnPts = [];
caryclark@google.com0b7da432012-10-31 19:00:20 +00005245 drawnLines = [];
5246 drawnQuads = [];
caryclark@google.com47d73da2013-02-17 01:41:25 +00005247 drawnCubics = [];
caryclark@google.com1304bb22013-03-13 20:29:41 +00005248 var pathIndex = 0;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005249 var opLetter = 'S';
caryclark@google.com1304bb22013-03-13 20:29:41 +00005250 for (var testIndex = lastIndex; testIndex >= 0; testIndex -= 3) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005251 var recType = test[testIndex];
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005252 var records = test[testIndex + 2];
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005253 for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) {
5254 var fragType = records[recordIndex];
caryclark@google.com1304bb22013-03-13 20:29:41 +00005255 if (!typeof fragType == 'number' || fragType < 1 || fragType > FRAG_TYPE_LAST) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005256 console.log("unknown in range frag type: " + fragType);
5257 throw "stop execution";
caryclark@google.com0b7da432012-10-31 19:00:20 +00005258 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005259 var frags = records[recordIndex + 1];
5260 switch (recType) {
5261 case REC_TYPE_COMPUTED:
5262 if (draw_computed == 0) {
5263 continue;
5264 }
5265 ctx.lineWidth = 1;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005266 ctx.strokeStyle = pathIndex == 0 ? "black" : "red";
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005267 ctx.fillStyle = "blue";
caryclark@google.com1304bb22013-03-13 20:29:41 +00005268 var drawThis = false;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005269 switch (fragType) {
5270 case PATH_QUAD:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005271 if ((draw_computed & 5) == 1 || ((draw_computed & 4) != 0
5272 && (draw_computed & 1) == pathIndex)) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005273 drawQuad(frags[0], frags[1], frags[2], frags[3],
5274 frags[4], frags[5]);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005275 drawThis = true;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005276 }
5277 break;
5278 case PATH_CUBIC:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005279 if ((draw_computed & 6) == 2 || ((draw_computed & 4) != 0
5280 && (draw_computed & 1) != pathIndex)) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005281 drawCubic(frags[0], frags[1], frags[2], frags[3],
5282 frags[4], frags[5], frags[6], frags[7]);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005283 drawThis = true;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005284 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005285 ++pathIndex;
5286 break;
5287 case COMPUTED_SET_1:
5288 pathIndex = 0;
5289 break;
5290 case COMPUTED_SET_2:
5291 pathIndex = 1;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005292 break;
5293 default:
5294 console.log("unknown REC_TYPE_COMPUTED frag type: " + fragType);
5295 throw "stop execution";
5296 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005297 if (!drawThis) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005298 break;
5299 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005300 drawCurveSpecials(frags, fragType);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005301 break;
5302 case REC_TYPE_PATH:
5303 if (!draw_path) {
5304 continue;
5305 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005306 var firstPath = testIndex < secondPath;
5307 if ((draw_path & (firstPath ? 1 : 2)) == 0) {
5308 continue;
5309 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005310 ctx.lineWidth = 1;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005311 ctx.strokeStyle = firstPath ? "black" : "red";
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005312 ctx.fillStyle = "blue";
5313 switch (fragType) {
5314 case PATH_LINE:
5315 drawLine(frags[0], frags[1], frags[2], frags[3]);
5316 break;
5317 case PATH_QUAD:
5318 drawQuad(frags[0], frags[1], frags[2], frags[3],
5319 frags[4], frags[5]);
5320 break;
5321 case PATH_CUBIC:
5322 drawCubic(frags[0], frags[1], frags[2], frags[3],
5323 frags[4], frags[5], frags[6], frags[7]);
5324 break;
5325 default:
5326 console.log("unknown REC_TYPE_PATH frag type: " + fragType);
5327 throw "stop execution";
5328 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005329 drawCurveSpecials(frags, fragType);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005330 break;
5331 case REC_TYPE_OP:
5332 switch (fragType) {
5333 case OP_INTERSECT: opLetter = 'I'; break;
5334 case OP_DIFFERENCE: opLetter = 'D'; break;
5335 case OP_UNION: opLetter = 'U'; break;
5336 case OP_XOR: opLetter = 'X'; break;
5337 default:
5338 console.log("unknown REC_TYPE_OP frag type: " + fragType);
5339 throw "stop execution";
5340 }
5341 break;
5342 case REC_TYPE_ACTIVE:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005343 if (!draw_active || (step_limit > 0 && testIndex < lastActive)) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005344 continue;
5345 }
5346 var x1 = frags[SPAN_X1];
5347 var y1 = frags[SPAN_Y1];
5348 var x2 = frags[SPAN_X2];
5349 var y2 = frags[SPAN_Y2];
5350 var x3, y3, x3, y4, t1, t2;
5351 ctx.lineWidth = 3;
5352 ctx.strokeStyle = "rgba(0,0,255, 0.3)";
5353 switch (fragType) {
5354 case ACTIVE_LINE_SPAN:
5355 t1 = frags[SPAN_L_T];
5356 t2 = frags[SPAN_L_TEND];
5357 drawLinePartial(x1, y1, x2, y2, t1, t2);
5358 break;
5359 case ACTIVE_QUAD_SPAN:
5360 x3 = frags[SPAN_X3];
5361 y3 = frags[SPAN_Y3];
5362 t1 = frags[SPAN_Q_T];
5363 t2 = frags[SPAN_Q_TEND];
5364 drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2);
5365 break;
5366 case ACTIVE_CUBIC_SPAN:
5367 x3 = frags[SPAN_X3];
5368 y3 = frags[SPAN_Y3];
5369 x4 = frags[SPAN_X4];
5370 y4 = frags[SPAN_Y4];
5371 t1 = frags[SPAN_C_T];
5372 t2 = frags[SPAN_C_TEND];
5373 drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2);
5374 break;
5375 default:
5376 console.log("unknown REC_TYPE_ACTIVE frag type: " + fragType);
5377 throw "stop execution";
5378 }
5379 break;
5380 case REC_TYPE_ADD:
5381 if (!draw_add) {
5382 continue;
5383 }
5384 ctx.lineWidth = 3;
5385 ctx.strokeStyle = closeCount == 0 ? "rgba(0,0,255, 0.3)"
5386 : closeCount == 1 ? "rgba(0,127,0, 0.3)"
5387 : closeCount == 2 ? "rgba(0,127,127, 0.3)"
5388 : closeCount == 3 ? "rgba(127,127,0, 0.3)"
5389 : "rgba(127,0,127, 0.3)";
5390 switch (fragType) {
5391 case ADD_MOVETO:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005392 break;
5393 case ADD_LINETO:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005394 if (step_limit == 0 || testIndex >= lastAdd) {
5395 drawLine(frags[0], frags[1], frags[2], frags[3]);
5396 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005397 break;
5398 case ADD_QUADTO:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005399 if (step_limit == 0 || testIndex >= lastAdd) {
5400 drawQuad(frags[0], frags[1], frags[2], frags[3], frags[4], frags[5]);
5401 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005402 break;
5403 case ADD_CUBICTO:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005404 if (step_limit == 0 || testIndex >= lastAdd) {
5405 drawCubic(frags[0], frags[1], frags[2], frags[3],
5406 frags[4], frags[5], frags[6], frags[7]);
5407 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005408 break;
5409 case ADD_CLOSE:
5410 ++closeCount;
5411 break;
5412 default:
5413 console.log("unknown REC_TYPE_ADD frag type: " + fragType);
5414 throw "stop execution";
5415 }
5416 break;
5417 case REC_TYPE_SECT:
5418 if (!draw_intersection) {
5419 continue;
5420 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005421 if (draw_intersection != 1 && (step_limit > 0 && testIndex < lastSect)) {
5422 continue;
5423 }
5424 // draw_intersection == 1 : show all
5425 // draw_intersection == 2 : step == 0 ? show all : show intersection line #step
5426 // draw_intersection == 3 : step == 0 ? show all : show intersection #step
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005427 ctx.lineWidth = 1;
5428 ctx.strokeStyle = "rgba(0,0,255, 0.3)";
5429 ctx.fillStyle = "blue";
5430 var f = [];
caryclark@google.com1304bb22013-03-13 20:29:41 +00005431 var c1s;
5432 var c1l;
5433 var c2s;
5434 var c2l;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005435 switch (fragType) {
5436 case INTERSECT_LINE:
5437 f.push(5, 6, 0, 7);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005438 c1s = 1; c1l = 4; c2s = 8; c2l = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005439 break;
5440 case INTERSECT_LINE_2:
5441 f.push(5, 6, 0, 10);
5442 f.push(8, 9, 7, 15);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005443 c1s = 1; c1l = 4; c2s = 11; c2l = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005444 break;
5445 case INTERSECT_LINE_NO:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005446 c1s = 0; c1l = 4; c2s = 4; c2l = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005447 break;
5448 case INTERSECT_QUAD_LINE:
5449 f.push(7, 8, 0, 9);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005450 c1s = 1; c1l = 6; c2s = 10; c2l = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005451 break;
5452 case INTERSECT_QUAD_LINE_2:
5453 f.push(7, 8, 0, 12);
5454 f.push(10, 11, 9, 17);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005455 c1s = 1; c1l = 6; c2s = 13; c2l = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005456 break;
5457 case INTERSECT_QUAD_LINE_NO:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005458 c1s = 0; c1l = 6; c2s = 6; c2l = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005459 break;
5460 case INTERSECT_QUAD:
5461 f.push(7, 8, 0, 9);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005462 c1s = 1; c1l = 6; c2s = 10; c2l = 6;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005463 break;
5464 case INTERSECT_QUAD_2:
5465 f.push(7, 8, 0, 12);
5466 f.push(10, 11, 9, 19);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005467 c1s = 1; c1l = 6; c2s = 13; c2l = 6;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005468 break;
5469 case INTERSECT_QUAD_NO:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005470 c1s = 0; c1l = 6; c2s = 6; c2l = 6;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005471 break;
5472 case INTERSECT_SELF_CUBIC:
5473 f.push(9, 10, 0, 11);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005474 c1s = 1; c1l = 8; c2s = 0; c2l = 0;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005475 break;
5476 case INTERSECT_SELF_CUBIC_NO:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005477 c1s = 0; c1l = 8; c2s = 0; c2l = 0;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005478 break;
5479 case INTERSECT_CUBIC_LINE:
5480 f.push(9, 10, 0, 11);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005481 c1s = 1; c1l = 8; c2s = 12; c2l = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005482 break;
5483 case INTERSECT_CUBIC_LINE_2:
5484 f.push(9, 10, 0, 14);
5485 f.push(12, 13, 11, 19);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005486 c1s = 1; c1l = 8; c2s = 15; c2l = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005487 break;
5488 case INTERSECT_CUBIC_LINE_3:
5489 f.push(9, 10, 0, 17);
5490 f.push(12, 13, 11, 22);
5491 f.push(15, 16, 14, 23);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005492 c1s = 1; c1l = 8; c2s = 18; c2l = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005493 break;
5494 case INTERSECT_CUBIC_LINE_NO:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005495 c1s = 0; c1l = 8; c2s = 8; c2l = 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005496 break;
5497 case INTERSECT_CUBIC:
5498 f.push(9, 10, 0, 11);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005499 c1s = 1; c1l = 8; c2s = 12; c2l = 8;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005500 break;
5501 case INTERSECT_CUBIC_2:
5502 f.push(9, 10, 0, 14);
5503 f.push(12, 13, 11, 23);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005504 c1s = 1; c1l = 8; c2s = 15; c2l = 8;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005505 break;
5506 case INTERSECT_CUBIC_3:
5507 f.push(9, 10, 0, 17);
5508 f.push(12, 13, 11, 26);
5509 f.push(15, 16, 14, 27);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005510 c1s = 1; c1l = 8; c2s = 18; c2l = 8;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005511 break;
5512 case INTERSECT_CUBIC_4:
5513 f.push(9, 10, 0, 20);
5514 f.push(12, 13, 11, 29);
5515 f.push(15, 16, 14, 30);
5516 f.push(18, 19, 17, 31);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005517 c1s = 1; c1l = 8; c2s = 21; c2l = 8;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005518 break;
5519 case INTERSECT_CUBIC_NO:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005520 c1s = 0; c1l = 8; c2s = 8; c2l = 8;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005521 break;
5522 default:
5523 console.log("unknown REC_TYPE_SECT frag type: " + fragType);
5524 throw "stop execution";
5525 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005526 if (draw_intersection != 1) {
5527 switch (c1l) {
5528 case 4:
5529 drawLine(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3]);
5530 break;
5531 case 6:
5532 drawQuad(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3],
5533 frags[c1s + 4], frags[c1s + 5]);
5534 break;
5535 case 8:
5536 drawCubic(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3],
5537 frags[c1s + 4], frags[c1s + 5], frags[c1s + 6], frags[c1s + 7]);
5538 break;
5539 }
5540 switch (c2l) {
5541 case 0:
5542 break;
5543 case 4:
5544 drawLine(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3]);
5545 break;
5546 case 6:
5547 drawQuad(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3],
5548 frags[c2s + 4], frags[c2s + 5]);
5549 break;
5550 case 8:
5551 drawCubic(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3],
5552 frags[c2s + 4], frags[c2s + 5], frags[c2s + 6], frags[c2s + 7]);
5553 break;
5554 }
5555 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005556 for (var idx = 0; idx < f.length; idx += 4) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00005557 if (draw_intersection != 3 || idx == lastSect - testIndex) {
5558 drawPoint(frags[f[idx]], frags[f[idx + 1]], true);
5559 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005560 }
5561 if (!draw_intersectT) {
5562 break;
5563 }
5564 ctx.fillStyle = "red";
5565 for (var idx = 0; idx < f.length; idx += 4) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00005566 if (draw_intersection != 3 || idx == lastSect - testIndex) {
5567 drawTAtPointUp(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 2]]);
5568 drawTAtPointDown(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 3]]);
5569 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005570 }
5571 break;
5572 case REC_TYPE_SORT:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005573 if (!draw_sort || (step_limit > 0 && testIndex < lastSort)) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005574 continue;
5575 }
5576 ctx.lineWidth = 3;
5577 ctx.strokeStyle = "rgba(127,127,0, 0.5)";
5578 switch (fragType) {
5579 case SORT_LINE:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005580 case SORT_LINE_UNSORTABLE:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005581 drawLinePartial(frags[1], frags[2], frags[3], frags[4],
5582 frags[5], frags[6]);
5583 break;
5584 case SORT_QUAD:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005585 case SORT_QUAD_UNSORTABLE:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005586 drawQuadPartial(frags[1], frags[2], frags[3], frags[4],
5587 frags[5], frags[6], frags[7], frags[8]);
5588 break;
5589 case SORT_CUBIC:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005590 case SORT_CUBIC_UNSORTABLE:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005591 drawCubicPartial(frags[1], frags[2], frags[3], frags[4],
5592 frags[5], frags[6], frags[7], frags[8], frags[9], frags[10]);
5593 break;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005594 case SORT_LINE_COMPACT:
5595 case SORT_QUAD_COMPACT:
5596 case SORT_CUBIC_COMPACT:
5597 // unsupported
5598 break;
5599 default:
5600 console.log("unknown REC_TYPE_SORT frag type: " + fragType);
5601 throw "stop execution";
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005602 }
5603 break;
5604 case REC_TYPE_MARK:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005605 if (!draw_mark || (step_limit > 0 && testIndex < lastMark)) {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005606 continue;
5607 }
5608 ctx.lineWidth = 3;
5609 ctx.strokeStyle = fragType >= MARK_DONE_LINE ?
5610 "rgba(127,0,127, 0.5)" : "rgba(127,127,0, 0.5)";
5611 switch (fragType) {
5612 case MARK_LINE:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005613 case MARK_DONE_LINE:
5614 case MARK_UNSORTABLE_LINE:
caryclark@google.comebf95ba2013-04-08 11:53:42 +00005615 case MARK_SIMPLE_LINE:
5616 case MARK_SIMPLE_DONE_LINE:
5617 case MARK_DONE_UNARY_LINE:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005618 drawLinePartial(frags[1], frags[2], frags[3], frags[4],
5619 frags[5], frags[9]);
5620 break;
5621 case MARK_QUAD:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005622 case MARK_DONE_QUAD:
5623 case MARK_UNSORTABLE_QUAD:
caryclark@google.comebf95ba2013-04-08 11:53:42 +00005624 case MARK_SIMPLE_QUAD:
5625 case MARK_SIMPLE_DONE_QUAD:
5626 case MARK_DONE_UNARY_QUAD:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005627 drawQuadPartial(frags[1], frags[2], frags[3], frags[4],
5628 frags[5], frags[6], frags[7], frags[11]);
5629 break;
5630 case MARK_CUBIC:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005631 case MARK_DONE_CUBIC:
caryclark@google.com1304bb22013-03-13 20:29:41 +00005632 case MARK_UNSORTABLE_CUBIC:
caryclark@google.comebf95ba2013-04-08 11:53:42 +00005633 case MARK_SIMPLE_CUBIC:
5634 case MARK_SIMPLE_DONE_CUBIC:
5635 case MARK_DONE_UNARY_CUBIC:
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005636 drawCubicPartial(frags[1], frags[2], frags[3], frags[4],
5637 frags[5], frags[6], frags[7], frags[8], frags[9], frags[13]);
5638 break;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005639 default:
5640 console.log("unknown REC_TYPE_MARK frag type: " + fragType);
5641 throw "stop execution";
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005642 }
5643 break;
5644 default:
5645 continue;
caryclark@google.com0b7da432012-10-31 19:00:20 +00005646 }
5647 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005648 switch (recType) {
5649 case REC_TYPE_SORT:
5650 if (!draw_sort || (step_limit > 0 && testIndex < lastSort)) {
5651 break;
5652 }
5653 var angles = []; // use tangent lines to describe arcs
5654 var windFrom = [];
5655 var windTo = [];
5656 var opp = [];
5657 var minXY = Number.MAX_VALUE;
5658 var partial;
5659 for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) {
5660 var fragType = records[recordIndex];
5661 var frags = records[recordIndex + 1];
5662 var idx = 10;
5663 switch (fragType) {
5664 case SORT_LINE:
5665 case SORT_LINE_UNSORTABLE:
5666 partial = linePartial(frags[1], frags[2], frags[3], frags[4],
5667 frags[5], frags[6]);
5668 break;
5669 case SORT_QUAD:
5670 case SORT_QUAD_UNSORTABLE:
5671 partial = quadPartial(frags[1], frags[2], frags[3], frags[4],
5672 frags[5], frags[6], frags[7], frags[8]);
5673 idx += 2;
5674 break;
5675 case SORT_CUBIC:
5676 case SORT_CUBIC_UNSORTABLE:
5677 partial = cubicPartial(frags[1], frags[2], frags[3], frags[4],
5678 frags[5], frags[6], frags[7], frags[8], frags[9], frags[10]);
5679 idx += 4;
5680 break;
5681 case SORT_LINE_COMPACT:
5682 case SORT_QUAD_COMPACT:
5683 case SORT_CUBIC_COMPACT:
5684 // unsupported
5685 continue;
5686 default:
5687 console.log("unknown REC_TYPE_SORT frag type: " + fragType);
5688 throw "stop execution";
5689 }
5690 var dx = boundsWidth(partial);
5691 var dy = boundsHeight(partial);
5692 minXY = Math.min(minXY, dx * dx + dy * dy);
5693 angles.push(tangent(partial));
5694 windFrom.push(frags[idx]);
5695 windTo.push(frags[idx + 1]);
5696 opp.push(frags[idx + 5]);
5697 }
5698 var radius = Math.sqrt(minXY) / 2 * scale;
5699 radius = Math.min(50, radius);
5700 var centerX = (partial[0] - srcLeft) * scale;
5701 var centerY = (partial[1] - srcTop) * scale;
5702 ctx.lineWidth = 1;
5703 ctx.strokeStyle = "rgba(127,0,171, 0.5)";
5704 ctx.fillStyle = "rgba(0,0,0, 0.5)";
5705 ctx.font = "normal 10px Arial";
5706 ctx.textAlign = "center";
5707 for (var angleIndex = 0; angleIndex < angles.length; ++angleIndex) {
5708 var angleParts = [
5709 angles[(angleIndex + angles.length - 1) % angles.length],
5710 angles[angleIndex],
5711 angles[(angleIndex + 1) % angles.length]
5712 ];
5713 var angleStart = (angleParts[0] + angleParts[1]) / 2;
5714 if (angleParts[0] > angleParts[1]) {
5715 angleStart -= Math.PI;
5716 }
5717 var angleEnd = (angleParts[1] + angleParts[2]) / 2;
5718 if (angleParts[1] > angleParts[2]) {
5719 angleEnd -= Math.PI;
5720 }
5721 ctx.beginPath();
5722 ctx.arc(centerX, centerY, radius + (opp[angleIndex] ? 10 : 0),
5723 Math.PI * 2 - angleStart - Math.PI / 18, Math.PI * 2 - angleEnd + Math.PI / 18, true);
5724 ctx.stroke();
5725 var tx = centerX + Math.cos(angleStart) * (radius + (opp[angleIndex] ? 10 : 0));
5726 var ty = centerY - Math.sin(angleStart) * (radius + (opp[angleIndex] ? 10 : 0));
5727 ctx.fillText(windFrom[angleIndex], tx, ty + 5);
5728 tx = centerX + Math.cos(angleEnd) * (radius + (opp[angleIndex] ? 10 : 0));
5729 ty = centerY - Math.sin(angleEnd) * (radius + (opp[angleIndex] ? 10 : 0));
5730 ctx.fillText(windTo[angleIndex], tx, ty + 5);
5731 }
5732 break;
5733 default:
5734 break;
5735 }
caryclark@google.comf839c032012-10-26 21:03:50 +00005736 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005737 if (draw_log && logStart >= 0) {
5738 ctx.font = "normal 10px Arial";
caryclark@google.com1304bb22013-03-13 20:29:41 +00005739 ctx.textAlign = "left";
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005740 ctx.beginPath();
caryclark@google.com1304bb22013-03-13 20:29:41 +00005741 var top = ctx.canvas.height - 20 - (logRange + 2) * 10;
5742 ctx.rect(50, top, ctx.canvas.width-100, (logRange + 2) * 10);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005743 ctx.fillStyle = "white";
5744 ctx.fill();
5745 ctx.fillStyle = "rgba(0,0,0, 0.5)";
5746 if (logStart > 0) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00005747 ctx.fillText(lines[logStart - 1], 50, top + 8);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005748 }
5749 ctx.fillStyle = "black";
5750 for (var idx = 0; idx < logRange; ++idx) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00005751 ctx.fillText(lines[logStart + idx], 50, top + 18 + 10 * idx);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005752 }
5753 ctx.fillStyle = "rgba(0,0,0, 0.5)";
5754 if (logStart + logRange < lines.length) {
caryclark@google.com1304bb22013-03-13 20:29:41 +00005755 ctx.fillText(lines[logStart + logRange], 50, top + 18 + 10 * logRange);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005756 }
5757 }
5758 if (draw_legend) {
5759 var pos = 0;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005760 var drawSomething = draw_add | draw_active | draw_sort | draw_mark;
5761 // drawBox(pos++, "yellow", "black", opLetter, true, '');
5762 drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_intersection > 1 ? sectCount : sectMax2, draw_intersection, intersectionKey);
5763 drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_add ? addCount : addMax, draw_add, addKey);
5764 drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_active ? activeCount : activeMax, draw_active, activeKey);
5765 drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_sort ? sortCount : sortMax, draw_sort, sortKey);
5766 drawBox(pos++, "rgba(127,0,127, 0.3)", "black", draw_mark ? markCount : markMax, draw_mark, markKey);
5767 drawBox(pos++, "black", "white",
5768 (new Array('P', 'P1', 'P2', 'P'))[draw_path], draw_path != 0, pathKey);
5769 drawBox(pos++, "rgba(0,63,0, 0.7)", "white",
5770 (new Array('Q', 'Q', 'C', 'QC', 'Qc', 'Cq'))[draw_computed],
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005771 draw_computed != 0, computedKey);
caryclark@google.com1304bb22013-03-13 20:29:41 +00005772 drawBox(pos++, "green", "black", step_limit, drawSomething, '');
5773 drawBox(pos++, "green", "black", stepMax, drawSomething, '');
5774 drawBox(pos++, "red", "black", lastIndex, drawSomething & draw_log, '');
5775 drawBox(pos++, "red", "black", test.length - 1, drawSomething & draw_log, '');
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005776 if (curve_t) {
5777 drawCurveTControl();
5778 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00005779 ctx.font = "normal 20px Arial";
5780 ctx.fillStyle = "rgba(0,0,0, 0.3)";
5781 ctx.textAlign = "right";
5782 ctx.fillText(scale.toFixed(decimal_places) + 'x' , ctx.canvas.width - 10, ctx.canvas.height - 5);
5783 }
5784 if (draw_hints) {
5785 ctx.font = "normal 10px Arial";
5786 ctx.fillStyle = "rgba(0,0,0, 0.5)";
5787 ctx.textAlign = "right";
5788 var y = 4;
5789 ctx.fillText("control lines : " + controlLinesKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
5790 ctx.fillText("curve t : " + curveTKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
5791 ctx.fillText("deriviatives : " + deriviativesKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
5792 ctx.fillText("intersect t : " + intersectTKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
5793 ctx.fillText("hodo : " + hodoKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
5794 ctx.fillText("log : " + logKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
5795 ctx.fillText("log curve : " + logCurvesKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
5796 ctx.fillText("mid point : " + midpointKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
5797 ctx.fillText("points : " + ptsKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
5798 ctx.fillText("sequence : " + sequenceKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
5799 ctx.fillText("xy : " + xyKey, ctx.canvas.width - 10, pos * 50 + y++ * 10);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005800 }
5801}
5802
5803function drawBox(y, backC, foreC, str, enable, label) {
5804 ctx.beginPath();
5805 ctx.fillStyle = backC;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005806 ctx.rect(ctx.canvas.width - 40, y * 50 + 10, 40, 30);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005807 ctx.fill();
5808 ctx.font = "normal 16px Arial";
5809 ctx.fillStyle = foreC;
5810 ctx.textAlign = "center";
caryclark@google.com1304bb22013-03-13 20:29:41 +00005811 ctx.fillText(str, ctx.canvas.width - 20, y * 50 + 32);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005812 if (!enable) {
5813 ctx.fillStyle = "rgba(255,255,255, 0.5)";
5814 ctx.fill();
5815 }
5816 if (label != '') {
5817 ctx.font = "normal 9px Arial";
5818 ctx.fillStyle = "black";
caryclark@google.com1304bb22013-03-13 20:29:41 +00005819 ctx.fillText(label, ctx.canvas.width - 47, y * 50 + 40);
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005820 }
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005821}
5822
5823function drawCurveTControl() {
5824 ctx.lineWidth = 2;
5825 ctx.strokeStyle = "rgba(0,0,0, 0.3)";
5826 ctx.beginPath();
5827 ctx.rect(ctx.canvas.width - 80, 40, 28, ctx.canvas.height - 80);
5828 ctx.stroke();
5829 var ty = 40 + curveT * (ctx.canvas.height - 80);
5830 ctx.beginPath();
5831 ctx.moveTo(ctx.canvas.width - 80, ty);
5832 ctx.lineTo(ctx.canvas.width - 85, ty - 5);
5833 ctx.lineTo(ctx.canvas.width - 85, ty + 5);
5834 ctx.lineTo(ctx.canvas.width - 80, ty);
5835 ctx.fillStyle = "rgba(0,0,0, 0.6)";
5836 ctx.fill();
5837 var num = curveT.toFixed(decimal_places);
5838 ctx.font = "normal 10px Arial";
caryclark@google.com1304bb22013-03-13 20:29:41 +00005839 ctx.textAlign = "left";
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005840 ctx.fillText(num, ctx.canvas.width - 78, ty);
5841}
5842
5843function ptInTControl() {
5844 var e = window.event;
5845 var tgt = e.target || e.srcElement;
5846 var left = tgt.offsetLeft;
5847 var top = tgt.offsetTop;
5848 var x = (e.clientX - left);
5849 var y = (e.clientY - top);
5850 if (x < ctx.canvas.width - 80 || x > ctx.canvas.width - 50) {
5851 return false;
5852 }
5853 if (y < 40 || y > ctx.canvas.height - 80) {
5854 return false;
5855 }
5856 curveT = (y - 40) / (ctx.canvas.height - 120);
5857 if (curveT < 0 || curveT > 1) {
5858 throw "stop execution";
5859 }
5860 return true;
caryclark@google.comf839c032012-10-26 21:03:50 +00005861}
5862
5863function drawTop() {
caryclark@google.com1304bb22013-03-13 20:29:41 +00005864 if (tests[testIndex] == null) {
5865 var str = testDivs[testIndex].firstChild.data;
5866 parse_all(str);
5867 var title = testDivs[testIndex].id.toString();
5868 testTitles[testIndex] = title;
5869 }
caryclark@google.comf839c032012-10-26 21:03:50 +00005870 init(tests[testIndex]);
5871 redraw();
5872}
5873
5874function redraw() {
5875 ctx.beginPath();
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005876 ctx.fillStyle = "white";
caryclark@google.comf839c032012-10-26 21:03:50 +00005877 ctx.rect(0, 0, ctx.canvas.width, ctx.canvas.height);
caryclark@google.comf839c032012-10-26 21:03:50 +00005878 ctx.fill();
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005879 draw(tests[testIndex], testLines[testIndex], testTitles[testIndex]);
caryclark@google.comf839c032012-10-26 21:03:50 +00005880}
5881
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005882var activeKey = 'a';
5883var addKey = 'd';
5884var centerKey = 'c';
5885var computedKey = 'q';
5886var computedBackKey = 'Q';
caryclark@google.com1304bb22013-03-13 20:29:41 +00005887var controlLinesBackKey = 'V';
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005888var controlLinesKey = 'v';
5889var curveTKey = 'u';
caryclark@google.com1304bb22013-03-13 20:29:41 +00005890var deriviativesKey = 'f';
5891var hodoKey = 'h';
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005892var intersectTKey = 't';
caryclark@google.com1304bb22013-03-13 20:29:41 +00005893var intersectionBackKey = 'I';
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005894var intersectionKey = 'i';
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005895var logKey = 'l';
caryclark@google.com1304bb22013-03-13 20:29:41 +00005896var logCurvesKey = 'z';
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005897var markKey = 'm';
caryclark@google.com1304bb22013-03-13 20:29:41 +00005898var midpointKey = 'k';
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005899var pathKey = 'b';
caryclark@google.com1304bb22013-03-13 20:29:41 +00005900var pathBackKey = 'B';
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005901var ptsKey = 'x';
caryclark@google.com1304bb22013-03-13 20:29:41 +00005902var sequenceKey = 'j';
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005903var sortKey = 'o';
5904var stepBackKey = 'S';
5905var stepKey = 's';
5906var xyKey = 'y';
5907
caryclark@google.comf839c032012-10-26 21:03:50 +00005908function doKeyPress(evt) {
5909 var char = String.fromCharCode(evt.charCode);
5910 switch (char) {
5911 case '0':
5912 case '1':
5913 case '2':
5914 case '3':
5915 case '4':
5916 case '5':
5917 case '6':
5918 case '7':
5919 case '8':
5920 case '9':
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005921 decimal_places = char - '0';
caryclark@google.comf839c032012-10-26 21:03:50 +00005922 redraw();
5923 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005924 case activeKey:
5925 draw_active ^= true;
5926 redraw();
caryclark@google.comf839c032012-10-26 21:03:50 +00005927 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005928 case addKey:
5929 draw_add ^= true;
5930 redraw();
5931 break;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005932 case centerKey:
5933 setScale();
5934 redraw();
5935 break;
5936 case controlLinesBackKey:
5937 control_lines = (control_lines + 3) % 4;
5938 redraw();
5939 break;
5940 case controlLinesKey:
5941 control_lines = (control_lines + 1) % 4;
5942 redraw();
5943 break;
5944 case computedBackKey:
5945 draw_computed = (draw_computed + 5) % 6;
5946 redraw();
5947 break;
5948 case computedKey:
5949 draw_computed = (draw_computed + 1) % 6;
5950 redraw();
5951 break;
5952 case curveTKey:
5953 curve_t ^= true;
5954 if (curve_t) {
5955 draw_legend = true;
5956 }
caryclark@google.comf839c032012-10-26 21:03:50 +00005957 redraw();
5958 break;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005959 case deriviativesKey:
5960 draw_deriviatives = (draw_deriviatives + 1) % 3;
5961 redraw();
5962 break;
5963 case hodoKey:
5964 draw_hodo = (draw_hodo + 1) % 4;
5965 redraw();
5966 break;
5967 case intersectionBackKey:
5968 draw_intersection = (draw_intersection + 3) % 4;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005969 redraw();
5970 break;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005971 case intersectionKey:
5972 draw_intersection = (draw_intersection + 1) % 4;
5973 redraw();
5974 break;
5975 case intersectTKey:
5976 draw_intersectT ^= true;
5977 redraw();
5978 break;
5979 case logCurvesKey:
5980 logCurves(tests[testIndex]);
5981 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005982 case logKey:
5983 draw_log ^= true;
caryclark@google.comf839c032012-10-26 21:03:50 +00005984 redraw();
5985 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00005986 case markKey:
5987 draw_mark ^= true;
5988 redraw();
5989 break;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005990 case midpointKey:
5991 draw_midpoint ^= true;
5992 redraw();
caryclark@google.comf839c032012-10-26 21:03:50 +00005993 break;
caryclark@google.com1304bb22013-03-13 20:29:41 +00005994 case pathKey:
5995 draw_path = (draw_path + 1) % 4;
5996 redraw();
5997 break;
5998 case pathBackKey:
5999 draw_path = (draw_path + 3) % 4;
6000 redraw();
6001 break;
6002 case ptsKey:
6003 pt_labels = (pt_labels + 1) % 3;
6004 redraw();
6005 break;
6006 case sequenceKey:
6007 draw_sequence ^= true;
6008 redraw();
6009 break;
6010 case sortKey:
6011 draw_sort ^= true;
6012 redraw();
caryclark@google.comf839c032012-10-26 21:03:50 +00006013 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00006014 case stepKey:
6015 step_limit++;
caryclark@google.com1304bb22013-03-13 20:29:41 +00006016 if (step_limit > stepMax) {
6017 step_limit = stepMax;
6018 }
caryclark@google.com0b7da432012-10-31 19:00:20 +00006019 redraw();
6020 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00006021 case stepBackKey:
6022 step_limit--;
6023 if (step_limit < 0) {
6024 step_limit = 0;
caryclark@google.com0b7da432012-10-31 19:00:20 +00006025 }
6026 redraw();
caryclark@google.comf839c032012-10-26 21:03:50 +00006027 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00006028 case xyKey:
caryclark@google.comf839c032012-10-26 21:03:50 +00006029 debug_xy ^= true;
6030 redraw();
6031 break;
6032 case '-':
6033 scale /= 2;
6034 calcLeftTop();
6035 redraw();
6036 break;
6037 case '=':
6038 case '+':
6039 scale *= 2;
6040 calcLeftTop();
6041 redraw();
6042 break;
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00006043 case '?':
caryclark@google.com1304bb22013-03-13 20:29:41 +00006044 draw_hints ^= true;
6045 if (draw_hints && !draw_legend) {
6046 draw_legend = true;
6047 }
6048 redraw();
6049 break;
6050 case '/':
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00006051 draw_legend ^= true;
6052 redraw();
6053 break;
caryclark@google.comf839c032012-10-26 21:03:50 +00006054 }
6055}
6056
caryclark@google.com1304bb22013-03-13 20:29:41 +00006057function doKeyDown(evt) {
6058 var char = evt.keyCode;
6059 switch (char) {
6060 case 37: // left arrow
6061 if (evt.shiftKey) {
6062 testIndex -= 9;
6063 }
6064 if (--testIndex < 0)
6065 testIndex = tests.length - 1;
6066 drawTop();
6067 break;
6068 case 39: // right arrow
6069 if (evt.shiftKey) {
6070 testIndex += 9;
6071 }
6072 if (++testIndex >= tests.length)
6073 testIndex = 0;
6074 drawTop();
6075 break;
6076 }
6077}
6078
caryclark@google.comf839c032012-10-26 21:03:50 +00006079function calcXY() {
6080 var e = window.event;
6081 var tgt = e.target || e.srcElement;
6082 var left = tgt.offsetLeft;
6083 var top = tgt.offsetTop;
caryclark@google.comf839c032012-10-26 21:03:50 +00006084 mouseX = (e.clientX - left) / scale + srcLeft;
6085 mouseY = (e.clientY - top) / scale + srcTop;
6086}
6087
6088function calcLeftTop() {
6089 srcLeft = mouseX - screenWidth / 2 / scale;
6090 srcTop = mouseY - screenHeight / 2 / scale;
6091}
6092
6093function handleMouseClick() {
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00006094 if (!curve_t || !ptInTControl()) {
6095 calcXY();
6096 calcLeftTop();
6097 }
caryclark@google.comf839c032012-10-26 21:03:50 +00006098 redraw();
6099}
6100
6101function handleMouseOver() {
6102 calcXY();
caryclark@google.comd4c8e1e2013-03-05 14:13:13 +00006103 if (!debug_xy) {
6104 return;
6105 }
caryclark@google.comf839c032012-10-26 21:03:50 +00006106 var num = mouseX.toFixed(decimal_places) + ", " + mouseY.toFixed(decimal_places);
6107 ctx.beginPath();
caryclark@google.com1304bb22013-03-13 20:29:41 +00006108 ctx.rect(300,100,num.length * 6,10);
caryclark@google.comf839c032012-10-26 21:03:50 +00006109 ctx.fillStyle="white";
6110 ctx.fill();
caryclark@google.com1304bb22013-03-13 20:29:41 +00006111 ctx.font = "normal 10px Arial";
caryclark@google.comf839c032012-10-26 21:03:50 +00006112 ctx.fillStyle="black";
caryclark@google.com1304bb22013-03-13 20:29:41 +00006113 ctx.textAlign = "left";
caryclark@google.comf839c032012-10-26 21:03:50 +00006114 ctx.fillText(num, 300, 108);
6115}
6116
6117function start() {
caryclark@google.com1304bb22013-03-13 20:29:41 +00006118 for (var i = 0; i < testDivs.length; ++i) {
6119 tests[i] = null;
caryclark@google.comf839c032012-10-26 21:03:50 +00006120 }
caryclark@google.com1304bb22013-03-13 20:29:41 +00006121 testIndex = 0;
caryclark@google.comf839c032012-10-26 21:03:50 +00006122 drawTop();
6123 window.addEventListener('keypress', doKeyPress, true);
caryclark@google.com1304bb22013-03-13 20:29:41 +00006124 window.addEventListener('keydown', doKeyDown, true);
caryclark@google.comf839c032012-10-26 21:03:50 +00006125 window.onresize = function() {
6126 drawTop();
6127 }
6128}
6129
6130</script>
6131</head>
6132
6133<body onLoad="start();">
6134<canvas id="canvas" width="750" height="500"
6135 onmousemove="handleMouseOver()"
6136 onclick="handleMouseClick()"
6137 ></canvas >
6138</body>
6139</html>