caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <div height="0" hidden="true"> |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4 | |
caryclark | 2bec26a | 2016-05-26 09:01:47 -0700 | [diff] [blame^] | 5 | Skia UnitTests: --match Simplify$ --resourcePath resources\ SK_DEBUG |
caryclark | ed0935a | 2015-10-22 07:23:52 -0700 | [diff] [blame] | 6 | |
caryclark | 2bec26a | 2016-05-26 09:01:47 -0700 | [diff] [blame^] | 7 | <div id="fuzz763_4713_b"> |
| 8 | seg=1 {{{41, 33}, {41, 36.3137093f}, {38.6568527f, 38.6568527f}}} |
| 9 | seg=2 {{{38.6568527f, 38.6568527f}, {36.3137093f, 41}, {33, 41}}} |
| 10 | seg=3 {{{33, 41}, {29.6862907f, 41}, {27.3431454f, 38.6568527f}}} |
| 11 | seg=4 {{{27.3431454f, 38.6568527f}, {25, 36.3137093f}, {25, 33}}} |
| 12 | seg=5 {{{25, 33}, {25, 29.6862907f}, {27.3431454f, 27.3431454f}}} |
| 13 | seg=6 {{{27.3431454f, 27.3431454f}, {29.6862907f, 25}, {33, 25}}} |
| 14 | seg=7 {{{33, 25}, {36.3137093f, 25}, {38.6568527f, 27.3431454f}}} |
| 15 | seg=8 {{{38.6568527f, 27.3431454f}, {41, 29.6862907f}, {41, 33}}} |
| 16 | seg=9 {{{33.2413864f, 24.6781349f}, {36.5549393f, 24.6459332f}, {38.920742f, 26.966198f}}} |
| 17 | seg=10 {{{38.920742f, 26.966198f}, {41.2865486f, 29.2864628f}, {41.3187523f, 32.6000175f}}} |
| 18 | seg=11 {{{41.3187523f, 32.6000175f}, {41.3509521f, 35.9135704f}, {39.0306854f, 38.2793732f}}} |
| 19 | seg=12 {{{39.0306854f, 38.2793732f}, {38.9995995f, 38.3110695f}, {38.9681816f, 38.3424988f}}} |
| 20 | seg=13 {{{38.9681816f, 38.3424988f}, {38.9374619f, 38.3742142f}, {38.9064751f, 38.4056053f}}} |
| 21 | seg=14 {{{38.9064751f, 38.4056053f}, {38.8441086f, 38.4687881f}, {38.7809143f, 38.5304031f}}} |
| 22 | seg=15 {{{38.7809143f, 38.5304031f}, {38.7196693f, 38.5940361f}, {38.6568527f, 38.6568527f}}} |
| 23 | seg=16 {{{38.6568527f, 38.6568527f}, {36.3137093f, 41}, {33, 41}}} |
| 24 | seg=17 {{{33, 41}, {29.6862907f, 41}, {27.3431454f, 38.6568527f}}} |
| 25 | seg=18 {{{27.3431454f, 38.6568527f}, {25, 36.3137093f}, {25, 33}}} |
| 26 | seg=19 {{{25, 33}, {25, 29.6862907f}, {27.3431454f, 27.3431454f}}} |
| 27 | seg=20 {{{27.3431454f, 27.3431454f}, {27.3875446f, 27.2987461f}, {27.4323025f, 27.2551785f}}} |
| 28 | seg=21 {{{27.4323025f, 27.2551785f}, {27.4755878f, 27.2101307f}, {27.5197105f, 27.165432f}}} |
| 29 | seg=22 {{{27.5197105f, 27.165432f}, {27.541851f, 27.1430035f}, {27.5638676f, 27.1209965f}}} |
| 30 | seg=23 {{{27.5638676f, 27.1209965f}, {27.5855064f, 27.0986347f}, {27.6075668f, 27.0761414f}}} |
| 31 | seg=24 {{{27.6075668f, 27.0761414f}, {29.9278316f, 24.7103367f}, {33.2413864f, 24.6781349f}}} |
| 32 | debugShowQuadIntersection wtTs[0]=1 {{{33.2413864,24.6781349}, {36.5549393,24.6459332}, {38.920742,26.966198}}} {{38.920742,26.966198}} wnTs[0]=0 {{{38.920742,26.966198}, {41.2865486,29.2864628}, {41.3187523,32.6000175}}} |
| 33 | debugShowQuadIntersection wtTs[0]=0 {{{33.2413864,24.6781349}, {36.5549393,24.6459332}, {38.920742,26.966198}}} {{33.2413864,24.6781349}} wnTs[0]=1 {{{27.6075668,27.0761414}, {29.9278316,24.7103367}, {33.2413864,24.6781349}}} |
| 34 | debugShowQuadIntersection wtTs[0]=1 {{{38.920742,26.966198}, {41.2865486,29.2864628}, {41.3187523,32.6000175}}} {{41.3187523,32.6000175}} wnTs[0]=0 {{{41.3187523,32.6000175}, {41.3509521,35.9135704}, {39.0306854,38.2793732}}} |
| 35 | debugShowQuadIntersection wtTs[0]=1 {{{41.3187523,32.6000175}, {41.3509521,35.9135704}, {39.0306854,38.2793732}}} {{39.0306854,38.2793732}} wnTs[0]=0 {{{39.0306854,38.2793732}, {38.9995995,38.3110695}, {38.9681816,38.3424988}}} |
| 36 | debugShowQuadIntersection wtTs[0]=1 {{{39.0306854,38.2793732}, {38.9995995,38.3110695}, {38.9681816,38.3424988}}} {{38.9681816,38.3424988}} wnTs[0]=0 {{{38.9681816,38.3424988}, {38.9374619,38.3742142}, {38.9064751,38.4056053}}} |
| 37 | debugShowQuadIntersection wtTs[0]=1 {{{38.9681816,38.3424988}, {38.9374619,38.3742142}, {38.9064751,38.4056053}}} {{38.9064751,38.4056053}} wnTs[0]=0 {{{38.9064751,38.4056053}, {38.8441086,38.4687881}, {38.7809143,38.5304031}}} |
| 38 | debugShowQuadIntersection wtTs[0]=1 {{{38.9064751,38.4056053}, {38.8441086,38.4687881}, {38.7809143,38.5304031}}} {{38.7809143,38.5304031}} wnTs[0]=0 {{{38.7809143,38.5304031}, {38.7196693,38.5940361}, {38.6568527,38.6568527}}} |
| 39 | debugShowQuadIntersection wtTs[0]=1 {{{38.7809143,38.5304031}, {38.7196693,38.5940361}, {38.6568527,38.6568527}}} {{38.6568527,38.6568527}} wnTs[0]=0 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} |
| 40 | debugShowQuadIntersection wtTs[0]=1 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} {{33,41}} wnTs[0]=0 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} |
| 41 | debugShowQuadIntersection wtTs[0]=1 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} {{27.3431454,38.6568527}} wnTs[0]=0 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} |
| 42 | debugShowQuadIntersection wtTs[0]=1 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} {{25,33}} wnTs[0]=0 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} |
| 43 | debugShowQuadIntersection wtTs[0]=1 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} {{27.3431454,27.3431454}} wnTs[0]=0 {{{27.3431454,27.3431454}, {27.3875446,27.2987461}, {27.4323025,27.2551785}}} |
| 44 | debugShowQuadIntersection wtTs[0]=1 {{{27.3431454,27.3431454}, {27.3875446,27.2987461}, {27.4323025,27.2551785}}} {{27.4323025,27.2551785}} wnTs[0]=0 {{{27.4323025,27.2551785}, {27.4755878,27.2101307}, {27.5197105,27.165432}}} |
| 45 | debugShowQuadIntersection wtTs[0]=1 {{{27.4323025,27.2551785}, {27.4755878,27.2101307}, {27.5197105,27.165432}}} {{27.5197105,27.165432}} wnTs[0]=0 {{{27.5197105,27.165432}, {27.541851,27.1430035}, {27.5638676,27.1209965}}} |
| 46 | debugShowQuadIntersection wtTs[0]=1 {{{27.5197105,27.165432}, {27.541851,27.1430035}, {27.5638676,27.1209965}}} {{27.5638676,27.1209965}} wnTs[0]=0 {{{27.5638676,27.1209965}, {27.5855064,27.0986347}, {27.6075668,27.0761414}}} |
| 47 | debugShowQuadIntersection wtTs[0]=1 {{{27.5638676,27.1209965}, {27.5855064,27.0986347}, {27.6075668,27.0761414}}} {{27.6075668,27.0761414}} wnTs[0]=0 {{{27.6075668,27.0761414}, {29.9278316,24.7103367}, {33.2413864,24.6781349}}} |
| 48 | id=1 1=(0,0.5) [2] 3=(0.5,1) [2] id=2 2=(0,1) [3,1] |
| 49 | id=1 1=(0,0.5) [2] 3=(0.5,1) [4] id=2 2=(0,0.5) [1] 4=(0.5,1) [3] |
| 50 | id=1 3=(0.5,1) [4] id=2 4=(0.5,1) [3] |
| 51 | id=1 (empty) id=2 (empty) |
| 52 | debugShowQuadIntersection no intersect {{{33.2413864,24.6781349}, {36.5549393,24.6459332}, {38.920742,26.966198}}} {{{33,25}, {36.3137093,25}, {38.6568527,27.3431454}}} |
| 53 | id=1 1=(0,1) [4,2] id=2 2=(0,0.5) [1] 4=(0.5,1) [1] |
| 54 | id=1 (empty) id=2 (empty) |
| 55 | debugShowQuadIntersection no intersect {{{38.920742,26.966198}, {41.2865486,29.2864628}, {41.3187523,32.6000175}}} {{{38.6568527,27.3431454}, {41,29.6862907}, {41,33}}} |
| 56 | id=1 1=(0,0.5) [2] 3=(0.5,1) [2] id=2 2=(0,1) [3,1] |
| 57 | id=1 1=(0,0.5) [2] 3=(0.5,1) [4,2] id=2 2=(0,0.5) [3,1] 4=(0.5,1) [3] |
| 58 | id=1 3=(0.5,1) [4,2] id=2 2=(0,0.5) [3] 4=(0.5,1) [3] |
| 59 | id=1 3=(0.5,1) [6,4] id=2 6=(0.25,0.5) [3] 4=(0.5,1) [3] |
| 60 | id=1 3=(0.5,0.75) [4] 7=(0.75,1) [4] id=2 4=(0.5,1) [7,3] |
| 61 | id=1 7=(0.75,1) [8,4] id=2 4=(0.5,0.75) [7] 8=(0.75,1) [7] |
| 62 | id=1 7=(0.75,1) [10,8] id=2 10=(0.625,0.75) [7] 8=(0.75,1) [7] |
| 63 | id=1 9=(0.875,1) [8] id=2 8=(0.75,1) [9] |
| 64 | id=1 (empty) id=2 (empty) |
| 65 | debugShowQuadIntersection no intersect {{{41.3187523,32.6000175}, {41.3509521,35.9135704}, {39.0306854,38.2793732}}} {{{41,33}, {41,36.3137093}, {38.6568527,38.6568527}}} |
| 66 | debugShowQuadIntersection no intersect {{{41.3187523,32.6000175}, {41.3509521,35.9135704}, {39.0306854,38.2793732}}} {{{38.6568527,27.3431454}, {41,29.6862907}, {41,33}}} |
| 67 | id=1 1=(0,1) [4] id=2 4=(0.5,1) [1] |
| 68 | id=1 1=(0,1) [6] id=2 6=(0.75,1) [1] |
| 69 | id=1 (empty) id=2 (empty) |
| 70 | debugShowQuadIntersection no intersect {{{39.0306854,38.2793732}, {38.9995995,38.3110695}, {38.9681816,38.3424988}}} {{{41,33}, {41,36.3137093}, {38.6568527,38.6568527}}} |
| 71 | id=1 1=(0,1) [4] id=2 4=(0.5,1) [1] |
| 72 | id=1 1=(0,1) [6] id=2 6=(0.75,1) [1] |
| 73 | id=1 1=(0,1) [8] id=2 8=(0.875,1) [1] |
| 74 | id=1 (empty) id=2 (empty) |
| 75 | debugShowQuadIntersection no intersect {{{38.9681816,38.3424988}, {38.9374619,38.3742142}, {38.9064751,38.4056053}}} {{{41,33}, {41,36.3137093}, {38.6568527,38.6568527}}} |
| 76 | id=1 1=(0,1) [4] id=2 4=(0.5,1) [1] |
| 77 | id=1 1=(0,1) [6] id=2 6=(0.75,1) [1] |
| 78 | id=1 1=(0,1) [8] id=2 8=(0.875,1) [1] |
| 79 | id=1 1=(0,1) [10] id=2 10=(0.9375,1) [1] |
| 80 | id=1 1=(0,1) [12,10] id=2 10=(0.9375,0.96875) [1] 12=(0.96875,1) [1] |
| 81 | id=1 1=(0,1) [14,12,10] id=2 10=(0.9375,0.953125) [1] 14=(0.953125,0.96875) [1] 12=(0.96875,1) [1] |
| 82 | id=1 1=(0,1) [14,12,10] id=2 10=(0.9375,0.953125) [1] 14=(0.953125,0.96875) [1] 12=(0.96875,0.984375) [1] |
| 83 | id=1 3=(0.5,1) [12] id=2 12=(0.96875,0.984375) [3] |
| 84 | id=1 3=(0.5,1) [12] id=2 12=(0.96875,0.976563) [3] |
| 85 | id=1 5=(0.75,1) [12] id=2 12=(0.96875,0.976563) [5] |
| 86 | id=1 5=(0.75,1) [20,12] id=2 12=(0.96875,0.972656) [5] 20=(0.972656,0.976563) [5] |
| 87 | id=1 7=(0.875,1) [20] id=2 20=(0.972656,0.976563) [7] |
| 88 | id=1 7=(0.875,1) [20] id=2 20=(0.972656,0.974609) [7] |
| 89 | id=1 (empty) id=2 (empty) |
| 90 | debugShowQuadIntersection no intersect {{{38.9064751,38.4056053}, {38.8441086,38.4687881}, {38.7809143,38.5304031}}} {{{41,33}, {41,36.3137093}, {38.6568527,38.6568527}}} |
| 91 | id=1 1=(0,1) [4] id=2 4=(0.5,1) [1] |
| 92 | id=1 1=(0,1) [6] id=2 6=(0.75,1) [1] |
| 93 | id=1 1=(0,1) [8] id=2 8=(0.875,1) [1] |
| 94 | id=1 1=(0,1) [10] id=2 10=(0.9375,1) [1] |
| 95 | id=1 1=(0,1) [12] id=2 12=(0.96875,1) [1] |
| 96 | id=1 1=(0,1) [14,12] id=2 12=(0.96875,0.984375) [1] 14=(0.984375,1) [1] |
| 97 | id=1 1=(0,0.5) [14,12] 3=(0.5,1) [14] id=2 12=(0.96875,0.984375) [1] 14=(0.984375,1) [3,1] |
| 98 | id=1 1=(0,0.5) [16,14,12] 3=(0.5,1) [14] id=2 12=(0.96875,0.976563) [1] 16=(0.976563,0.984375) [1] 14=(0.984375,1) [3,1] |
| 99 | id=1 1=(0,0.5) [16,14,12] 3=(0.5,1) [18,14] id=2 12=(0.96875,0.976563) [1] 16=(0.976563,0.984375) [1] 14=(0.984375,0.992188) [3,1] 18=(0.992188,1) [3] |
| 100 | id=1 1=(0,0.25) [16,12] 5=(0.25,0.5) [14,16] 3=(0.5,1) [18,14] id=2 12=(0.96875,0.976563) [1] 16=(0.976563,0.984375) [5,1] 14=(0.984375,0.992188) [5,3] 18=(0.992188,1) [3] |
| 101 | id=1 1=(0,0.25) [16,12] 5=(0.25,0.5) [14,16] 3=(0.5,0.75) [18,14] 7=(0.75,1) [18] id=2 12=(0.96875,0.976563) [1] 16=(0.976563,0.984375) [5,1] 14=(0.984375,0.992188) [5,3] 18=(0.992188,1) [7,3] |
| 102 | id=1 1=(0,0.25) [20,16] 5=(0.25,0.5) [14,16] 3=(0.5,0.75) [18,14] 7=(0.75,1) [18] id=2 20=(0.972656,0.976563) [1] 16=(0.976563,0.984375) [5,1] 14=(0.984375,0.992188) [5,3] 18=(0.992188,1) [7,3] |
| 103 | id=1 1=(0,0.25) [20,16] 5=(0.25,0.5) [22,14,16] 3=(0.5,0.75) [18,14] 7=(0.75,1) [18] id=2 20=(0.972656,0.976563) [1] 16=(0.976563,0.980469) [5,1] 22=(0.980469,0.984375) [5] 14=(0.984375,0.992188) [5,3] 18=(0.992188,1) [7,3] |
| 104 | id=1 1=(0,0.25) [20,16] 5=(0.25,0.5) [22,14,16] 3=(0.5,0.75) [24,18,14] 7=(0.75,1) [18] id=2 20=(0.972656,0.976563) [1] 16=(0.976563,0.980469) [5,1] 22=(0.980469,0.984375) [5] 14=(0.984375,0.988281) [5,3] 24=(0.988281,0.992188) [3] 18=(0.992188,1) [7,3] |
| 105 | id=1 1=(0,0.25) [20,16] 5=(0.25,0.5) [22,14,16] 3=(0.5,0.75) [24,18,14] 7=(0.75,1) [26,18] id=2 20=(0.972656,0.976563) [1] 16=(0.976563,0.980469) [5,1] 22=(0.980469,0.984375) [5] 14=(0.984375,0.988281) [5,3] 24=(0.988281,0.992188) [3] 18=(0.992188,0.996094) [7,3] 26=(0.996094,1) [7] |
| 106 | id=1 1=(0,0.125) [20] 9=(0.125,0.25) [16,20] 5=(0.25,0.5) [22,14,16] 3=(0.5,0.75) [24,18,14] 7=(0.75,1) [26,18] id=2 20=(0.972656,0.976563) [9,1] 16=(0.976563,0.980469) [9,5] 22=(0.980469,0.984375) [5] 14=(0.984375,0.988281) [5,3] 24=(0.988281,0.992188) [3] 18=(0.992188,0.996094) [7,3] 26=(0.996094,1) [7] |
| 107 | id=1 1=(0,0.125) [20] 9=(0.125,0.25) [16,20] 5=(0.25,0.375) [22,16] 11=(0.375,0.5) [14,22] 3=(0.5,0.75) [24,18,14] 7=(0.75,1) [26,18] id=2 20=(0.972656,0.976563) [9,1] 16=(0.976563,0.980469) [9,5] 22=(0.980469,0.984375) [11,5] 14=(0.984375,0.988281) [11,3] 24=(0.988281,0.992188) [3] 18=(0.992188,0.996094) [7,3] 26=(0.996094,1) [7] |
| 108 | id=1 1=(0,0.125) [20] 9=(0.125,0.25) [16,20] 5=(0.25,0.375) [22,16] 11=(0.375,0.5) [14,22] 3=(0.5,0.625) [24,14] 13=(0.625,0.75) [18,24] 7=(0.75,1) [26,18] id=2 20=(0.972656,0.976563) [9,1] 16=(0.976563,0.980469) [9,5] 22=(0.980469,0.984375) [11,5] 14=(0.984375,0.988281) [11,3] 24=(0.988281,0.992188) [13,3] 18=(0.992188,0.996094) [13,7] 26=(0.996094,1) [7] |
| 109 | id=1 1=(0,0.125) [20] 9=(0.125,0.25) [16,20] 5=(0.25,0.375) [22,16] 11=(0.375,0.5) [14,22] 3=(0.5,0.625) [24,14] 13=(0.625,0.75) [18,24] 7=(0.75,0.875) [26,18] 15=(0.875,1) [26] id=2 20=(0.972656,0.976563) [9,1] 16=(0.976563,0.980469) [9,5] 22=(0.980469,0.984375) [11,5] 14=(0.984375,0.988281) [11,3] 24=(0.988281,0.992188) [13,3] 18=(0.992188,0.996094) [13,7] 26=(0.996094,1) [15,7] |
| 110 | id=1 1=(0,0.125) [28,20] 9=(0.125,0.25) [28,16] 5=(0.25,0.375) [22,16] 11=(0.375,0.5) [14,22] 3=(0.5,0.625) [24,14] 13=(0.625,0.75) [18,24] 7=(0.75,0.875) [26,18] 15=(0.875,1) [26] id=2 20=(0.972656,0.974609) [1] 28=(0.974609,0.976563) [1,9] 16=(0.976563,0.980469) [9,5] 22=(0.980469,0.984375) [11,5] 14=(0.984375,0.988281) [11,3] 24=(0.988281,0.992188) [13,3] 18=(0.992188,0.996094) [13,7] 26=(0.996094,1) [15,7] |
| 111 | id=1 1=(0,0.125) [28,20] 9=(0.125,0.25) [30,28,16] 5=(0.25,0.375) [30,22] 11=(0.375,0.5) [14,22] 3=(0.5,0.625) [24,14] 13=(0.625,0.75) [18,24] 7=(0.75,0.875) [26,18] 15=(0.875,1) [26] id=2 20=(0.972656,0.974609) [1] 28=(0.974609,0.976563) [1,9] 16=(0.976563,0.978516) [9] 30=(0.978516,0.980469) [5,9] 22=(0.980469,0.984375) [11,5] 14=(0.984375,0.988281) [11,3] 24=(0.988281,0.992188) [13,3] 18=(0.992188,0.996094) [13,7] 26=(0.996094,1) [15,7] |
| 112 | id=1 1=(0,0.125) [28,20] 9=(0.125,0.25) [30,28,16] 5=(0.25,0.375) [32,30,22] 11=(0.375,0.5) [32,14] 3=(0.5,0.625) [24,14] 13=(0.625,0.75) [18,24] 7=(0.75,0.875) [26,18] 15=(0.875,1) [26] id=2 20=(0.972656,0.974609) [1] 28=(0.974609,0.976563) [1,9] 16=(0.976563,0.978516) [9] 30=(0.978516,0.980469) [5,9] 22=(0.980469,0.982422) [5] 32=(0.982422,0.984375) [5,11] 14=(0.984375,0.988281) [11,3] 24=(0.988281,0.992188) [13,3] 18=(0.992188,0.996094) [13,7] 26=(0.996094,1) [15,7] |
| 113 | id=1 1=(0,0.125) [28,20] 9=(0.125,0.25) [30,28,16] 5=(0.25,0.375) [32,30,22] 11=(0.375,0.5) [34,32,14] 3=(0.5,0.625) [34,24] 13=(0.625,0.75) [18,24] 7=(0.75,0.875) [26,18] 15=(0.875,1) [26] id=2 20=(0.972656,0.974609) [1] 28=(0.974609,0.976563) [1,9] 16=(0.976563,0.978516) [9] 30=(0.978516,0.980469) [5,9] 22=(0.980469,0.982422) [5] 32=(0.982422,0.984375) [5,11] 14=(0.984375,0.986328) [11] 34=(0.986328,0.988281) [3,11] 24=(0.988281,0.992188) [13,3] 18=(0.992188,0.996094) [13,7] 26=(0.996094,1) [15,7] |
| 114 | id=1 1=(0,0.125) [28,20] 9=(0.125,0.25) [30,28,16] 5=(0.25,0.375) [32,30,22] 11=(0.375,0.5) [34,32,14] 3=(0.5,0.625) [34,24] 13=(0.625,0.75) [36,18,24] 7=(0.75,0.875) [26,18] 15=(0.875,1) [26] id=2 20=(0.972656,0.974609) [1] 28=(0.974609,0.976563) [1,9] 16=(0.976563,0.978516) [9] 30=(0.978516,0.980469) [5,9] 22=(0.980469,0.982422) [5] 32=(0.982422,0.984375) [5,11] 14=(0.984375,0.986328) [11] 34=(0.986328,0.988281) [3,11] 24=(0.988281,0.990234) [13,3] 36=(0.990234,0.992188) [13] 18=(0.992188,0.996094) [13,7] 26=(0.996094,1) [15,7] |
| 115 | id=1 1=(0,0.125) [28,20] 9=(0.125,0.25) [30,28,16] 5=(0.25,0.375) [32,30,22] 11=(0.375,0.5) [34,32,14] 3=(0.5,0.625) [34,24] 13=(0.625,0.75) [36,18,24] 7=(0.75,0.875) [38,26,18] 15=(0.875,1) [26] id=2 20=(0.972656,0.974609) [1] 28=(0.974609,0.976563) [1,9] 16=(0.976563,0.978516) [9] 30=(0.978516,0.980469) [5,9] 22=(0.980469,0.982422) [5] 32=(0.982422,0.984375) [5,11] 14=(0.984375,0.986328) [11] 34=(0.986328,0.988281) [3,11] 24=(0.988281,0.990234) [13,3] 36=(0.990234,0.992188) [13] 18=(0.992188,0.994141) [13,7] 38=(0.994141,0.996094) [7] 26=(0.996094,1) [15,7] |
| 116 | id=1 1=(0,0.125) [28,20] 9=(0.125,0.25) [30,28,16] 5=(0.25,0.375) [32,30,22] 11=(0.375,0.5) [34,32,14] 3=(0.5,0.625) [34,24] 13=(0.625,0.75) [36,18,24] 7=(0.75,0.875) [38,26,18] 15=(0.875,1) [40,26] id=2 20=(0.972656,0.974609) [1] 28=(0.974609,0.976563) [1,9] 16=(0.976563,0.978516) [9] 30=(0.978516,0.980469) [5,9] 22=(0.980469,0.982422) [5] 32=(0.982422,0.984375) [5,11] 14=(0.984375,0.986328) [11] 34=(0.986328,0.988281) [3,11] 24=(0.988281,0.990234) [13,3] 36=(0.990234,0.992188) [13] 18=(0.992188,0.994141) [13,7] 38=(0.994141,0.996094) [7] 26=(0.996094,0.998047) [15,7] 40=(0.998047,1) [15] |
| 117 | setPerp t=0.974609375 cPt=(38.7743301,38.5372393) == oppT=0.0537252999 fPerpPt=(38.774329,38.5372382) |
| 118 | setPerp t=0.9765625 cPt=(38.7654006,38.5464847) == oppT=0.126456412 fPerpPt=(38.7653995,38.5464837) |
| 119 | setPerp t=0.0625 cPt=(38.7732525,38.5383541) == oppT=0.974845025 fPerpPt=(38.7732537,38.5383551) |
| 120 | setPerp t=0.974609375 cPt=(38.7743301,38.5372393) == oppT=0.0537252999 fPerpPt=(38.774329,38.5372382) |
| 121 | setPerp t=0 cPt=(38.7809143,38.5304031) == oppT=0.973166462 fPerpPt=(38.7809154,38.5304042) |
| 122 | setPerp t=0.974609375 cPt=(38.7743301,38.5372393) == oppT=0.0537252999 fPerpPt=(38.774329,38.5372382) |
| 123 | setPerp t=0.9765625 cPt=(38.7654006,38.5464847) == oppT=0.126456412 fPerpPt=(38.7653995,38.5464837) |
| 124 | setPerp t=0.0625 cPt=(38.7732525,38.5383541) == oppT=0.974845025 fPerpPt=(38.7732537,38.5383551) |
| 125 | setPerp t=0.125 cPt=(38.7655785,38.5462986) == oppT=0.976523392 fPerpPt=(38.7655796,38.5462997) |
| 126 | id=1 9=(0.125,0.25) [30,28,16] 5=(0.25,0.375) [32,30,22] 11=(0.375,0.5) [34,32,14] 3=(0.5,0.625) [34,24] 13=(0.625,0.75) [36,18,24] 7=(0.75,0.875) [38,26,18] 15=(0.875,1) [40,26] id=2 28=(0.974609,0.976563) [9] 16=(0.976563,0.978516) [9] 30=(0.978516,0.980469) [5,9] 22=(0.980469,0.982422) [5] 32=(0.982422,0.984375) [5,11] 14=(0.984375,0.986328) [11] 34=(0.986328,0.988281) [3,11] 24=(0.988281,0.990234) [13,3] 36=(0.990234,0.992188) [13] 18=(0.992188,0.994141) [13,7] 38=(0.994141,0.996094) [7] 26=(0.996094,0.998047) [15,7] 40=(0.998047,1) [15] |
| 127 | setPerp t=0.974609375 cPt=(38.7743301,38.5372393) == oppT=0.0537252999 fPerpPt=(38.774329,38.5372382) |
| 128 | setPerp t=0.9765625 cPt=(38.7654006,38.5464847) == oppT=0.126456412 fPerpPt=(38.7653995,38.5464837) |
| 129 | setPerp t=0.125 cPt=(38.7655785,38.5462986) == oppT=0.976523392 fPerpPt=(38.7655796,38.5462997) |
| 130 | setPerp t=0.9765625 cPt=(38.7654006,38.5464847) == oppT=0.126456412 fPerpPt=(38.7653995,38.5464837) |
| 131 | setPerp t=0.978515625 cPt=(38.7564533,38.5557228) == oppT=0.199197443 fPerpPt=(38.7564523,38.5557218) |
| 132 | setPerp t=0.1875 cPt=(38.7578922,38.5542368) == oppT=0.978201562 fPerpPt=(38.7578932,38.5542378) |
| 133 | setPerp t=0.9765625 cPt=(38.7654006,38.5464847) == oppT=0.126456412 fPerpPt=(38.7653995,38.5464837) |
| 134 | setPerp t=0.978515625 cPt=(38.7564533,38.5557228) == oppT=0.199197443 fPerpPt=(38.7564523,38.5557218) |
| 135 | setPerp t=0.1875 cPt=(38.7578922,38.5542368) == oppT=0.978201562 fPerpPt=(38.7578932,38.5542378) |
| 136 | setPerp t=0.978515625 cPt=(38.7564533,38.5557228) == oppT=0.199197443 fPerpPt=(38.7564523,38.5557218) |
| 137 | setPerp t=0.98046875 cPt=(38.7474881,38.5649534) == oppT=0.271948381 fPerpPt=(38.7474871,38.5649525) |
| 138 | setPerp t=0.25 cPt=(38.7501936,38.5621686) == oppT=0.979879536 fPerpPt=(38.7501946,38.5621695) |
| 139 | id=1 5=(0.25,0.375) [32,30,22] 11=(0.375,0.5) [34,32,14] 3=(0.5,0.625) [34,24] 13=(0.625,0.75) [36,18,24] 7=(0.75,0.875) [38,26,18] 15=(0.875,1) [40,26] id=2 30=(0.978516,0.980469) [5] 22=(0.980469,0.982422) [5] 32=(0.982422,0.984375) [5,11] 14=(0.984375,0.986328) [11] 34=(0.986328,0.988281) [3,11] 24=(0.988281,0.990234) [13,3] 36=(0.990234,0.992188) [13] 18=(0.992188,0.994141) [13,7] 38=(0.994141,0.996094) [7] 26=(0.996094,0.998047) [15,7] 40=(0.998047,1) [15] |
| 140 | setPerp t=0.978515625 cPt=(38.7564533,38.5557228) == oppT=0.199197443 fPerpPt=(38.7564523,38.5557218) |
| 141 | setPerp t=0.98046875 cPt=(38.7474881,38.5649534) == oppT=0.271948381 fPerpPt=(38.7474871,38.5649525) |
| 142 | setPerp t=0.25 cPt=(38.7501936,38.5621686) == oppT=0.979879536 fPerpPt=(38.7501946,38.5621695) |
| 143 | setPerp t=0.98046875 cPt=(38.7474881,38.5649534) == oppT=0.271948381 fPerpPt=(38.7474871,38.5649525) |
| 144 | setPerp t=0.982421875 cPt=(38.738505,38.5741767) == oppT=0.344709216 fPerpPt=(38.7385041,38.5741759) |
| 145 | setPerp t=0.3125 cPt=(38.7424827,38.570094) == oppT=0.981557313 fPerpPt=(38.7424836,38.5700949) |
| 146 | setPerp t=0.98046875 cPt=(38.7474881,38.5649534) == oppT=0.271948381 fPerpPt=(38.7474871,38.5649525) |
| 147 | setPerp t=0.982421875 cPt=(38.738505,38.5741767) == oppT=0.344709216 fPerpPt=(38.7385041,38.5741759) |
| 148 | setPerp t=0.3125 cPt=(38.7424827,38.570094) == oppT=0.981557313 fPerpPt=(38.7424836,38.5700949) |
| 149 | setPerp t=0.982421875 cPt=(38.738505,38.5741767) == oppT=0.344709216 fPerpPt=(38.7385041,38.5741759) |
| 150 | setPerp t=0.984375 cPt=(38.729504,38.5833925) == oppT=0.417479935 fPerpPt=(38.7295033,38.5833918) |
| 151 | setPerp t=0.375 cPt=(38.7347596,38.5780131) == oppT=0.983234895 fPerpPt=(38.7347604,38.5780138) |
| 152 | id=1 11=(0.375,0.5) [34,32,14] 3=(0.5,0.625) [34,24] 13=(0.625,0.75) [36,18,24] 7=(0.75,0.875) [38,26,18] 15=(0.875,1) [40,26] id=2 32=(0.982422,0.984375) [11] 14=(0.984375,0.986328) [11] 34=(0.986328,0.988281) [3,11] 24=(0.988281,0.990234) [13,3] 36=(0.990234,0.992188) [13] 18=(0.992188,0.994141) [13,7] 38=(0.994141,0.996094) [7] 26=(0.996094,0.998047) [15,7] 40=(0.998047,1) [15] |
| 153 | setPerp t=0.982421875 cPt=(38.738505,38.5741767) == oppT=0.344709216 fPerpPt=(38.7385041,38.5741759) |
| 154 | setPerp t=0.984375 cPt=(38.729504,38.5833925) == oppT=0.417479935 fPerpPt=(38.7295033,38.5833918) |
| 155 | setPerp t=0.375 cPt=(38.7347596,38.5780131) == oppT=0.983234895 fPerpPt=(38.7347604,38.5780138) |
| 156 | setPerp t=0.984375 cPt=(38.729504,38.5833925) == oppT=0.417479935 fPerpPt=(38.7295033,38.5833918) |
| 157 | setPerp t=0.986328125 cPt=(38.7204852,38.592601) == oppT=0.490260525 fPerpPt=(38.7204846,38.5926004) |
| 158 | setPerp t=0.4375 cPt=(38.7270241,38.5859257) == oppT=0.984912281 fPerpPt=(38.7270248,38.5859264) |
| 159 | setPerp t=0.984375 cPt=(38.729504,38.5833925) == oppT=0.417479935 fPerpPt=(38.7295033,38.5833918) |
| 160 | setPerp t=0.986328125 cPt=(38.7204852,38.592601) == oppT=0.490260525 fPerpPt=(38.7204846,38.5926004) |
| 161 | setPerp t=0.4375 cPt=(38.7270241,38.5859257) == oppT=0.984912281 fPerpPt=(38.7270248,38.5859264) |
| 162 | setPerp t=0.986328125 cPt=(38.7204852,38.592601) == oppT=0.490260525 fPerpPt=(38.7204846,38.5926004) |
| 163 | setPerp t=0.98828125 cPt=(38.7114485,38.601802) == oppT=0.563050975 fPerpPt=(38.711448,38.6018015) |
| 164 | setPerp t=0.5 cPt=(38.7192764,38.593832) == oppT=0.986589471 fPerpPt=(38.719277,38.5938326) |
| 165 | id=1 3=(0.5,0.625) [34,24] 13=(0.625,0.75) [36,18,24] 7=(0.75,0.875) [38,26,18] 15=(0.875,1) [40,26] id=2 34=(0.986328,0.988281) [3] 24=(0.988281,0.990234) [13,3] 36=(0.990234,0.992188) [13] 18=(0.992188,0.994141) [13,7] 38=(0.994141,0.996094) [7] 26=(0.996094,0.998047) [15,7] 40=(0.998047,1) [15] |
| 166 | setPerp t=0.986328125 cPt=(38.7204852,38.592601) == oppT=0.490260525 fPerpPt=(38.7204846,38.5926004) |
| 167 | setPerp t=0.98828125 cPt=(38.7114485,38.601802) == oppT=0.563050975 fPerpPt=(38.711448,38.6018015) |
| 168 | setPerp t=0.5 cPt=(38.7192764,38.593832) == oppT=0.986589471 fPerpPt=(38.719277,38.5938326) |
| 169 | setPerp t=0.5625 cPt=(38.7115164,38.6017319) == oppT=0.988266467 fPerpPt=(38.7115169,38.6017324) |
| 170 | setPerp t=0.98828125 cPt=(38.7114485,38.601802) == oppT=0.563050975 fPerpPt=(38.711448,38.6018015) |
| 171 | setPerp t=0.990234375 cPt=(38.7023939,38.6109956) == oppT=0.635851272 fPerpPt=(38.7023935,38.6109953) |
| 172 | setPerp t=0.625 cPt=(38.7037442,38.6096255) == oppT=0.989943268 fPerpPt=(38.7037445,38.6096258) |
| 173 | setPerp t=0.986328125 cPt=(38.7204852,38.592601) == oppT=0.490260525 fPerpPt=(38.7204846,38.5926004) |
| 174 | setPerp t=0.98828125 cPt=(38.7114485,38.601802) == oppT=0.563050975 fPerpPt=(38.711448,38.6018015) |
| 175 | setPerp t=0.5625 cPt=(38.7115164,38.6017319) == oppT=0.988266467 fPerpPt=(38.7115169,38.6017324) |
| 176 | id=1 13=(0.625,0.75) [36,18,24] 7=(0.75,0.875) [38,26,18] 15=(0.875,1) [40,26] id=2 24=(0.988281,0.990234) [13] 36=(0.990234,0.992188) [13] 18=(0.992188,0.994141) [13,7] 38=(0.994141,0.996094) [7] 26=(0.996094,0.998047) [15,7] 40=(0.998047,1) [15] |
| 177 | setPerp t=0.990234375 cPt=(38.7023939,38.6109956) == oppT=0.635851272 fPerpPt=(38.7023935,38.6109953) |
| 178 | setPerp t=0.9921875 cPt=(38.6933214,38.6201819) == oppT=0.708661403 fPerpPt=(38.6933211,38.6201816) |
| 179 | setPerp t=0.6875 cPt=(38.6959596,38.6175126) == oppT=0.991619875 fPerpPt=(38.6959599,38.6175129) |
| 180 | setPerp t=0.98828125 cPt=(38.7114485,38.601802) == oppT=0.563050975 fPerpPt=(38.711448,38.6018015) |
| 181 | setPerp t=0.990234375 cPt=(38.7023939,38.6109956) == oppT=0.635851272 fPerpPt=(38.7023935,38.6109953) |
| 182 | setPerp t=0.625 cPt=(38.7037442,38.6096255) == oppT=0.989943268 fPerpPt=(38.7037445,38.6096258) |
| 183 | setPerp t=0.9921875 cPt=(38.6933214,38.6201819) == oppT=0.708661403 fPerpPt=(38.6933211,38.6201816) |
| 184 | setPerp t=0.994140625 cPt=(38.684231,38.6293607) == oppT=0.781481354 fPerpPt=(38.6842309,38.6293605) |
| 185 | setPerp t=0.75 cPt=(38.6881628,38.6253934) == oppT=0.993296287 fPerpPt=(38.688163,38.6253936) |
| 186 | setPerp t=0.990234375 cPt=(38.7023939,38.6109956) == oppT=0.635851272 fPerpPt=(38.7023935,38.6109953) |
| 187 | setPerp t=0.9921875 cPt=(38.6933214,38.6201819) == oppT=0.708661403 fPerpPt=(38.6933211,38.6201816) |
| 188 | setPerp t=0.6875 cPt=(38.6959596,38.6175126) == oppT=0.991619875 fPerpPt=(38.6959599,38.6175129) |
| 189 | id=1 7=(0.75,0.875) [38,26,18] 15=(0.875,1) [40,26] id=2 18=(0.992188,0.994141) [7] 38=(0.994141,0.996094) [7] 26=(0.996094,0.998047) [15,7] 40=(0.998047,1) [15] |
| 190 | setPerp t=0.994140625 cPt=(38.684231,38.6293607) == oppT=0.781481354 fPerpPt=(38.6842309,38.6293605) |
| 191 | setPerp t=0.99609375 cPt=(38.6751228,38.6385321) == oppT=0.854311113 fPerpPt=(38.6751227,38.638532) |
| 192 | setPerp t=0.8125 cPt=(38.6803537,38.6332678) == oppT=0.994972505 fPerpPt=(38.6803538,38.6332679) |
| 193 | setPerp t=0.9921875 cPt=(38.6933214,38.6201819) == oppT=0.708661403 fPerpPt=(38.6933211,38.6201816) |
| 194 | setPerp t=0.994140625 cPt=(38.684231,38.6293607) == oppT=0.781481354 fPerpPt=(38.6842309,38.6293605) |
| 195 | setPerp t=0.75 cPt=(38.6881628,38.6253934) == oppT=0.993296287 fPerpPt=(38.688163,38.6253936) |
| 196 | setPerp t=0.99609375 cPt=(38.6751228,38.6385321) == oppT=0.854311113 fPerpPt=(38.6751227,38.638532) |
| 197 | setPerp t=0.998046875 cPt=(38.6659967,38.6476961) == oppT=0.927150666 fPerpPt=(38.6659967,38.6476961) |
| 198 | setPerp t=0.875 cPt=(38.6725323,38.6411358) == oppT=0.99664853 fPerpPt=(38.6725324,38.6411359) |
| 199 | setPerp t=0.994140625 cPt=(38.684231,38.6293607) == oppT=0.781481354 fPerpPt=(38.6842309,38.6293605) |
| 200 | setPerp t=0.99609375 cPt=(38.6751228,38.6385321) == oppT=0.854311113 fPerpPt=(38.6751227,38.638532) |
| 201 | setPerp t=0.8125 cPt=(38.6803537,38.6332678) == oppT=0.994972505 fPerpPt=(38.6803538,38.6332679) |
| 202 | id=1 15=(0.875,1) [40,26] id=2 26=(0.996094,0.998047) [15] 40=(0.998047,1) [15] |
| 203 | setPerp t=0.998046875 cPt=(38.6659967,38.6476961) == oppT=0.927150666 fPerpPt=(38.6659967,38.6476961) |
| 204 | setPerp t=1 cPt=(38.6568527,38.6568527) == oppT=1 fPerpPt=(38.6568527,38.6568527) |
| 205 | setPerp t=0.9375 cPt=(38.6646987,38.6489975) == oppT=0.998324361 fPerpPt=(38.6646987,38.6489975) |
| 206 | setPerp t=0.99609375 cPt=(38.6751228,38.6385321) == oppT=0.854311113 fPerpPt=(38.6751227,38.638532) |
| 207 | setPerp t=0.998046875 cPt=(38.6659967,38.6476961) == oppT=0.927150666 fPerpPt=(38.6659967,38.6476961) |
| 208 | setPerp t=0.875 cPt=(38.6725323,38.6411358) == oppT=0.99664853 fPerpPt=(38.6725324,38.6411359) |
| 209 | id=1 31=(0.9375,1) [40] id=2 40=(0.998047,1) [31] |
| 210 | setPerp t=0.9375 cPt=(38.6646987,38.6489975) == oppT=0.998324361 fPerpPt=(38.6646987,38.6489975) |
| 211 | setPerp t=1 cPt=(38.6568527,38.6568527) == oppT=1 fPerpPt=(38.6568527,38.6568527) |
| 212 | setPerp t=0.999023438 cPt=(38.6614269,38.6522753) == oppT=0.963574111 fPerpPt=(38.6614269,38.6522753) |
| 213 | id=1 31=(1,1) [42] id=2 42=(1,1) [31] |
| 214 | debugShowQuadIntersection wtTs[0]=1 {{{38.7809143,38.5304031}, {38.7196693,38.5940361}, {38.6568527,38.6568527}}} {{38.6568527,38.6568527}} wnTs[0]=1 {{{41,33}, {41,36.3137093}, {38.6568527,38.6568527}}} |
| 215 | debugShowQuadIntersection wtTs[0]=1 {{{38.7809143,38.5304031}, {38.7196693,38.5940361}, {38.6568527,38.6568527}}} {{38.6568527,38.6568527}} wnTs[0]=0 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} |
| 216 | debugShowQuadIntersection wtTs[0]=0 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} {{38.6568527,38.6568527}} wnTs[0]=1 {{{41,33}, {41,36.3137093}, {38.6568527,38.6568527}}} |
| 217 | id=1 1=(0,1) [4,2] id=2 2=(0,0.5) [1] 4=(0.5,1) [1] |
| 218 | id=1 1=(0,0.5) [4,2] 3=(0.5,1) [2,4] id=2 2=(0,0.5) [3,1] 4=(0.5,1) [3,1] |
| 219 | id=1 1=(0,0.5) [4,2] 3=(0.5,1) [6,2,4] id=2 2=(0,0.5) [3,1] 4=(0.5,0.75) [3,1] 6=(0.75,1) [3] |
| 220 | id=1 1=(0,0.5) [4,2] 3=(0.5,0.75) [6,2,4] 5=(0.75,1) [4,6] id=2 2=(0,0.5) [3,1] 4=(0.5,0.75) [5,3,1] 6=(0.75,1) [5,3] |
| 221 | id=1 1=(0,0.5) [8,4,2] 3=(0.5,0.75) [8,6,4] 5=(0.75,1) [4,6] id=2 2=(0,0.25) [1] 8=(0.25,0.5) [1,3] 4=(0.5,0.75) [5,3,1] 6=(0.75,1) [5,3] |
| 222 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [2,4,8] 3=(0.5,0.75) [8,6,4] 5=(0.75,1) [4,6] id=2 2=(0,0.25) [7,1] 8=(0.25,0.5) [7,1,3] 4=(0.5,0.75) [7,5,3] 6=(0.75,1) [5,3] |
| 223 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [2,4,8] 3=(0.5,0.75) [8,6,4] 5=(0.75,1) [10,4,6] id=2 2=(0,0.25) [7,1] 8=(0.25,0.5) [7,1,3] 4=(0.5,0.75) [7,5,3] 6=(0.75,0.875) [5,3] 10=(0.875,1) [5] |
| 224 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [2,4,8] 3=(0.5,0.75) [8,6,4] 5=(0.75,0.875) [10,4,6] 9=(0.875,1) [6,10] id=2 2=(0,0.25) [7,1] 8=(0.25,0.5) [7,1,3] 4=(0.5,0.75) [7,5,3] 6=(0.75,0.875) [9,5,3] 10=(0.875,1) [9,5] |
| 225 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [2,4,8] 3=(0.5,0.75) [12,8,6,4] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.25) [7,1] 8=(0.25,0.5) [7,1,3] 4=(0.5,0.625) [7,3] 12=(0.625,0.75) [3,5] 6=(0.75,0.875) [9,5,3] 10=(0.875,1) [9,5] |
| 226 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [2,4,8] 3=(0.5,0.625) [12,8,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.25) [7,1] 8=(0.25,0.5) [7,1,3] 4=(0.5,0.625) [11,7,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,1) [9,5] |
| 227 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [14,2,4,8] 3=(0.5,0.625) [14,12,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.25) [7,1] 8=(0.25,0.375) [7,1] 14=(0.375,0.5) [3,7] 4=(0.5,0.625) [11,7,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,1) [9,5] |
| 228 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.375) [14,2,8] 13=(0.375,0.5) [8,4,14] 3=(0.5,0.625) [14,12,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.25) [7,1] 8=(0.25,0.375) [13,7,1] 14=(0.375,0.5) [13,3,7] 4=(0.5,0.625) [13,11,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,1) [9,5] |
| 229 | id=1 1=(0,0.25) [16,8,2] 7=(0.25,0.375) [16,14,8] 13=(0.375,0.5) [8,4,14] 3=(0.5,0.625) [14,12,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.125) [1] 16=(0.125,0.25) [1,7] 8=(0.25,0.375) [13,7,1] 14=(0.375,0.5) [13,3,7] 4=(0.5,0.625) [13,11,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,1) [9,5] |
| 230 | id=1 1=(0,0.125) [16,2] 15=(0.125,0.25) [2,8,16] 7=(0.25,0.375) [16,14,8] 13=(0.375,0.5) [8,4,14] 3=(0.5,0.625) [14,12,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.125) [15,1] 16=(0.125,0.25) [15,1,7] 8=(0.25,0.375) [15,13,7] 14=(0.375,0.5) [13,3,7] 4=(0.5,0.625) [13,11,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,1) [9,5] |
| 231 | id=1 1=(0,0.125) [16,2] 15=(0.125,0.25) [2,8,16] 7=(0.25,0.375) [16,14,8] 13=(0.375,0.5) [8,4,14] 3=(0.5,0.625) [14,12,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [18,6,10] id=2 2=(0,0.125) [15,1] 16=(0.125,0.25) [15,1,7] 8=(0.25,0.375) [15,13,7] 14=(0.375,0.5) [13,3,7] 4=(0.5,0.625) [13,11,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,0.9375) [9,5] 18=(0.9375,1) [9] |
| 232 | setPerp t=0 cPt=(38.6568527,38.6568527) == oppT=0 fPerpPt=(38.6568527,38.6568527) |
| 233 | setPerp t=0.125 cPt=(38.0559018,39.2060279) == oppT=0.125 fPerpPt=(38.0559018,39.2060279) |
| 234 | setPerp t=0.25 cPt=(37.4246206,39.6819797) == oppT=0.25 fPerpPt=(37.4246206,39.6819797) |
| 235 | setPerp t=0.375 cPt=(36.7630093,40.0847081) == oppT=0.375 fPerpPt=(36.7630093,40.0847081) |
| 236 | setPerp t=0.5 cPt=(36.0710678,40.4142132) == oppT=0.5 fPerpPt=(36.0710678,40.4142132) |
| 237 | setPerp t=0.625 cPt=(35.3487961,40.6704949) == oppT=0.625 fPerpPt=(35.3487961,40.6704949) |
| 238 | setPerp t=0.75 cPt=(34.5961943,40.8535533) == oppT=0.75 fPerpPt=(34.5961943,40.8535533) |
| 239 | setPerp t=0.875 cPt=(33.8132622,40.9633883) == oppT=0.875 fPerpPt=(33.8132622,40.9633883) |
| 240 | setPerp t=0.9375 cPt=(33.4104224,40.9908471) == oppT=0.9375 fPerpPt=(33.4104224,40.9908471) |
| 241 | setPerp t=1 cPt=(33,41) == oppT=1 fPerpPt=(33,41) |
| 242 | setPerp t=0 cPt=(38.6568527,38.6568527) == oppT=0 fPerpPt=(38.6568527,38.6568527) |
| 243 | setPerp t=1 cPt=(33,41) == oppT=1 fPerpPt=(33,41) |
| 244 | id=1 (empty) id=2 (empty) |
| 245 | debugShowQuadIntersection wtTs[0]=0 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} {{38.6568527,38.6568527}} wtTs[1]=1 {{33,41}} wnTs[0]=0 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} wnTs[1]=1 |
| 246 | debugShowQuadIntersection wtTs[0]=1 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} {{33,41}} wnTs[0]=0 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} |
| 247 | debugShowQuadIntersection wtTs[0]=0 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} {{33,41}} wnTs[0]=1 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} |
| 248 | id=1 1=(0,1) [4,2] id=2 2=(0,0.5) [1] 4=(0.5,1) [1] |
| 249 | id=1 1=(0,0.5) [4,2] 3=(0.5,1) [2,4] id=2 2=(0,0.5) [3,1] 4=(0.5,1) [3,1] |
| 250 | id=1 1=(0,0.5) [6,4,2] 3=(0.5,1) [6,4] id=2 2=(0,0.25) [1] 6=(0.25,0.5) [1,3] 4=(0.5,1) [3,1] |
| 251 | id=1 1=(0,0.25) [6,2] 5=(0.25,0.5) [2,4,6] 3=(0.5,1) [6,4] id=2 2=(0,0.25) [5,1] 6=(0.25,0.5) [5,1,3] 4=(0.5,1) [5,3] |
| 252 | id=1 1=(0,0.25) [6,2] 5=(0.25,0.5) [2,4,6] 3=(0.5,1) [8,6,4] id=2 2=(0,0.25) [5,1] 6=(0.25,0.5) [5,1,3] 4=(0.5,0.75) [5,3] 8=(0.75,1) [3] |
| 253 | id=1 1=(0,0.25) [6,2] 5=(0.25,0.5) [2,4,6] 3=(0.5,0.75) [8,6,4] 7=(0.75,1) [4,8] id=2 2=(0,0.25) [5,1] 6=(0.25,0.5) [5,1,3] 4=(0.5,0.75) [7,5,3] 8=(0.75,1) [7,3] |
| 254 | id=1 1=(0,0.25) [10,6,2] 5=(0.25,0.5) [10,4,6] 3=(0.5,0.75) [8,6,4] 7=(0.75,1) [4,8] id=2 2=(0,0.125) [1] 10=(0.125,0.25) [1,5] 6=(0.25,0.5) [5,1,3] 4=(0.5,0.75) [7,5,3] 8=(0.75,1) [7,3] |
| 255 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.5) [10,4,6] 3=(0.5,0.75) [8,6,4] 7=(0.75,1) [4,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.5) [9,5,3] 4=(0.5,0.75) [7,5,3] 8=(0.75,1) [7,3] |
| 256 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.5) [12,10,4,6] 3=(0.5,0.75) [12,8,4] 7=(0.75,1) [4,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [9,5] 12=(0.375,0.5) [3,5] 4=(0.5,0.75) [7,5,3] 8=(0.75,1) [7,3] |
| 257 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.75) [12,8,4] 7=(0.75,1) [4,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.75) [11,7,3] 8=(0.75,1) [7,3] |
| 258 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.75) [14,12,8,4] 7=(0.75,1) [14,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.625) [11,3] 14=(0.625,0.75) [3,7] 8=(0.75,1) [7,3] |
| 259 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.625) [14,12,4] 13=(0.625,0.75) [4,8,14] 7=(0.75,1) [14,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.625) [13,11,3] 14=(0.625,0.75) [13,3,7] 8=(0.75,1) [13,7] |
| 260 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.625) [14,12,4] 13=(0.625,0.75) [4,8,14] 7=(0.75,1) [16,14,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.625) [13,11,3] 14=(0.625,0.75) [13,3,7] 8=(0.75,0.875) [13,7] 16=(0.875,1) [7] |
| 261 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.625) [14,12,4] 13=(0.625,0.75) [4,8,14] 7=(0.75,0.875) [16,14,8] 15=(0.875,1) [8,16] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.625) [13,11,3] 14=(0.625,0.75) [13,3,7] 8=(0.75,0.875) [15,13,7] 16=(0.875,1) [15,7] |
| 262 | id=1 1=(0,0.125) [18,10,2] 9=(0.125,0.25) [18,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.625) [14,12,4] 13=(0.625,0.75) [4,8,14] 7=(0.75,0.875) [16,14,8] 15=(0.875,1) [8,16] id=2 2=(0,0.0625) [1] 18=(0.0625,0.125) [1,9] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.625) [13,11,3] 14=(0.625,0.75) [13,3,7] 8=(0.75,0.875) [15,13,7] 16=(0.875,1) [15,7] |
| 263 | setPerp t=0 cPt=(33,41) == oppT=0 fPerpPt=(33,41) |
| 264 | setPerp t=0.0625 cPt=(32.5895776,40.9908471) == oppT=0.0625 fPerpPt=(32.5895776,40.9908471) |
| 265 | setPerp t=0.125 cPt=(32.1867377,40.9633883) == oppT=0.125 fPerpPt=(32.1867377,40.9633883) |
| 266 | setPerp t=0.25 cPt=(31.4038056,40.8535533) == oppT=0.25 fPerpPt=(31.4038056,40.8535533) |
| 267 | setPerp t=0.375 cPt=(30.6512036,40.6704949) == oppT=0.375 fPerpPt=(30.6512036,40.6704949) |
| 268 | setPerp t=0.5 cPt=(29.9289317,40.4142132) == oppT=0.5 fPerpPt=(29.9289317,40.4142132) |
| 269 | setPerp t=0.625 cPt=(29.2369899,40.0847081) == oppT=0.625 fPerpPt=(29.2369899,40.0847081) |
| 270 | setPerp t=0.75 cPt=(28.5753783,39.6819797) == oppT=0.75 fPerpPt=(28.5753783,39.6819797) |
| 271 | setPerp t=0.875 cPt=(27.9440968,39.2060279) == oppT=0.875 fPerpPt=(27.9440968,39.2060279) |
| 272 | setPerp t=1 cPt=(27.3431454,38.6568527) == oppT=1 fPerpPt=(27.3431454,38.6568527) |
| 273 | setPerp t=0 cPt=(33,41) == oppT=0 fPerpPt=(33,41) |
| 274 | setPerp t=1 cPt=(27.3431454,38.6568527) == oppT=1 fPerpPt=(27.3431454,38.6568527) |
| 275 | id=1 (empty) id=2 (empty) |
| 276 | debugShowQuadIntersection wtTs[0]=0 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} {{33,41}} wtTs[1]=1 {{27.3431454,38.6568527}} wnTs[0]=0 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} wnTs[1]=1 |
| 277 | debugShowQuadIntersection wtTs[0]=1 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} {{27.3431454,38.6568527}} wnTs[0]=0 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} |
| 278 | debugShowQuadIntersection wtTs[0]=0 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} {{27.3431454,38.6568527}} wnTs[0]=1 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} |
| 279 | id=1 1=(0,1) [4,2] id=2 2=(0,0.5) [1] 4=(0.5,1) [1] |
| 280 | id=1 1=(0,0.5) [4,2] 3=(0.5,1) [2,4] id=2 2=(0,0.5) [3,1] 4=(0.5,1) [3,1] |
| 281 | id=1 1=(0,0.5) [4,2] 3=(0.5,1) [6,2,4] id=2 2=(0,0.5) [3,1] 4=(0.5,0.75) [3,1] 6=(0.75,1) [3] |
| 282 | id=1 1=(0,0.5) [4,2] 3=(0.5,0.75) [6,2,4] 5=(0.75,1) [4,6] id=2 2=(0,0.5) [3,1] 4=(0.5,0.75) [5,3,1] 6=(0.75,1) [5,3] |
| 283 | id=1 1=(0,0.5) [8,4,2] 3=(0.5,0.75) [8,6,4] 5=(0.75,1) [4,6] id=2 2=(0,0.25) [1] 8=(0.25,0.5) [1,3] 4=(0.5,0.75) [5,3,1] 6=(0.75,1) [5,3] |
| 284 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [2,4,8] 3=(0.5,0.75) [8,6,4] 5=(0.75,1) [4,6] id=2 2=(0,0.25) [7,1] 8=(0.25,0.5) [7,1,3] 4=(0.5,0.75) [7,5,3] 6=(0.75,1) [5,3] |
| 285 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [2,4,8] 3=(0.5,0.75) [8,6,4] 5=(0.75,1) [10,4,6] id=2 2=(0,0.25) [7,1] 8=(0.25,0.5) [7,1,3] 4=(0.5,0.75) [7,5,3] 6=(0.75,0.875) [5,3] 10=(0.875,1) [5] |
| 286 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [2,4,8] 3=(0.5,0.75) [8,6,4] 5=(0.75,0.875) [10,4,6] 9=(0.875,1) [6,10] id=2 2=(0,0.25) [7,1] 8=(0.25,0.5) [7,1,3] 4=(0.5,0.75) [7,5,3] 6=(0.75,0.875) [9,5,3] 10=(0.875,1) [9,5] |
| 287 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [2,4,8] 3=(0.5,0.75) [12,8,6,4] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.25) [7,1] 8=(0.25,0.5) [7,1,3] 4=(0.5,0.625) [7,3] 12=(0.625,0.75) [3,5] 6=(0.75,0.875) [9,5,3] 10=(0.875,1) [9,5] |
| 288 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [2,4,8] 3=(0.5,0.625) [12,8,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.25) [7,1] 8=(0.25,0.5) [7,1,3] 4=(0.5,0.625) [11,7,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,1) [9,5] |
| 289 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.5) [14,2,4,8] 3=(0.5,0.625) [14,12,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.25) [7,1] 8=(0.25,0.375) [7,1] 14=(0.375,0.5) [3,7] 4=(0.5,0.625) [11,7,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,1) [9,5] |
| 290 | id=1 1=(0,0.25) [8,2] 7=(0.25,0.375) [14,2,8] 13=(0.375,0.5) [8,4,14] 3=(0.5,0.625) [14,12,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.25) [7,1] 8=(0.25,0.375) [13,7,1] 14=(0.375,0.5) [13,3,7] 4=(0.5,0.625) [13,11,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,1) [9,5] |
| 291 | id=1 1=(0,0.25) [16,8,2] 7=(0.25,0.375) [16,14,8] 13=(0.375,0.5) [8,4,14] 3=(0.5,0.625) [14,12,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.125) [1] 16=(0.125,0.25) [1,7] 8=(0.25,0.375) [13,7,1] 14=(0.375,0.5) [13,3,7] 4=(0.5,0.625) [13,11,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,1) [9,5] |
| 292 | id=1 1=(0,0.125) [16,2] 15=(0.125,0.25) [2,8,16] 7=(0.25,0.375) [16,14,8] 13=(0.375,0.5) [8,4,14] 3=(0.5,0.625) [14,12,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [6,10] id=2 2=(0,0.125) [15,1] 16=(0.125,0.25) [15,1,7] 8=(0.25,0.375) [15,13,7] 14=(0.375,0.5) [13,3,7] 4=(0.5,0.625) [13,11,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,1) [9,5] |
| 293 | id=1 1=(0,0.125) [16,2] 15=(0.125,0.25) [2,8,16] 7=(0.25,0.375) [16,14,8] 13=(0.375,0.5) [8,4,14] 3=(0.5,0.625) [14,12,4] 11=(0.625,0.75) [4,6,12] 5=(0.75,0.875) [12,10,6] 9=(0.875,1) [18,6,10] id=2 2=(0,0.125) [15,1] 16=(0.125,0.25) [15,1,7] 8=(0.25,0.375) [15,13,7] 14=(0.375,0.5) [13,3,7] 4=(0.5,0.625) [13,11,3] 12=(0.625,0.75) [11,3,5] 6=(0.75,0.875) [11,9,5] 10=(0.875,0.9375) [9,5] 18=(0.9375,1) [9] |
| 294 | setPerp t=0 cPt=(27.3431454,38.6568527) == oppT=0 fPerpPt=(27.3431454,38.6568527) |
| 295 | setPerp t=0.125 cPt=(26.7939707,38.0559018) == oppT=0.125 fPerpPt=(26.7939707,38.0559018) |
| 296 | setPerp t=0.25 cPt=(26.3180193,37.4246206) == oppT=0.25 fPerpPt=(26.3180193,37.4246206) |
| 297 | setPerp t=0.375 cPt=(25.9152912,36.7630093) == oppT=0.375 fPerpPt=(25.9152912,36.7630093) |
| 298 | setPerp t=0.5 cPt=(25.5857863,36.0710678) == oppT=0.5 fPerpPt=(25.5857863,36.0710678) |
| 299 | setPerp t=0.625 cPt=(25.3295048,35.3487961) == oppT=0.625 fPerpPt=(25.3295048,35.3487961) |
| 300 | setPerp t=0.75 cPt=(25.1464466,34.5961943) == oppT=0.75 fPerpPt=(25.1464466,34.5961943) |
| 301 | setPerp t=0.875 cPt=(25.0366116,33.8132622) == oppT=0.875 fPerpPt=(25.0366116,33.8132622) |
| 302 | setPerp t=0.9375 cPt=(25.0091529,33.4104224) == oppT=0.9375 fPerpPt=(25.0091529,33.4104224) |
| 303 | setPerp t=1 cPt=(25,33) == oppT=1 fPerpPt=(25,33) |
| 304 | setPerp t=0 cPt=(27.3431454,38.6568527) == oppT=0 fPerpPt=(27.3431454,38.6568527) |
| 305 | setPerp t=1 cPt=(25,33) == oppT=1 fPerpPt=(25,33) |
| 306 | id=1 (empty) id=2 (empty) |
| 307 | debugShowQuadIntersection wtTs[0]=0 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} {{27.3431454,38.6568527}} wtTs[1]=1 {{25,33}} wnTs[0]=0 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} wnTs[1]=1 |
| 308 | debugShowQuadIntersection wtTs[0]=1 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} {{25,33}} wnTs[0]=0 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} |
| 309 | debugShowQuadIntersection wtTs[0]=0 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} {{25,33}} wnTs[0]=1 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} |
| 310 | id=1 1=(0,1) [4,2] id=2 2=(0,0.5) [1] 4=(0.5,1) [1] |
| 311 | id=1 1=(0,0.5) [4,2] 3=(0.5,1) [2,4] id=2 2=(0,0.5) [3,1] 4=(0.5,1) [3,1] |
| 312 | id=1 1=(0,0.5) [6,4,2] 3=(0.5,1) [6,4] id=2 2=(0,0.25) [1] 6=(0.25,0.5) [1,3] 4=(0.5,1) [3,1] |
| 313 | id=1 1=(0,0.25) [6,2] 5=(0.25,0.5) [2,4,6] 3=(0.5,1) [6,4] id=2 2=(0,0.25) [5,1] 6=(0.25,0.5) [5,1,3] 4=(0.5,1) [5,3] |
| 314 | id=1 1=(0,0.25) [6,2] 5=(0.25,0.5) [2,4,6] 3=(0.5,1) [8,6,4] id=2 2=(0,0.25) [5,1] 6=(0.25,0.5) [5,1,3] 4=(0.5,0.75) [5,3] 8=(0.75,1) [3] |
| 315 | id=1 1=(0,0.25) [6,2] 5=(0.25,0.5) [2,4,6] 3=(0.5,0.75) [8,6,4] 7=(0.75,1) [4,8] id=2 2=(0,0.25) [5,1] 6=(0.25,0.5) [5,1,3] 4=(0.5,0.75) [7,5,3] 8=(0.75,1) [7,3] |
| 316 | id=1 1=(0,0.25) [10,6,2] 5=(0.25,0.5) [10,4,6] 3=(0.5,0.75) [8,6,4] 7=(0.75,1) [4,8] id=2 2=(0,0.125) [1] 10=(0.125,0.25) [1,5] 6=(0.25,0.5) [5,1,3] 4=(0.5,0.75) [7,5,3] 8=(0.75,1) [7,3] |
| 317 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.5) [10,4,6] 3=(0.5,0.75) [8,6,4] 7=(0.75,1) [4,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.5) [9,5,3] 4=(0.5,0.75) [7,5,3] 8=(0.75,1) [7,3] |
| 318 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.5) [12,10,4,6] 3=(0.5,0.75) [12,8,4] 7=(0.75,1) [4,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [9,5] 12=(0.375,0.5) [3,5] 4=(0.5,0.75) [7,5,3] 8=(0.75,1) [7,3] |
| 319 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.75) [12,8,4] 7=(0.75,1) [4,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.75) [11,7,3] 8=(0.75,1) [7,3] |
| 320 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.75) [14,12,8,4] 7=(0.75,1) [14,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.625) [11,3] 14=(0.625,0.75) [3,7] 8=(0.75,1) [7,3] |
| 321 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.625) [14,12,4] 13=(0.625,0.75) [4,8,14] 7=(0.75,1) [14,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.625) [13,11,3] 14=(0.625,0.75) [13,3,7] 8=(0.75,1) [13,7] |
| 322 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.625) [14,12,4] 13=(0.625,0.75) [4,8,14] 7=(0.75,1) [16,14,8] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.625) [13,11,3] 14=(0.625,0.75) [13,3,7] 8=(0.75,0.875) [13,7] 16=(0.875,1) [7] |
| 323 | id=1 1=(0,0.125) [10,2] 9=(0.125,0.25) [2,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.625) [14,12,4] 13=(0.625,0.75) [4,8,14] 7=(0.75,0.875) [16,14,8] 15=(0.875,1) [8,16] id=2 2=(0,0.125) [9,1] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.625) [13,11,3] 14=(0.625,0.75) [13,3,7] 8=(0.75,0.875) [15,13,7] 16=(0.875,1) [15,7] |
| 324 | id=1 1=(0,0.125) [18,10,2] 9=(0.125,0.25) [18,6,10] 5=(0.25,0.375) [12,10,6] 11=(0.375,0.5) [6,4,12] 3=(0.5,0.625) [14,12,4] 13=(0.625,0.75) [4,8,14] 7=(0.75,0.875) [16,14,8] 15=(0.875,1) [8,16] id=2 2=(0,0.0625) [1] 18=(0.0625,0.125) [1,9] 10=(0.125,0.25) [9,1,5] 6=(0.25,0.375) [11,9,5] 12=(0.375,0.5) [11,3,5] 4=(0.5,0.625) [13,11,3] 14=(0.625,0.75) [13,3,7] 8=(0.75,0.875) [15,13,7] 16=(0.875,1) [15,7] |
| 325 | setPerp t=0 cPt=(25,33) == oppT=0 fPerpPt=(25,33) |
| 326 | setPerp t=0.0625 cPt=(25.0091529,32.5895776) == oppT=0.0625 fPerpPt=(25.0091529,32.5895776) |
| 327 | setPerp t=0.125 cPt=(25.0366116,32.1867377) == oppT=0.125 fPerpPt=(25.0366116,32.1867377) |
| 328 | setPerp t=0.25 cPt=(25.1464466,31.4038056) == oppT=0.25 fPerpPt=(25.1464466,31.4038056) |
| 329 | setPerp t=0.375 cPt=(25.3295048,30.6512036) == oppT=0.375 fPerpPt=(25.3295048,30.6512036) |
| 330 | setPerp t=0.5 cPt=(25.5857863,29.9289317) == oppT=0.5 fPerpPt=(25.5857863,29.9289317) |
| 331 | setPerp t=0.625 cPt=(25.9152912,29.2369899) == oppT=0.625 fPerpPt=(25.9152912,29.2369899) |
| 332 | setPerp t=0.75 cPt=(26.3180193,28.5753783) == oppT=0.75 fPerpPt=(26.3180193,28.5753783) |
| 333 | setPerp t=0.875 cPt=(26.7939707,27.9440968) == oppT=0.875 fPerpPt=(26.7939707,27.9440968) |
| 334 | setPerp t=1 cPt=(27.3431454,27.3431454) == oppT=1 fPerpPt=(27.3431454,27.3431454) |
| 335 | setPerp t=0 cPt=(25,33) == oppT=0 fPerpPt=(25,33) |
| 336 | setPerp t=1 cPt=(27.3431454,27.3431454) == oppT=1 fPerpPt=(27.3431454,27.3431454) |
| 337 | id=1 (empty) id=2 (empty) |
| 338 | debugShowQuadIntersection wtTs[0]=0 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} {{25,33}} wtTs[1]=1 {{27.3431454,27.3431454}} wnTs[0]=0 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} wnTs[1]=1 |
| 339 | debugShowQuadIntersection wtTs[0]=1 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} {{27.3431454,27.3431454}} wnTs[0]=0 {{{27.3431454,27.3431454}, {29.6862907,25}, {33,25}}} |
| 340 | debugShowQuadIntersection wtTs[0]=0 {{{27.3431454,27.3431454}, {27.3875446,27.2987461}, {27.4323025,27.2551785}}} {{27.3431454,27.3431454}} wnTs[0]=1 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} |
| 341 | id=1 1=(0,1) [2] id=2 2=(0,0.5) [1] |
| 342 | id=1 1=(0,1) [2] id=2 2=(0,0.25) [1] |
| 343 | id=1 1=(0,1) [2] id=2 2=(0,0.125) [1] |
| 344 | id=1 1=(0,1) [2] id=2 2=(0,0.0625) [1] |
| 345 | id=1 1=(0,1) [2] id=2 2=(0,0.03125) [1] |
| 346 | id=1 1=(0,1) [14,2] id=2 2=(0,0.015625) [1] 14=(0.015625,0.03125) [1] |
| 347 | id=1 1=(0,0.5) [2] 3=(0.5,1) [2,14] id=2 2=(0,0.015625) [3,1] 14=(0.015625,0.03125) [3] |
| 348 | id=1 1=(0,0.5) [2] 3=(0.5,1) [2,14] id=2 2=(0,0.015625) [3,1] 14=(0.015625,0.0234375) [3] |
| 349 | id=1 1=(0,0.5) [18,2] 3=(0.5,1) [18,14] id=2 2=(0,0.0078125) [1] 18=(0.0078125,0.015625) [1,3] 14=(0.015625,0.0234375) [3] |
| 350 | id=1 1=(0,0.5) [18,2] 3=(0.5,0.75) [18] 5=(0.75,1) [14,18] id=2 2=(0,0.0078125) [1] 18=(0.0078125,0.015625) [5,1,3] 14=(0.015625,0.0234375) [5] |
| 351 | id=1 1=(0,0.25) [2] 7=(0.25,0.5) [2,18] 3=(0.5,0.75) [18] 5=(0.75,1) [14,18] id=2 2=(0,0.0078125) [7,1] 18=(0.0078125,0.015625) [7,5,3] 14=(0.015625,0.0234375) [5] |
| 352 | id=1 1=(0,0.25) [2] 7=(0.25,0.5) [2,18] 3=(0.5,0.75) [18] 5=(0.75,1) [14,18] id=2 2=(0,0.0078125) [7,1] 18=(0.0078125,0.015625) [7,5,3] 14=(0.015625,0.0195313) [5] |
| 353 | id=1 1=(0,0.25) [2] 7=(0.25,0.5) [2,18] 3=(0.5,0.75) [22,18] 5=(0.75,1) [22,14] id=2 2=(0,0.0078125) [7,1] 18=(0.0078125,0.0117188) [7,3] 22=(0.0117188,0.015625) [3,5] 14=(0.015625,0.0195313) [5] |
| 354 | id=1 1=(0,0.25) [24,2] 7=(0.25,0.5) [24,18] 3=(0.5,0.75) [22,18] 5=(0.75,1) [22,14] id=2 2=(0,0.00390625) [1] 24=(0.00390625,0.0078125) [1,7] 18=(0.0078125,0.0117188) [7,3] 22=(0.0117188,0.015625) [3,5] 14=(0.015625,0.0195313) [5] |
| 355 | id=1 1=(0,0.25) [24,2] 7=(0.25,0.5) [24,18] 3=(0.5,0.75) [22,18] 5=(0.75,0.875) [22,14] 9=(0.875,1) [14] id=2 2=(0,0.00390625) [1] 24=(0.00390625,0.0078125) [1,7] 18=(0.0078125,0.0117188) [7,3] 22=(0.0117188,0.015625) [3,5] 14=(0.015625,0.0195313) [9,5] |
| 356 | id=1 1=(0,0.25) [24,2] 7=(0.25,0.5) [24,18] 3=(0.5,0.625) [22,18] 11=(0.625,0.75) [22] 5=(0.75,0.875) [22,14] 9=(0.875,1) [14] id=2 2=(0,0.00390625) [1] 24=(0.00390625,0.0078125) [1,7] 18=(0.0078125,0.0117188) [7,3] 22=(0.0117188,0.015625) [11,3,5] 14=(0.015625,0.0195313) [9,5] |
| 357 | id=1 1=(0,0.25) [24,2] 7=(0.25,0.375) [24] 13=(0.375,0.5) [18,24] 3=(0.5,0.625) [22,18] 11=(0.625,0.75) [22] 5=(0.75,0.875) [22,14] 9=(0.875,1) [14] id=2 2=(0,0.00390625) [1] 24=(0.00390625,0.0078125) [13,1,7] 18=(0.0078125,0.0117188) [13,3] 22=(0.0117188,0.015625) [11,3,5] 14=(0.015625,0.0195313) [9,5] |
| 358 | id=1 1=(0,0.125) [2] 15=(0.125,0.25) [2,24] 7=(0.25,0.375) [24] 13=(0.375,0.5) [18,24] 3=(0.5,0.625) [22,18] 11=(0.625,0.75) [22] 5=(0.75,0.875) [22,14] 9=(0.875,1) [14] id=2 2=(0,0.00390625) [15,1] 24=(0.00390625,0.0078125) [15,13,7] 18=(0.0078125,0.0117188) [13,3] 22=(0.0117188,0.015625) [11,3,5] 14=(0.015625,0.0195313) [9,5] |
| 359 | setPerp t=0.875 cPt=(27.4211186,27.2660834) == oppT=0.0165816271 fPerpPt=(27.4211186,27.2660833) |
| 360 | setPerp t=1 cPt=(27.4323025,27.2551785) == oppT=0.0189506978 fPerpPt=(27.4323024,27.2551784) |
| 361 | setPerp t=0.017578125 cPt=(27.4258215,27.2614932) == oppT=0.927578956 fPerpPt=(27.4258215,27.2614932) |
| 362 | setPerp t=0.75 cPt=(27.409946,27.2770143) == oppT=0.0142126233 fPerpPt=(27.4099459,27.2770142) |
| 363 | setPerp t=0.875 cPt=(27.4211186,27.2660834) == oppT=0.0165816271 fPerpPt=(27.4211186,27.2660833) |
| 364 | setPerp t=0.015625 cPt=(27.4166056,27.2704941) == oppT=0.824524193 fPerpPt=(27.4166057,27.2704942) |
| 365 | setPerp t=0.875 cPt=(27.4211186,27.2660834) == oppT=0.0165816271 fPerpPt=(27.4211186,27.2660833) |
| 366 | setPerp t=1 cPt=(27.4323025,27.2551785) == oppT=0.0189506978 fPerpPt=(27.4323024,27.2551784) |
| 367 | setPerp t=0.017578125 cPt=(27.4258215,27.2614932) == oppT=0.927578956 fPerpPt=(27.4258215,27.2614932) |
| 368 | id=1 1=(0,0.125) [2] 15=(0.125,0.25) [2,24] 7=(0.25,0.375) [24] 13=(0.375,0.5) [18,24] 3=(0.5,0.625) [22,18] 11=(0.625,0.75) [22] 5=(0.75,0.875) [22] id=2 2=(0,0.00390625) [15,1] 24=(0.00390625,0.0078125) [15,13,7] 18=(0.0078125,0.0117188) [13,3] 22=(0.0117188,0.015625) [11,3,5] |
| 369 | setPerp t=0.625 cPt=(27.3987845,27.2879711) == oppT=0.0118436864 fPerpPt=(27.3987845,27.2879711) |
| 370 | setPerp t=0.75 cPt=(27.409946,27.2770143) == oppT=0.0142126233 fPerpPt=(27.4099459,27.2770142) |
| 371 | setPerp t=0.013671875 cPt=(27.4073972,27.279513) == oppT=0.721467031 fPerpPt=(27.4073972,27.279513) |
| 372 | setPerp t=0.5 cPt=(27.3876343,27.298954) == oppT=0.00947481625 fPerpPt=(27.3876342,27.298954) |
| 373 | setPerp t=0.625 cPt=(27.3987845,27.2879711) == oppT=0.0118436864 fPerpPt=(27.3987845,27.2879711) |
| 374 | setPerp t=0.01171875 cPt=(27.3981961,27.2885497) == oppT=0.618407471 fPerpPt=(27.3981962,27.2885497) |
| 375 | setPerp t=0.75 cPt=(27.409946,27.2770143) == oppT=0.0142126233 fPerpPt=(27.4099459,27.2770142) |
| 376 | setPerp t=0.875 cPt=(27.4211186,27.2660834) == oppT=0.0165816271 fPerpPt=(27.4211186,27.2660833) |
| 377 | setPerp t=0.015625 cPt=(27.4166056,27.2704941) == oppT=0.824524193 fPerpPt=(27.4166057,27.2704942) |
| 378 | setPerp t=0.625 cPt=(27.3987845,27.2879711) == oppT=0.0118436864 fPerpPt=(27.3987845,27.2879711) |
| 379 | setPerp t=0.75 cPt=(27.409946,27.2770143) == oppT=0.0142126233 fPerpPt=(27.4099459,27.2770142) |
| 380 | setPerp t=0.013671875 cPt=(27.4073972,27.279513) == oppT=0.721467031 fPerpPt=(27.4073972,27.279513) |
| 381 | id=1 1=(0,0.125) [2] 15=(0.125,0.25) [2,24] 7=(0.25,0.375) [24] 13=(0.375,0.5) [18,24] 3=(0.5,0.625) [18] id=2 2=(0,0.00390625) [15,1] 24=(0.00390625,0.0078125) [15,13,7] 18=(0.0078125,0.0117188) [13,3] |
| 382 | setPerp t=0.375 cPt=(27.3764952,27.3099629) == oppT=0.00710601267 fPerpPt=(27.3764952,27.3099628) |
| 383 | setPerp t=0.5 cPt=(27.3876343,27.298954) == oppT=0.00947481625 fPerpPt=(27.3876342,27.298954) |
| 384 | setPerp t=0.0078125 cPt=(27.3798163,27.3066767) == oppT=0.412281177 fPerpPt=(27.3798163,27.3066768) |
| 385 | setPerp t=0.5 cPt=(27.3876343,27.298954) == oppT=0.00947481625 fPerpPt=(27.3876342,27.298954) |
| 386 | setPerp t=0.625 cPt=(27.3987845,27.2879711) == oppT=0.0118436864 fPerpPt=(27.3987845,27.2879711) |
| 387 | setPerp t=0.009765625 cPt=(27.3890025,27.2976043) == oppT=0.515345519 fPerpPt=(27.3890025,27.2976043) |
| 388 | setPerp t=0.5 cPt=(27.3876343,27.298954) == oppT=0.00947481625 fPerpPt=(27.3876342,27.298954) |
| 389 | setPerp t=0.625 cPt=(27.3987845,27.2879711) == oppT=0.0118436864 fPerpPt=(27.3987845,27.2879711) |
| 390 | setPerp t=0.009765625 cPt=(27.3890025,27.2976043) == oppT=0.515345519 fPerpPt=(27.3890025,27.2976043) |
| 391 | setPerp t=0.01171875 cPt=(27.3981961,27.2885497) == oppT=0.618407471 fPerpPt=(27.3981962,27.2885497) |
| 392 | id=1 1=(0,0.125) [2] 15=(0.125,0.25) [2,24] 7=(0.25,0.375) [24] 13=(0.375,0.5) [24] id=2 2=(0,0.00390625) [15,1] 24=(0.00390625,0.0078125) [15,13,7] |
| 393 | setPerp t=0.125 cPt=(27.3542508,27.3320585) == oppT=0.00236860468 fPerpPt=(27.3542508,27.3320585) |
| 394 | setPerp t=0.25 cPt=(27.3653674,27.3209977) == oppT=0.00473727552 fPerpPt=(27.3653674,27.3209977) |
| 395 | setPerp t=0.00390625 cPt=(27.361466,27.3248753) == oppT=0.206145343 fPerpPt=(27.361466,27.3248753) |
| 396 | setPerp t=0.25 cPt=(27.3653674,27.3209977) == oppT=0.00473727552 fPerpPt=(27.3653674,27.3209977) |
| 397 | setPerp t=0.375 cPt=(27.3764952,27.3099629) == oppT=0.00710601267 fPerpPt=(27.3764952,27.3099628) |
| 398 | setPerp t=0.005859375 cPt=(27.3706374,27.3157671) == oppT=0.309214451 fPerpPt=(27.3706374,27.3157671) |
| 399 | setPerp t=0.25 cPt=(27.3653674,27.3209977) == oppT=0.00473727552 fPerpPt=(27.3653674,27.3209977) |
| 400 | setPerp t=0.375 cPt=(27.3764952,27.3099629) == oppT=0.00710601267 fPerpPt=(27.3764952,27.3099628) |
| 401 | setPerp t=0.005859375 cPt=(27.3706374,27.3157671) == oppT=0.309214451 fPerpPt=(27.3706374,27.3157671) |
| 402 | setPerp t=0.375 cPt=(27.3764952,27.3099629) == oppT=0.00710601267 fPerpPt=(27.3764952,27.3099628) |
| 403 | setPerp t=0.5 cPt=(27.3876343,27.298954) == oppT=0.00947481625 fPerpPt=(27.3876342,27.298954) |
| 404 | setPerp t=0.0078125 cPt=(27.3798163,27.3066767) == oppT=0.412281177 fPerpPt=(27.3798163,27.3066768) |
| 405 | id=1 1=(0,0.125) [2] 15=(0.125,0.25) [2] id=2 2=(0,0.00390625) [15,1] |
| 406 | setPerp t=0.125 cPt=(27.3542508,27.3320585) == oppT=0.00236860468 fPerpPt=(27.3542508,27.3320585) |
| 407 | setPerp t=0.25 cPt=(27.3653674,27.3209977) == oppT=0.00473727552 fPerpPt=(27.3653674,27.3209977) |
| 408 | setPerp t=0.00390625 cPt=(27.361466,27.3248753) == oppT=0.206145343 fPerpPt=(27.361466,27.3248753) |
| 409 | id=1 1=(0,0.125) [34,2] id=2 2=(0,0.00195313) [1] 34=(0.00195313,0.00390625) [1] |
| 410 | id=1 1=(0,0.0625) [2] 17=(0.0625,0.125) [2,34] id=2 2=(0,0.00195313) [17,1] 34=(0.00195313,0.00390625) [17] |
| 411 | id=1 1=(0,0.0625) [2] 17=(0.0625,0.125) [2,34] id=2 2=(0,0.00195313) [17,1] 34=(0.00195313,0.00292969) [17] |
| 412 | id=1 1=(0,0.0625) [38,2] 17=(0.0625,0.125) [38,34] id=2 2=(0,0.000976563) [1] 38=(0.000976563,0.00195313) [1,17] 34=(0.00195313,0.00292969) [17] |
| 413 | setPerp t=0.001953125 cPt=(27.352302,27.3340014) == oppT=0.103073858 fPerpPt=(27.352302,27.3340014) |
| 414 | setPerp t=0.0029296875 cPt=(27.3568831,27.3294361) == oppT=0.154609898 fPerpPt=(27.3568831,27.3294361) |
| 415 | setPerp t=0.125 cPt=(27.3542508,27.3320585) == oppT=0.00236860468 fPerpPt=(27.3542508,27.3320585) |
| 416 | id=1 1=(0,0.0625) [38,2] 17=(0.0625,0.09375) [38] 19=(0.09375,0.125) [38] id=2 2=(0,0.000976563) [1] 38=(0.000976563,0.00195313) [19,1,17] |
| 417 | id=1 1=(0,0.03125) [2] 21=(0.03125,0.0625) [2,38] 17=(0.0625,0.09375) [38] 19=(0.09375,0.125) [38] id=2 2=(0,0.000976563) [21,1] 38=(0.000976563,0.00195313) [21,19,17] |
| 418 | setPerp t=0.09375 cPt=(27.3514734,27.3348278) == oppT=0.00177644731 fPerpPt=(27.3514734,27.3348278) |
| 419 | setPerp t=0.125 cPt=(27.3542508,27.3320585) == oppT=0.00236860468 fPerpPt=(27.3542508,27.3320585) |
| 420 | setPerp t=0.001953125 cPt=(27.352302,27.3340014) == oppT=0.103073858 fPerpPt=(27.352302,27.3340014) |
| 421 | id=1 1=(0,0.03125) [2] 21=(0.03125,0.0625) [2,38] 17=(0.0625,0.09375) [40,38] id=2 2=(0,0.000976563) [21,1] 38=(0.000976563,0.00146484) [21,17] 40=(0.00146484,0.00195313) [17] |
| 422 | id=1 1=(0,0.03125) [42,2] 21=(0.03125,0.0625) [42,38] 17=(0.0625,0.09375) [40,38] id=2 2=(0,0.000488281) [1] 42=(0.000488281,0.000976563) [1,21] 38=(0.000976563,0.00146484) [21,17] 40=(0.00146484,0.00195313) [17] |
| 423 | setPerp t=0.00146484375 cPt=(27.3500121,27.3362857) == oppT=0.0773056159 fPerpPt=(27.3500121,27.3362857) |
| 424 | setPerp t=0.001953125 cPt=(27.352302,27.3340014) == oppT=0.103073858 fPerpPt=(27.352302,27.3340014) |
| 425 | setPerp t=0.078125 cPt=(27.3500849,27.3362131) == oppT=0.00148037018 fPerpPt=(27.3500849,27.3362131) |
| 426 | setPerp t=0.00146484375 cPt=(27.3500121,27.3362857) == oppT=0.0773056159 fPerpPt=(27.3500121,27.3362857) |
| 427 | setPerp t=0.001953125 cPt=(27.352302,27.3340014) == oppT=0.103073858 fPerpPt=(27.352302,27.3340014) |
| 428 | setPerp t=0.078125 cPt=(27.3500849,27.3362131) == oppT=0.00148037018 fPerpPt=(27.3500849,27.3362131) |
| 429 | setPerp t=0.09375 cPt=(27.3514734,27.3348278) == oppT=0.00177644731 fPerpPt=(27.3514734,27.3348278) |
| 430 | id=1 1=(0,0.03125) [42,2] 21=(0.03125,0.0625) [42,38] 17=(0.0625,0.078125) [38] id=2 2=(0,0.000488281) [1] 42=(0.000488281,0.000976563) [1,21] 38=(0.000976563,0.00146484) [21,17] |
| 431 | id=1 1=(0,0.03125) [42,2] 21=(0.03125,0.046875) [42] 25=(0.046875,0.0625) [38,42] 17=(0.0625,0.078125) [38] id=2 2=(0,0.000488281) [1] 42=(0.000488281,0.000976563) [25,1,21] 38=(0.000976563,0.00146484) [25,17] |
| 432 | id=1 1=(0,0.015625) [2] 27=(0.015625,0.03125) [2,42] 21=(0.03125,0.046875) [42] 25=(0.046875,0.0625) [38,42] 17=(0.0625,0.078125) [38] id=2 2=(0,0.000488281) [27,1] 42=(0.000488281,0.000976563) [27,25,21] 38=(0.000976563,0.00146484) [25,17] |
| 433 | setPerp t=0.0625 cPt=(27.3486967,27.3375987) == oppT=0.00118429408 fPerpPt=(27.3486967,27.3375987) |
| 434 | setPerp t=0.078125 cPt=(27.3500849,27.3362131) == oppT=0.00148037018 fPerpPt=(27.3500849,27.3362131) |
| 435 | setPerp t=0.00122070313 cPt=(27.3488674,27.3374283) == oppT=0.0644214392 fPerpPt=(27.3488674,27.3374283) |
| 436 | setPerp t=0.00146484375 cPt=(27.3500121,27.3362857) == oppT=0.0773056159 fPerpPt=(27.3500121,27.3362857) |
| 437 | id=1 1=(0,0.015625) [2] 27=(0.015625,0.03125) [2,42] 21=(0.03125,0.046875) [42] 25=(0.046875,0.0625) [38,42] 17=(0.0625,0.078125) [38] id=2 2=(0,0.000488281) [27,1] 42=(0.000488281,0.000976563) [27,25,21] 38=(0.000976563,0.0012207) [25,17] |
| 438 | id=1 1=(0,0.015625) [2] 27=(0.015625,0.03125) [2,42] 21=(0.03125,0.046875) [46,42] 25=(0.046875,0.0625) [46,38] 17=(0.0625,0.078125) [38] id=2 2=(0,0.000488281) [27,1] 42=(0.000488281,0.000732422) [27,21] 46=(0.000732422,0.000976563) [21,25] 38=(0.000976563,0.0012207) [25,17] |
| 439 | id=1 1=(0,0.015625) [48,2] 27=(0.015625,0.03125) [48,42] 21=(0.03125,0.046875) [46,42] 25=(0.046875,0.0625) [46,38] 17=(0.0625,0.078125) [38] id=2 2=(0,0.000244141) [1] 48=(0.000244141,0.000488281) [1,27] 42=(0.000488281,0.000732422) [27,21] 46=(0.000732422,0.000976563) [21,25] 38=(0.000976563,0.0012207) [25,17] |
| 440 | id=1 1=(0,0.015625) [48,2] 27=(0.015625,0.03125) [48,42] 21=(0.03125,0.046875) [46,42] 25=(0.046875,0.0625) [46,38] 17=(0.0625,0.0703125) [38] id=2 2=(0,0.000244141) [1] 48=(0.000244141,0.000488281) [1,27] 42=(0.000488281,0.000732422) [27,21] 46=(0.000732422,0.000976563) [21,25] 38=(0.000976563,0.0012207) [25,17] |
| 441 | id=1 1=(0,0.015625) [48,2] 27=(0.015625,0.03125) [48,42] 21=(0.03125,0.046875) [46,42] 25=(0.046875,0.0546875) [46,38] 31=(0.0546875,0.0625) [38] 17=(0.0625,0.0703125) [38] id=2 2=(0,0.000244141) [1] 48=(0.000244141,0.000488281) [1,27] 42=(0.000488281,0.000732422) [27,21] 46=(0.000732422,0.000976563) [21,25] 38=(0.000976563,0.0012207) [31,25,17] |
| 442 | id=1 1=(0,0.015625) [48,2] 27=(0.015625,0.03125) [48,42] 21=(0.03125,0.0390625) [46,42] 33=(0.0390625,0.046875) [46] 25=(0.046875,0.0546875) [46,38] 31=(0.0546875,0.0625) [38] 17=(0.0625,0.0703125) [38] id=2 2=(0,0.000244141) [1] 48=(0.000244141,0.000488281) [1,27] 42=(0.000488281,0.000732422) [27,21] 46=(0.000732422,0.000976563) [33,21,25] 38=(0.000976563,0.0012207) [31,25,17] |
| 443 | id=1 1=(0,0.015625) [48,2] 27=(0.015625,0.0234375) [48] 35=(0.0234375,0.03125) [42,48] 21=(0.03125,0.0390625) [46,42] 33=(0.0390625,0.046875) [46] 25=(0.046875,0.0546875) [46,38] 31=(0.0546875,0.0625) [38] 17=(0.0625,0.0703125) [38] id=2 2=(0,0.000244141) [1] 48=(0.000244141,0.000488281) [35,1,27] 42=(0.000488281,0.000732422) [35,21] 46=(0.000732422,0.000976563) [33,21,25] 38=(0.000976563,0.0012207) [31,25,17] |
| 444 | id=1 1=(0,0.0078125) [2] 37=(0.0078125,0.015625) [2,48] 27=(0.015625,0.0234375) [48] 35=(0.0234375,0.03125) [42,48] 21=(0.03125,0.0390625) [46,42] 33=(0.0390625,0.046875) [46] 25=(0.046875,0.0546875) [46,38] 31=(0.0546875,0.0625) [38] 17=(0.0625,0.0703125) [38] id=2 2=(0,0.000244141) [37,1] 48=(0.000244141,0.000488281) [37,35,27] 42=(0.000488281,0.000732422) [35,21] 46=(0.000732422,0.000976563) [33,21,25] 38=(0.000976563,0.0012207) [31,25,17] |
| 445 | setPerp t=0.0546875 cPt=(27.3480026,27.3382917) == oppT=0.00103625641 fPerpPt=(27.3480026,27.3382917) |
| 446 | setPerp t=0.0625 cPt=(27.3486967,27.3375987) == oppT=0.00118429408 fPerpPt=(27.3486967,27.3375987) |
| 447 | setPerp t=0.00109863281 cPt=(27.3482951,27.3379997) == oppT=0.057979337 fPerpPt=(27.3482951,27.3379997) |
| 448 | setPerp t=0.046875 cPt=(27.3473086,27.3389848) == oppT=0.00088821901 fPerpPt=(27.3473086,27.3389848) |
| 449 | setPerp t=0.0546875 cPt=(27.3480026,27.3382917) == oppT=0.00103625641 fPerpPt=(27.3480026,27.3382917) |
| 450 | setPerp t=0.0009765625 cPt=(27.3477228,27.3385711) == oppT=0.0515372255 fPerpPt=(27.3477228,27.3385711) |
| 451 | setPerp t=0.0625 cPt=(27.3486967,27.3375987) == oppT=0.00118429408 fPerpPt=(27.3486967,27.3375987) |
| 452 | setPerp t=0.0703125 cPt=(27.3493908,27.3369058) == oppT=0.001332332 fPerpPt=(27.3493908,27.3369058) |
| 453 | setPerp t=0.00122070313 cPt=(27.3488674,27.3374283) == oppT=0.0644214392 fPerpPt=(27.3488674,27.3374283) |
| 454 | setPerp t=0.0546875 cPt=(27.3480026,27.3382917) == oppT=0.00103625641 fPerpPt=(27.3480026,27.3382917) |
| 455 | setPerp t=0.0625 cPt=(27.3486967,27.3375987) == oppT=0.00118429408 fPerpPt=(27.3486967,27.3375987) |
| 456 | setPerp t=0.00109863281 cPt=(27.3482951,27.3379997) == oppT=0.057979337 fPerpPt=(27.3482951,27.3379997) |
| 457 | id=1 1=(0,0.0078125) [2] 37=(0.0078125,0.015625) [2,48] 27=(0.015625,0.0234375) [48] 35=(0.0234375,0.03125) [42,48] 21=(0.03125,0.0390625) [46,42] 33=(0.0390625,0.046875) [46] 25=(0.046875,0.0546875) [46] id=2 2=(0,0.000244141) [37,1] 48=(0.000244141,0.000488281) [37,35,27] 42=(0.000488281,0.000732422) [35,21] 46=(0.000732422,0.000976563) [33,21,25] |
| 458 | setPerp t=0.046875 cPt=(27.3473086,27.3389848) == oppT=0.00088821901 fPerpPt=(27.3473086,27.3389848) |
| 459 | setPerp t=0.0546875 cPt=(27.3480026,27.3382917) == oppT=0.00103625641 fPerpPt=(27.3480026,27.3382917) |
| 460 | setPerp t=0.0009765625 cPt=(27.3477228,27.3385711) == oppT=0.0515372255 fPerpPt=(27.3477228,27.3385711) |
| 461 | id=1 1=(0,0.0078125) [2] 37=(0.0078125,0.015625) [2,48] 27=(0.015625,0.0234375) [48] 35=(0.0234375,0.03125) [42,48] 21=(0.03125,0.0390625) [46,42] 33=(0.0390625,0.046875) [52,46] id=2 2=(0,0.000244141) [37,1] 48=(0.000244141,0.000488281) [37,35,27] 42=(0.000488281,0.000732422) [35,21] 46=(0.000732422,0.000854492) [33,21] 52=(0.000854492,0.000976563) [33] |
| 462 | id=1 1=(0,0.0078125) [2] 37=(0.0078125,0.015625) [2,48] 27=(0.015625,0.0234375) [48] 35=(0.0234375,0.03125) [42,48] 21=(0.03125,0.0390625) [54,46,42] 33=(0.0390625,0.046875) [52,46] id=2 2=(0,0.000244141) [37,1] 48=(0.000244141,0.000488281) [37,35,27] 42=(0.000488281,0.000610352) [35,21] 54=(0.000610352,0.000732422) [21] 46=(0.000732422,0.000854492) [33,21] 52=(0.000854492,0.000976563) [33] |
| 463 | id=1 1=(0,0.0078125) [2] 37=(0.0078125,0.015625) [2,48] 27=(0.015625,0.0234375) [56,48] 35=(0.0234375,0.03125) [56,42] 21=(0.03125,0.0390625) [54,46,42] 33=(0.0390625,0.046875) [52,46] id=2 2=(0,0.000244141) [37,1] 48=(0.000244141,0.000366211) [37,27] 56=(0.000366211,0.000488281) [27,35] 42=(0.000488281,0.000610352) [35,21] 54=(0.000610352,0.000732422) [21] 46=(0.000732422,0.000854492) [33,21] 52=(0.000854492,0.000976563) [33] |
| 464 | id=1 1=(0,0.0078125) [58,2] 37=(0.0078125,0.015625) [58,48] 27=(0.015625,0.0234375) [56,48] 35=(0.0234375,0.03125) [56,42] 21=(0.03125,0.0390625) [54,46,42] 33=(0.0390625,0.046875) [52,46] id=2 2=(0,0.00012207) [1] 58=(0.00012207,0.000244141) [1,37] 48=(0.000244141,0.000366211) [37,27] 56=(0.000366211,0.000488281) [27,35] 42=(0.000488281,0.000610352) [35,21] 54=(0.000610352,0.000732422) [21] 46=(0.000732422,0.000854492) [33,21] 52=(0.000854492,0.000976563) [33] |
| 465 | setPerp t=0.000854492188 cPt=(27.3471505,27.3391427) == oppT=0.0450951047 fPerpPt=(27.3471505,27.3391427) |
| 466 | setPerp t=0.0009765625 cPt=(27.3477228,27.3385711) == oppT=0.0515372255 fPerpPt=(27.3477228,27.3385711) |
| 467 | setPerp t=0.046875 cPt=(27.3473086,27.3389848) == oppT=0.00088821901 fPerpPt=(27.3473086,27.3389848) |
| 468 | id=1 1=(0,0.0078125) [58,2] 37=(0.0078125,0.015625) [58,48] 27=(0.015625,0.0234375) [56,48] 35=(0.0234375,0.03125) [56,42] 21=(0.03125,0.0390625) [54,46,42] 33=(0.0390625,0.0429688) [46] 39=(0.0429688,0.046875) [46] id=2 2=(0,0.00012207) [1] 58=(0.00012207,0.000244141) [1,37] 48=(0.000244141,0.000366211) [37,27] 56=(0.000366211,0.000488281) [27,35] 42=(0.000488281,0.000610352) [35,21] 54=(0.000610352,0.000732422) [21] 46=(0.000732422,0.000854492) [39,33,21] |
| 469 | id=1 1=(0,0.0078125) [58,2] 37=(0.0078125,0.015625) [58,48] 27=(0.015625,0.0234375) [56,48] 35=(0.0234375,0.03125) [56,42] 21=(0.03125,0.0351563) [54,42] 41=(0.0351563,0.0390625) [46,54] 33=(0.0390625,0.0429688) [46] 39=(0.0429688,0.046875) [46] id=2 2=(0,0.00012207) [1] 58=(0.00012207,0.000244141) [1,37] 48=(0.000244141,0.000366211) [37,27] 56=(0.000366211,0.000488281) [27,35] 42=(0.000488281,0.000610352) [35,21] 54=(0.000610352,0.000732422) [41,21] 46=(0.000732422,0.000854492) [41,39,33] |
| 470 | id=1 1=(0,0.0078125) [58,2] 37=(0.0078125,0.015625) [58,48] 27=(0.015625,0.0234375) [56,48] 35=(0.0234375,0.0273438) [56,42] 43=(0.0273438,0.03125) [42] 21=(0.03125,0.0351563) [54,42] 41=(0.0351563,0.0390625) [46,54] 33=(0.0390625,0.0429688) [46] 39=(0.0429688,0.046875) [46] id=2 2=(0,0.00012207) [1] 58=(0.00012207,0.000244141) [1,37] 48=(0.000244141,0.000366211) [37,27] 56=(0.000366211,0.000488281) [27,35] 42=(0.000488281,0.000610352) [43,35,21] 54=(0.000610352,0.000732422) [41,21] 46=(0.000732422,0.000854492) [41,39,33] |
| 471 | id=1 1=(0,0.0078125) [58,2] 37=(0.0078125,0.015625) [58,48] 27=(0.015625,0.0195313) [56,48] 45=(0.0195313,0.0234375) [56] 35=(0.0234375,0.0273438) [56,42] 43=(0.0273438,0.03125) [42] 21=(0.03125,0.0351563) [54,42] 41=(0.0351563,0.0390625) [46,54] 33=(0.0390625,0.0429688) [46] 39=(0.0429688,0.046875) [46] id=2 2=(0,0.00012207) [1] 58=(0.00012207,0.000244141) [1,37] 48=(0.000244141,0.000366211) [37,27] 56=(0.000366211,0.000488281) [45,27,35] 42=(0.000488281,0.000610352) [43,35,21] 54=(0.000610352,0.000732422) [41,21] 46=(0.000732422,0.000854492) [41,39,33] |
| 472 | id=1 1=(0,0.0078125) [58,2] 37=(0.0078125,0.0117188) [58] 47=(0.0117188,0.015625) [48,58] 27=(0.015625,0.0195313) [56,48] 45=(0.0195313,0.0234375) [56] 35=(0.0234375,0.0273438) [56,42] 43=(0.0273438,0.03125) [42] 21=(0.03125,0.0351563) [54,42] 41=(0.0351563,0.0390625) [46,54] 33=(0.0390625,0.0429688) [46] 39=(0.0429688,0.046875) [46] id=2 2=(0,0.00012207) [1] 58=(0.00012207,0.000244141) [47,1,37] 48=(0.000244141,0.000366211) [47,27] 56=(0.000366211,0.000488281) [45,27,35] 42=(0.000488281,0.000610352) [43,35,21] 54=(0.000610352,0.000732422) [41,21] 46=(0.000732422,0.000854492) [41,39,33] |
| 473 | id=1 1=(0,0.00390625) [2] 49=(0.00390625,0.0078125) [2,58] 37=(0.0078125,0.0117188) [58] 47=(0.0117188,0.015625) [48,58] 27=(0.015625,0.0195313) [56,48] 45=(0.0195313,0.0234375) [56] 35=(0.0234375,0.0273438) [56,42] 43=(0.0273438,0.03125) [42] 21=(0.03125,0.0351563) [54,42] 41=(0.0351563,0.0390625) [46,54] 33=(0.0390625,0.0429688) [46] 39=(0.0429688,0.046875) [46] id=2 2=(0,0.00012207) [49,1] 58=(0.00012207,0.000244141) [49,47,37] 48=(0.000244141,0.000366211) [47,27] 56=(0.000366211,0.000488281) [45,27,35] 42=(0.000488281,0.000610352) [43,35,21] 54=(0.000610352,0.000732422) [41,21] 46=(0.000732422,0.000854492) [41,39,33] |
| 474 | setPerp t=0.03515625 cPt=(27.3462676,27.3400246) == oppT=0.000666163387 fPerpPt=(27.3462676,27.3400246) |
| 475 | setPerp t=0.0390625 cPt=(27.3466146,27.3396779) == oppT=0.000740181863 fPerpPt=(27.3466146,27.3396779) |
| 476 | setPerp t=0.000732421875 cPt=(27.3465782,27.3397143) == oppT=0.0386529746 fPerpPt=(27.3465782,27.3397143) |
| 477 | setPerp t=0.0390625 cPt=(27.3466146,27.3396779) == oppT=0.000740181863 fPerpPt=(27.3466146,27.3396779) |
| 478 | setPerp t=0.04296875 cPt=(27.3469616,27.3393313) == oppT=0.000814200404 fPerpPt=(27.3469616,27.3393313) |
| 479 | setPerp t=0.000793457031 cPt=(27.3468644,27.3394285) == oppT=0.0418740408 fPerpPt=(27.3468644,27.3394285) |
| 480 | setPerp t=0.0390625 cPt=(27.3466146,27.3396779) == oppT=0.000740181863 fPerpPt=(27.3466146,27.3396779) |
| 481 | setPerp t=0.04296875 cPt=(27.3469616,27.3393313) == oppT=0.000814200404 fPerpPt=(27.3469616,27.3393313) |
| 482 | setPerp t=0.000793457031 cPt=(27.3468644,27.3394285) == oppT=0.0418740408 fPerpPt=(27.3468644,27.3394285) |
| 483 | setPerp t=0.04296875 cPt=(27.3469616,27.3393313) == oppT=0.000814200404 fPerpPt=(27.3469616,27.3393313) |
| 484 | setPerp t=0.046875 cPt=(27.3473086,27.3389848) == oppT=0.00088821901 fPerpPt=(27.3473086,27.3389848) |
| 485 | setPerp t=0.000854492188 cPt=(27.3471505,27.3391427) == oppT=0.0450951047 fPerpPt=(27.3471505,27.3391427) |
| 486 | id=1 1=(0,0.00390625) [2] 49=(0.00390625,0.0078125) [2,58] 37=(0.0078125,0.0117188) [58] 47=(0.0117188,0.015625) [48,58] 27=(0.015625,0.0195313) [56,48] 45=(0.0195313,0.0234375) [56] 35=(0.0234375,0.0273438) [56,42] 43=(0.0273438,0.03125) [42] 21=(0.03125,0.0351563) [54,42] 41=(0.0351563,0.0390625) [54] id=2 2=(0,0.00012207) [49,1] 58=(0.00012207,0.000244141) [49,47,37] 48=(0.000244141,0.000366211) [47,27] 56=(0.000366211,0.000488281) [45,27,35] 42=(0.000488281,0.000610352) [43,35,21] 54=(0.000610352,0.000732422) [41,21] |
| 487 | setPerp t=0.03515625 cPt=(27.3462676,27.3400246) == oppT=0.000666163387 fPerpPt=(27.3462676,27.3400246) |
| 488 | setPerp t=0.0390625 cPt=(27.3466146,27.3396779) == oppT=0.000740181863 fPerpPt=(27.3466146,27.3396779) |
| 489 | setPerp t=0.000671386719 cPt=(27.3462921,27.3400001) == oppT=0.0354319062 fPerpPt=(27.3462921,27.3400001) |
| 490 | setPerp t=0.03515625 cPt=(27.3462676,27.3400246) == oppT=0.000666163387 fPerpPt=(27.3462676,27.3400246) |
| 491 | setPerp t=0.0390625 cPt=(27.3466146,27.3396779) == oppT=0.000740181863 fPerpPt=(27.3466146,27.3396779) |
| 492 | setPerp t=0.000671386719 cPt=(27.3462921,27.3400001) == oppT=0.0354319062 fPerpPt=(27.3462921,27.3400001) |
| 493 | setPerp t=0.000732421875 cPt=(27.3465782,27.3397143) == oppT=0.0386529746 fPerpPt=(27.3465782,27.3397143) |
| 494 | id=1 1=(0,0.00390625) [2] 49=(0.00390625,0.0078125) [2,58] 37=(0.0078125,0.0117188) [58] 47=(0.0117188,0.015625) [48,58] 27=(0.015625,0.0195313) [56,48] 45=(0.0195313,0.0234375) [56] 35=(0.0234375,0.0273438) [56,42] 43=(0.0273438,0.03125) [42] 21=(0.03125,0.0351563) [54,42] id=2 2=(0,0.00012207) [49,1] 58=(0.00012207,0.000244141) [49,47,37] 48=(0.000244141,0.000366211) [47,27] 56=(0.000366211,0.000488281) [45,27,35] 42=(0.000488281,0.000610352) [43,35,21] 54=(0.000610352,0.000671387) [21] |
| 495 | id=1 1=(0,0.00390625) [2] 49=(0.00390625,0.0078125) [2,58] 37=(0.0078125,0.0117188) [58] 47=(0.0117188,0.015625) [48,58] 27=(0.015625,0.0195313) [56,48] 45=(0.0195313,0.0234375) [56] 35=(0.0234375,0.0273438) [56,42] 43=(0.0273438,0.03125) [64,42] 21=(0.03125,0.0351563) [64,54] id=2 2=(0,0.00012207) [49,1] 58=(0.00012207,0.000244141) [49,47,37] 48=(0.000244141,0.000366211) [47,27] 56=(0.000366211,0.000488281) [45,27,35] 42=(0.000488281,0.000549316) [43,35] 64=(0.000549316,0.000610352) [21,43] 54=(0.000610352,0.000671387) [21] |
| 496 | id=1 1=(0,0.00390625) [2] 49=(0.00390625,0.0078125) [2,58] 37=(0.0078125,0.0117188) [58] 47=(0.0117188,0.015625) [48,58] 27=(0.015625,0.0195313) [56,48] 45=(0.0195313,0.0234375) [66,56] 35=(0.0234375,0.0273438) [66,42] 43=(0.0273438,0.03125) [64,42] 21=(0.03125,0.0351563) [64,54] id=2 2=(0,0.00012207) [49,1] 58=(0.00012207,0.000244141) [49,47,37] 48=(0.000244141,0.000366211) [47,27] 56=(0.000366211,0.000427246) [45,27] 66=(0.000427246,0.000488281) [35,45] 42=(0.000488281,0.000549316) [43,35] 64=(0.000549316,0.000610352) [21,43] 54=(0.000610352,0.000671387) [21] |
| 497 | setPerp t=0 cPt=(27.3431454,27.3431454) == oppT=0 fPerpPt=(27.3431454,27.3431454) |
| 498 | setPerp t=0.00390625 cPt=(27.3434922,27.3427985) == oppT=7.40178961e-05 fPerpPt=(27.3434922,27.3427985) |
| 499 | setPerp t=0.0078125 cPt=(27.3438391,27.3424517) == oppT=0.000148035857 fPerpPt=(27.3438391,27.3424517) |
| 500 | setPerp t=0.01171875 cPt=(27.344186,27.3421049) == oppT=0.000222053882 fPerpPt=(27.344186,27.3421049) |
| 501 | setPerp t=0.015625 cPt=(27.3445329,27.3417581) == oppT=0.000296071971 fPerpPt=(27.3445329,27.3417581) |
| 502 | setPerp t=0.01953125 cPt=(27.3448799,27.3414113) == oppT=0.000370090126 fPerpPt=(27.3448799,27.3414113) |
| 503 | setPerp t=0.0234375 cPt=(27.3452268,27.3410646) == oppT=0.000444108344 fPerpPt=(27.3452268,27.3410646) |
| 504 | setPerp t=0.02734375 cPt=(27.3455737,27.3407179) == oppT=0.000518126627 fPerpPt=(27.3455737,27.3407179) |
| 505 | setPerp t=0.03125 cPt=(27.3459207,27.3403712) == oppT=0.000592144975 fPerpPt=(27.3459207,27.3403712) |
| 506 | setPerp t=0.03515625 cPt=(27.3462676,27.3400246) == oppT=0.000666163387 fPerpPt=(27.3462676,27.3400246) |
| 507 | setPerp t=0 cPt=(27.3431454,27.3431454) == oppT=0 fPerpPt=(27.3431454,27.3431454) |
| 508 | setPerp t=0.03515625 cPt=(27.3462676,27.3400246) == oppT=0.000666163387 fPerpPt=(27.3462676,27.3400246) |
| 509 | id=1 (empty) id=2 (empty) |
| 510 | debugShowQuadIntersection wtTs[0]=0 {{{27.3431454,27.3431454}, {27.3875446,27.2987461}, {27.4323025,27.2551785}}} {{27.3431454,27.3431454}} wtTs[1]=0.03515625 {{27.3462677,27.3400249}} wnTs[0]=0 {{{27.3431454,27.3431454}, {29.6862907,25}, {33,25}}} wnTs[1]=0.000666163387 |
| 511 | SkOpSegment::addT insert t=0.03515625 segID=20 spanID=49 |
| 512 | SkOpSegment::addT insert t=0.000666163387 segID=6 spanID=50 |
| 513 | id=1 1=(0,1) [2] id=2 2=(0,0.5) [1] |
| 514 | id=1 1=(0,1) [2] id=2 2=(0,0.25) [1] |
| 515 | id=1 1=(0,1) [2] id=2 2=(0,0.125) [1] |
| 516 | id=1 1=(0,1) [2] id=2 2=(0,0.0625) [1] |
| 517 | id=1 1=(0,1) [12,2] id=2 2=(0,0.03125) [1] 12=(0.03125,0.0625) [1] |
| 518 | id=1 1=(0,1) [12,2] id=2 2=(0,0.03125) [1] 12=(0.03125,0.046875) [1] |
| 519 | id=1 1=(0,1) [16,12] id=2 16=(0.015625,0.03125) [1] 12=(0.03125,0.046875) [1] |
| 520 | id=1 1=(0,0.5) [16] 3=(0.5,1) [16] id=2 16=(0.015625,0.03125) [3,1] |
| 521 | id=1 1=(0,0.5) [18,16] id=2 16=(0.015625,0.0234375) [1] 18=(0.0234375,0.03125) [1] |
| 522 | id=1 1=(0,0.25) [16] id=2 16=(0.015625,0.0234375) [1] |
| 523 | id=1 1=(0,0.25) [20,16] id=2 16=(0.015625,0.0195313) [1] 20=(0.0195313,0.0234375) [1] |
| 524 | id=1 1=(0,0.125) [20,16] id=2 16=(0.015625,0.0195313) [1] 20=(0.0195313,0.0234375) [1] |
| 525 | setPerp t=0 cPt=(27.4323025,27.2551785) == oppT=0.0189506973 fPerpPt=(27.4323024,27.2551784) |
| 526 | setPerp t=0.125 cPt=(27.4431369,27.243922) != oppT=0.0213231007 fPerpPt=(27.4435129,27.2442845) |
| 527 | setPerp t=0.01953125 cPt=(27.4350447,27.2525101) != oppT=0.0306377854 fPerpPt=(27.4349556,27.2524185) |
| 528 | id=1 1=(0,0.125) [16] id=2 16=(0.015625,0.0195313) [1] |
| 529 | id=1 (empty) id=2 (empty) |
| 530 | debugShowQuadIntersection no intersect {{{27.4323025,27.2551785}, {27.4755878,27.2101307}, {27.5197105,27.165432}}} {{{27.3431454,27.3431454}, {29.6862907,25}, {33,25}}} |
| 531 | debugShowQuadIntersection no intersect {{{27.5197105,27.165432}, {27.541851,27.1430035}, {27.5638676,27.1209965}}} {{{27.3431454,27.3431454}, {29.6862907,25}, {33,25}}} |
| 532 | id=1 (empty) id=2 (empty) |
| 533 | debugShowQuadIntersection no intersect {{{27.5638676,27.1209965}, {27.5855064,27.0986347}, {27.6075668,27.0761414}}} {{{27.3431454,27.3431454}, {29.6862907,25}, {33,25}}} |
| 534 | id=1 1=(0,1) [4,2] id=2 2=(0,0.5) [1] 4=(0.5,1) [1] |
| 535 | id=1 1=(0,0.5) [2] 3=(0.5,1) [4] id=2 2=(0,0.5) [1] 4=(0.5,1) [3] |
| 536 | id=1 1=(0,0.5) [2] id=2 2=(0,0.5) [1] |
| 537 | id=1 1=(0,0.5) [8,2] id=2 2=(0,0.25) [1] 8=(0.25,0.5) [1] |
| 538 | id=1 1=(0,0.25) [2] id=2 2=(0,0.25) [1] |
| 539 | id=1 1=(0,0.25) [10,2] id=2 2=(0,0.125) [1] 10=(0.125,0.25) [1] |
| 540 | id=1 (empty) id=2 (empty) |
| 541 | debugShowQuadIntersection no intersect {{{27.6075668,27.0761414}, {29.9278316,24.7103367}, {33.2413864,24.6781349}}} {{{27.3431454,27.3431454}, {29.6862907,25}, {33,25}}} |
| 542 | debugShowQuadIntersection no intersect {{{27.6075668,27.0761414}, {29.9278316,24.7103367}, {33.2413864,24.6781349}}} {{{33,25}, {36.3137093,25}, {38.6568527,27.3431454}}} |
| 543 | debugShowQuadIntersection wtTs[0]=1 {{{41,33}, {41,36.3137093}, {38.6568527,38.6568527}}} {{38.6568527,38.6568527}} wnTs[0]=0 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} |
| 544 | debugShowQuadIntersection wtTs[0]=0 {{{41,33}, {41,36.3137093}, {38.6568527,38.6568527}}} {{41,33}} wnTs[0]=1 {{{38.6568527,27.3431454}, {41,29.6862907}, {41,33}}} |
| 545 | debugShowQuadIntersection wtTs[0]=1 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} {{33,41}} wnTs[0]=0 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} |
| 546 | debugShowQuadIntersection wtTs[0]=1 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} {{27.3431454,38.6568527}} wnTs[0]=0 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} |
| 547 | debugShowQuadIntersection wtTs[0]=1 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} {{25,33}} wnTs[0]=0 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} |
| 548 | debugShowQuadIntersection wtTs[0]=1 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} {{27.3431454,27.3431454}} wnTs[0]=0 {{{27.3431454,27.3431454}, {29.6862907,25}, {33,25}}} |
| 549 | debugShowQuadIntersection wtTs[0]=1 {{{27.3431454,27.3431454}, {29.6862907,25}, {33,25}}} {{33,25}} wnTs[0]=0 {{{33,25}, {36.3137093,25}, {38.6568527,27.3431454}}} |
| 550 | debugShowQuadIntersection wtTs[0]=1 {{{33,25}, {36.3137093,25}, {38.6568527,27.3431454}}} {{38.6568527,27.3431454}} wnTs[0]=0 {{{38.6568527,27.3431454}, {41,29.6862907}, {41,33}}} |
| 551 | SkOpSegment::markDone id=6 (27.3431454,27.3431454 29.6862907,25 33,25) t=0 [11] (27.3431454,27.3431454) tEnd=0.000666163387 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0 |
| 552 | SkOpSegment::markDone id=5 (25,33 25,29.6862907 27.3431454,27.3431454) t=0 [9] (25,33) tEnd=1 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0 |
| 553 | SkOpSegment::markDone id=4 (27.3431454,38.6568527 25,36.3137093 25,33) t=0 [7] (27.3431454,38.6568527) tEnd=1 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0 |
| 554 | SkOpSegment::markDone id=3 (33,41 29.6862907,41 27.3431454,38.6568527) t=0 [5] (33,41) tEnd=1 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0 |
| 555 | SkOpSegment::markDone id=2 (38.6568527,38.6568527 36.3137093,41 33,41) t=0 [3] (38.6568527,38.6568527) tEnd=1 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0 |
| 556 | SkOpSegment::sortAngles [15] tStart=1 [30] |
| 557 | SkOpAngle::after [15/1] 4/5 tStart=1 tEnd=0 < [16/2] 21/17 tStart=0 tEnd=1 < [1/13] 1/5 tStart=1 tEnd=0 T 5 |
| 558 | SkOpAngle::afterPart {{{38.6568527,38.6568527}, {38.7196693,38.5940361}, {38.7809143,38.5304031}}} id=15 |
| 559 | SkOpAngle::afterPart {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} id=16 |
| 560 | SkOpAngle::afterPart {{{38.6568527,38.6568527}, {41,36.3137093}, {41,33}}} id=1 |
| 561 | SkOpSegment::sortAngles [16] tStart=0 [31] |
| 562 | SkOpSegment::sortAngles [16] tStart=1 [32] |
| 563 | SkOpSegment::sortAngles [17] tStart=0 [33] |
| 564 | SkOpSegment::sortAngles [17] tStart=1 [34] |
| 565 | SkOpSegment::sortAngles [18] tStart=0 [35] |
| 566 | SkOpSegment::sortAngles [18] tStart=1 [36] |
| 567 | SkOpSegment::sortAngles [19] tStart=0 [37] |
| 568 | SkOpSegment::sortAngles [19] tStart=1 [38] |
| 569 | SkOpSegment::sortAngles [20] tStart=0 [39] |
| 570 | SkOpSegment::sortAngles [20] tStart=0.03515625 [49] |
| 571 | SkOpAngle::after [20/11] 17/17 tStart=0.03515625 tEnd=0 < [6/14] 1/1 tStart=0.000666163387 tEnd=1 < [20/12] 1/1 tStart=0.03515625 tEnd=1 F 11 |
| 572 | SkOpAngle::afterPart {{{27.3462677,27.3400249}, {27.3447063,27.3415846}, {27.3431454,27.3431454}}} id=20 |
| 573 | SkOpAngle::afterPart {{{27.3462677,27.3400249}, {29.6884986,25}, {33,25}}} id=6 |
| 574 | SkOpAngle::afterPart {{{27.3462677,27.3400249}, {27.3891352,27.2971979}, {27.4323025,27.2551785}}} id=20 |
| 575 | SkOpSegment::sortAngles [1] tStart=1 [2] |
| 576 | SkOpSegment::sortAngles [6] tStart=0.000666163387 [50] |
| 577 | SkOpCoincidence::debugShowCoincidence - id=20 t=0 tEnd=0.03515625 |
| 578 | SkOpCoincidence::debugShowCoincidence + id=6 t=0 tEnd=0.000666163387 |
| 579 | SkOpCoincidence::debugShowCoincidence - id=19 t=0 tEnd=1 |
| 580 | SkOpCoincidence::debugShowCoincidence + id=5 t=0 tEnd=1 |
| 581 | SkOpCoincidence::debugShowCoincidence - id=18 t=0 tEnd=1 |
| 582 | SkOpCoincidence::debugShowCoincidence + id=4 t=0 tEnd=1 |
| 583 | SkOpCoincidence::debugShowCoincidence - id=17 t=0 tEnd=1 |
| 584 | SkOpCoincidence::debugShowCoincidence + id=3 t=0 tEnd=1 |
| 585 | SkOpCoincidence::debugShowCoincidence - id=16 t=0 tEnd=1 |
| 586 | SkOpCoincidence::debugShowCoincidence + id=2 t=0 tEnd=1 |
| 587 | SkOpSegment::debugShowActiveSpans id=9 (33.2413864,24.6781349 36.5549393,24.6459332 38.920742,26.966198) t=0 (33.2413864,24.6781349) tEnd=1 windSum=? windValue=1 |
| 588 | SkOpSegment::debugShowActiveSpans id=10 (38.920742,26.966198 41.2865486,29.2864628 41.3187523,32.6000175) t=0 (38.920742,26.966198) tEnd=1 windSum=? windValue=1 |
| 589 | SkOpSegment::debugShowActiveSpans id=11 (41.3187523,32.6000175 41.3509521,35.9135704 39.0306854,38.2793732) t=0 (41.3187523,32.6000175) tEnd=1 windSum=? windValue=1 |
| 590 | SkOpSegment::debugShowActiveSpans id=12 (39.0306854,38.2793732 38.9995995,38.3110695 38.9681816,38.3424988) t=0 (39.0306854,38.2793732) tEnd=1 windSum=? windValue=1 |
| 591 | SkOpSegment::debugShowActiveSpans id=13 (38.9681816,38.3424988 38.9374619,38.3742142 38.9064751,38.4056053) t=0 (38.9681816,38.3424988) tEnd=1 windSum=? windValue=1 |
| 592 | SkOpSegment::debugShowActiveSpans id=14 (38.9064751,38.4056053 38.8441086,38.4687881 38.7809143,38.5304031) t=0 (38.9064751,38.4056053) tEnd=1 windSum=? windValue=1 |
| 593 | SkOpSegment::debugShowActiveSpans id=15 (38.7809143,38.5304031 38.7196693,38.5940361 38.6568527,38.6568527) t=0 (38.7809143,38.5304031) tEnd=1 windSum=? windValue=1 |
| 594 | SkOpSegment::debugShowActiveSpans id=16 (38.6568527,38.6568527 36.3137093,41 33,41) t=0 (38.6568527,38.6568527) tEnd=1 windSum=? windValue=2 |
| 595 | SkOpSegment::debugShowActiveSpans id=17 (33,41 29.6862907,41 27.3431454,38.6568527) t=0 (33,41) tEnd=1 windSum=? windValue=2 |
| 596 | SkOpSegment::debugShowActiveSpans id=18 (27.3431454,38.6568527 25,36.3137093 25,33) t=0 (27.3431454,38.6568527) tEnd=1 windSum=? windValue=2 |
| 597 | SkOpSegment::debugShowActiveSpans id=19 (25,33 25,29.6862907 27.3431454,27.3431454) t=0 (25,33) tEnd=1 windSum=? windValue=2 |
| 598 | SkOpSegment::debugShowActiveSpans id=20 (27.3431454,27.3431454 27.3875446,27.2987461 27.4323025,27.2551785) t=0 (27.3431454,27.3431454) tEnd=0.03515625 windSum=? windValue=2 |
| 599 | SkOpSegment::debugShowActiveSpans id=20 (27.3431454,27.3431454 27.3875446,27.2987461 27.4323025,27.2551785) t=0.03515625 (27.3462677,27.3400249) tEnd=1 windSum=? windValue=1 |
| 600 | SkOpSegment::debugShowActiveSpans id=21 (27.4323025,27.2551785 27.4755878,27.2101307 27.5197105,27.165432) t=0 (27.4323025,27.2551785) tEnd=1 windSum=? windValue=1 |
| 601 | SkOpSegment::debugShowActiveSpans id=22 (27.5197105,27.165432 27.541851,27.1430035 27.5638676,27.1209965) t=0 (27.5197105,27.165432) tEnd=1 windSum=? windValue=1 |
| 602 | SkOpSegment::debugShowActiveSpans id=23 (27.5638676,27.1209965 27.5855064,27.0986347 27.6075668,27.0761414) t=0 (27.5638676,27.1209965) tEnd=1 windSum=? windValue=1 |
| 603 | SkOpSegment::debugShowActiveSpans id=24 (27.6075668,27.0761414 29.9278316,24.7103367 33.2413864,24.6781349) t=0 (27.6075668,27.0761414) tEnd=1 windSum=? windValue=1 |
| 604 | SkOpSegment::debugShowActiveSpans id=1 (41,33 41,36.3137093 38.6568527,38.6568527) t=0 (41,33) tEnd=1 windSum=? windValue=1 |
| 605 | SkOpSegment::debugShowActiveSpans id=6 (27.3431454,27.3431454 29.6862907,25 33,25) t=0.000666163387 (27.3462677,27.3400249) tEnd=1 windSum=? windValue=1 |
| 606 | SkOpSegment::debugShowActiveSpans id=7 (33,25 36.3137093,25 38.6568527,27.3431454) t=0 (33,25) tEnd=1 windSum=? windValue=1 |
| 607 | SkOpSegment::debugShowActiveSpans id=8 (38.6568527,27.3431454 41,29.6862907 41,33) t=0 (38.6568527,27.3431454) tEnd=1 windSum=? windValue=1 |
| 608 | SkOpSpan::sortableTop dir=kTop seg=9 t=0.5 pt=(36.3180008,25.2340508) |
| 609 | SkOpSpan::sortableTop [0] valid=1 operand=0 span=17 ccw=1 seg=9 {{{33.2413864f, 24.6781349f}, {36.5549393f, 24.6459332f}, {38.920742f, 26.966198f}}} t=0.5 pt=(36.3180008,25.2340508) slope=(2.83967781,1.14403152) |
| 610 | SkOpSegment::markWinding id=9 (33.2413864,24.6781349 36.5549393,24.6459332 38.920742,26.966198) t=0 [17] (33.2413864,24.6781349) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 611 | SkOpSegment::markWinding id=10 (38.920742,26.966198 41.2865486,29.2864628 41.3187523,32.6000175) t=0 [19] (38.920742,26.966198) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 612 | SkOpSegment::markWinding id=11 (41.3187523,32.6000175 41.3509521,35.9135704 39.0306854,38.2793732) t=0 [21] (41.3187523,32.6000175) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 613 | SkOpSegment::markWinding id=12 (39.0306854,38.2793732 38.9995995,38.3110695 38.9681816,38.3424988) t=0 [23] (39.0306854,38.2793732) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 614 | SkOpSegment::markWinding id=13 (38.9681816,38.3424988 38.9374619,38.3742142 38.9064751,38.4056053) t=0 [25] (38.9681816,38.3424988) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 615 | SkOpSegment::markWinding id=14 (38.9064751,38.4056053 38.8441086,38.4687881 38.7809143,38.5304031) t=0 [27] (38.9064751,38.4056053) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 616 | SkOpSegment::markWinding id=15 (38.7809143,38.5304031 38.7196693,38.5940361 38.6568527,38.6568527) t=0 [29] (38.7809143,38.5304031) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 617 | SkOpSegment::markWinding id=9 (33.2413864,24.6781349 36.5549393,24.6459332 38.920742,26.966198) t=0 [17] (33.2413864,24.6781349) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 618 | SkOpSegment::markWinding id=24 (27.6075668,27.0761414 29.9278316,24.7103367 33.2413864,24.6781349) t=0 [47] (27.6075668,27.0761414) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 619 | SkOpSegment::markWinding id=23 (27.5638676,27.1209965 27.5855064,27.0986347 27.6075668,27.0761414) t=0 [45] (27.5638676,27.1209965) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 620 | SkOpSegment::markWinding id=22 (27.5197105,27.165432 27.541851,27.1430035 27.5638676,27.1209965) t=0 [43] (27.5197105,27.165432) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 621 | SkOpSegment::markWinding id=21 (27.4323025,27.2551785 27.4755878,27.2101307 27.5197105,27.165432) t=0 [41] (27.4323025,27.2551785) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 622 | SkOpSegment::markWinding id=20 (27.3431454,27.3431454 27.3875446,27.2987461 27.4323025,27.2551785) t=0.03515625 [49] (27.3462677,27.3400249) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 623 | SkOpSegment::findNextWinding simple |
| 624 | SkOpSegment::markDone id=9 (33.2413864,24.6781349 36.5549393,24.6459332 38.920742,26.966198) t=0 [17] (33.2413864,24.6781349) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 625 | bridgeWinding current id=9 from=(38.920742,26.966198) to=(33.2413864,24.6781349) |
| 626 | path.moveTo(38.920742,26.966198); |
| 627 | path.quadTo(36.5549393,24.6459332, 33.2413864,24.6781349); |
| 628 | SkOpSegment::findNextWinding simple |
| 629 | SkOpSegment::markDone id=24 (27.6075668,27.0761414 29.9278316,24.7103367 33.2413864,24.6781349) t=0 [47] (27.6075668,27.0761414) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 630 | bridgeWinding current id=24 from=(33.2413864,24.6781349) to=(27.6075668,27.0761414) |
| 631 | path.quadTo(29.9278316,24.7103367, 27.6075668,27.0761414); |
| 632 | SkOpSegment::findNextWinding simple |
| 633 | SkOpSegment::markDone id=23 (27.5638676,27.1209965 27.5855064,27.0986347 27.6075668,27.0761414) t=0 [45] (27.5638676,27.1209965) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 634 | bridgeWinding current id=23 from=(27.6075668,27.0761414) to=(27.5638676,27.1209965) |
| 635 | path.quadTo(27.5855064,27.0986347, 27.5638676,27.1209965); |
| 636 | SkOpSegment::findNextWinding simple |
| 637 | SkOpSegment::markDone id=22 (27.5197105,27.165432 27.541851,27.1430035 27.5638676,27.1209965) t=0 [43] (27.5197105,27.165432) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 638 | bridgeWinding current id=22 from=(27.5638676,27.1209965) to=(27.5197105,27.165432) |
| 639 | path.quadTo(27.541851,27.1430035, 27.5197105,27.165432); |
| 640 | SkOpSegment::findNextWinding simple |
| 641 | SkOpSegment::markDone id=21 (27.4323025,27.2551785 27.4755878,27.2101307 27.5197105,27.165432) t=0 [41] (27.4323025,27.2551785) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 642 | bridgeWinding current id=21 from=(27.5197105,27.165432) to=(27.4323025,27.2551785) |
| 643 | path.quadTo(27.4755878,27.2101307, 27.4323025,27.2551785); |
| 644 | SkOpSegment::markWinding id=6 (27.3431454,27.3431454 29.6862907,25 33,25) t=0.000666163387 [50] (27.3462677,27.3400249) tEnd=1 newWindSum=1 windSum=? windValue=1 |
| 645 | SkOpSegment::markWinding id=7 (33,25 36.3137093,25 38.6568527,27.3431454) t=0 [13] (33,25) tEnd=1 newWindSum=1 windSum=? windValue=1 |
| 646 | SkOpSegment::markWinding id=8 (38.6568527,27.3431454 41,29.6862907 41,33) t=0 [15] (38.6568527,27.3431454) tEnd=1 newWindSum=1 windSum=? windValue=1 |
| 647 | SkOpSegment::markWinding id=1 (41,33 41,36.3137093 38.6568527,38.6568527) t=0 [1] (41,33) tEnd=1 newWindSum=1 windSum=? windValue=1 |
| 648 | SkOpSegment::markAngle last seg=1 span=2 |
| 649 | SkOpSegment::markWinding id=20 (27.3431454,27.3431454 27.3875446,27.2987461 27.4323025,27.2551785) t=0 [39] (27.3431454,27.3431454) tEnd=0.03515625 newWindSum=1 windSum=? windValue=2 |
| 650 | SkOpSegment::nextChase mismatched signs |
| 651 | SkOpSegment::markWinding id=19 (25,33 25,29.6862907 27.3431454,27.3431454) t=0 [37] (25,33) tEnd=1 newWindSum=1 windSum=? windValue=2 |
| 652 | SkOpSegment::nextChase mismatched signs |
| 653 | SkOpSegment::markWinding id=18 (27.3431454,38.6568527 25,36.3137093 25,33) t=0 [35] (27.3431454,38.6568527) tEnd=1 newWindSum=1 windSum=? windValue=2 |
| 654 | SkOpSegment::nextChase mismatched signs |
| 655 | SkOpSegment::markWinding id=17 (33,41 29.6862907,41 27.3431454,38.6568527) t=0 [33] (33,41) tEnd=1 newWindSum=1 windSum=? windValue=2 |
| 656 | SkOpSegment::nextChase mismatched signs |
| 657 | SkOpSegment::markWinding id=16 (38.6568527,38.6568527 36.3137093,41 33,41) t=0 [31] (38.6568527,38.6568527) tEnd=1 newWindSum=1 windSum=? windValue=2 |
| 658 | SkOpSegment::markAngle last seg=16 span=31 windSum=1 |
| 659 | SkOpSegment::findNextWinding |
| 660 | SkOpAngle::dumpOne [20/12] next=6/14 sect=1/1 s=0.03515625 [49] e=1 [40] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=0 |
| 661 | SkOpAngle::dumpOne [6/14] next=20/11 sect=1/1 s=0.000666163387 [50] e=1 [12] sgn=-1 windVal=1 windSum=1 |
| 662 | SkOpAngle::dumpOne [20/11] next=20/12 sect=17/17 s=0.03515625 [49] e=0 [39] sgn=1 windVal=2 windSum=1 |
| 663 | SkOpSegment::findNextWinding chase.append segment=1 span=2 |
| 664 | SkOpSegment::markDone id=20 (27.3431454,27.3431454 27.3875446,27.2987461 27.4323025,27.2551785) t=0 [39] (27.3431454,27.3431454) tEnd=0.03515625 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=2 oppValue=0 |
| 665 | SkOpSegment::nextChase mismatched signs |
| 666 | SkOpSegment::markDone id=19 (25,33 25,29.6862907 27.3431454,27.3431454) t=0 [37] (25,33) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=2 oppValue=0 |
| 667 | SkOpSegment::nextChase mismatched signs |
| 668 | SkOpSegment::markDone id=18 (27.3431454,38.6568527 25,36.3137093 25,33) t=0 [35] (27.3431454,38.6568527) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=2 oppValue=0 |
| 669 | SkOpSegment::nextChase mismatched signs |
| 670 | SkOpSegment::markDone id=17 (33,41 29.6862907,41 27.3431454,38.6568527) t=0 [33] (33,41) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=2 oppValue=0 |
| 671 | SkOpSegment::nextChase mismatched signs |
| 672 | SkOpSegment::markDone id=16 (38.6568527,38.6568527 36.3137093,41 33,41) t=0 [31] (38.6568527,38.6568527) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=2 oppValue=0 |
| 673 | SkOpSegment::findNextWinding chase.append segment=16 span=31 windSum=1 |
| 674 | SkOpSegment::markDone id=20 (27.3431454,27.3431454 27.3875446,27.2987461 27.4323025,27.2551785) t=0.03515625 [49] (27.3462677,27.3400249) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 675 | SkOpSegment::findNextWinding from:[20] to:[6] start=5584652 end=5579668 |
| 676 | bridgeWinding current id=20 from=(27.4323025,27.2551785) to=(27.3462677,27.3400249) |
| 677 | path.quadTo(27.3891354,27.2971973, 27.3462677,27.3400249); |
| 678 | SkOpSegment::findNextWinding simple |
| 679 | SkOpSegment::markDone id=6 (27.3431454,27.3431454 29.6862907,25 33,25) t=0.000666163387 [50] (27.3462677,27.3400249) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=1 oppValue=0 |
| 680 | bridgeWinding current id=6 from=(27.3462677,27.3400249) to=(33,25) |
| 681 | path.quadTo(29.6884995,25, 33,25); |
| 682 | SkOpSegment::findNextWinding simple |
| 683 | SkOpSegment::markDone id=7 (33,25 36.3137093,25 38.6568527,27.3431454) t=0 [13] (33,25) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=1 oppValue=0 |
| 684 | bridgeWinding current id=7 from=(33,25) to=(38.6568527,27.3431454) |
| 685 | path.quadTo(36.3137093,25, 38.6568527,27.3431454); |
| 686 | SkOpSegment::findNextWinding simple |
| 687 | SkOpSegment::markDone id=8 (38.6568527,27.3431454 41,29.6862907 41,33) t=0 [15] (38.6568527,27.3431454) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=1 oppValue=0 |
| 688 | bridgeWinding current id=8 from=(38.6568527,27.3431454) to=(41,33) |
| 689 | path.quadTo(41,29.6862907, 41,33); |
| 690 | SkOpSegment::findNextWinding |
| 691 | SkOpAngle::dumpOne [1/13] next=15/1 sect=1/5 s=1 [2] e=0 [1] sgn=1 windVal=1 windSum=1 |
| 692 | SkOpAngle::dumpOne [15/1] next=16/2 sect=4/5 s=1 [30] e=0 [29] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=0 |
| 693 | SkOpAngle::dumpOne [16/2] next=1/13 sect=21/17 s=0 [31] e=1 [32] sgn=-1 windVal=2 windSum=1 done |
| 694 | SkOpSegment::markDone id=1 (41,33 41,36.3137093 38.6568527,38.6568527) t=0 [1] (41,33) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=1 oppValue=0 |
| 695 | SkOpSegment::findNextWinding from:[1] to:[15] start=5581892 end=5581788 |
| 696 | bridgeWinding current id=1 from=(41,33) to=(38.6568527,38.6568527) |
| 697 | path.quadTo(41,36.3137093, 38.6568527,38.6568527); |
| 698 | SkOpSegment::findNextWinding simple |
| 699 | SkOpSegment::markDone id=15 (38.7809143,38.5304031 38.7196693,38.5940361 38.6568527,38.6568527) t=0 [29] (38.7809143,38.5304031) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 700 | bridgeWinding current id=15 from=(38.6568527,38.6568527) to=(38.7809143,38.5304031) |
| 701 | path.quadTo(38.7196693,38.5940361, 38.7809143,38.5304031); |
| 702 | SkOpSegment::findNextWinding simple |
| 703 | SkOpSegment::markDone id=14 (38.9064751,38.4056053 38.8441086,38.4687881 38.7809143,38.5304031) t=0 [27] (38.9064751,38.4056053) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 704 | bridgeWinding current id=14 from=(38.7809143,38.5304031) to=(38.9064751,38.4056053) |
| 705 | path.quadTo(38.8441086,38.4687881, 38.9064751,38.4056053); |
| 706 | SkOpSegment::findNextWinding simple |
| 707 | SkOpSegment::markDone id=13 (38.9681816,38.3424988 38.9374619,38.3742142 38.9064751,38.4056053) t=0 [25] (38.9681816,38.3424988) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 708 | bridgeWinding current id=13 from=(38.9064751,38.4056053) to=(38.9681816,38.3424988) |
| 709 | path.quadTo(38.9374619,38.3742142, 38.9681816,38.3424988); |
| 710 | SkOpSegment::findNextWinding simple |
| 711 | SkOpSegment::markDone id=12 (39.0306854,38.2793732 38.9995995,38.3110695 38.9681816,38.3424988) t=0 [23] (39.0306854,38.2793732) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 712 | bridgeWinding current id=12 from=(38.9681816,38.3424988) to=(39.0306854,38.2793732) |
| 713 | path.quadTo(38.9995995,38.3110695, 39.0306854,38.2793732); |
| 714 | SkOpSegment::findNextWinding simple |
| 715 | SkOpSegment::markDone id=11 (41.3187523,32.6000175 41.3509521,35.9135704 39.0306854,38.2793732) t=0 [21] (41.3187523,32.6000175) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 716 | bridgeWinding current id=11 from=(39.0306854,38.2793732) to=(41.3187523,32.6000175) |
| 717 | path.quadTo(41.3509521,35.9135704, 41.3187523,32.6000175); |
| 718 | SkOpSegment::findNextWinding simple |
| 719 | SkOpSegment::markDone id=10 (38.920742,26.966198 41.2865486,29.2864628 41.3187523,32.6000175) t=0 [19] (38.920742,26.966198) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 720 | bridgeWinding current id=10 from=(41.3187523,32.6000175) to=(38.920742,26.966198) |
| 721 | path.quadTo(41.2865486,29.2864628, 38.920742,26.966198); |
| 722 | path.close(); |
| 723 | </div> |
| 724 | |
| 725 | <div id="fuzz763_4713parts"> |
| 726 | seg=1 {{{-33.1326447f, -40.8928833f}, {-29.8189526f, -40.9036179f}, {-27.4682293f, -38.5680733f}}} |
| 727 | seg=2 {{{-27.4682293f, -38.5680733f}, {-25.117506f, -36.2325325f}, {-25.1067715f, -32.9188423f}}} |
| 728 | seg=3 {{{-25.1067715f, -32.9188423f}, {-25.0960369f, -29.6051483f}, {-27.4315796f, -27.254425f}}} |
| 729 | seg=4 {{{-27.4315796f, -27.254425f}, {-29.7671204f, -24.9036999f}, {-33.0808144f, -24.8929653f}}} |
| 730 | seg=5 {{{-33.0808144f, -24.8929653f}, {-36.3945045f, -24.8822308f}, {-38.7452278f, -27.2177753f}}} |
| 731 | seg=6 {{{-38.7452278f, -27.2177753f}, {-41.0959549f, -29.5533161f}, {-41.1066895f, -32.867012f}}} |
| 732 | seg=7 {{{-41.1066895f, -32.867012f}, {-41.117424f, -36.1807022f}, {-38.7818794f, -38.5314217f}}} |
| 733 | seg=8 {{{-38.7818794f, -38.5314217f}, {-36.4463348f, -40.8821487f}, {-33.1326447f, -40.8928833f}}} |
| 734 | op union |
| 735 | seg=9 {{{41, 33}, {41, 36.3137093f}, {38.6568527f, 38.6568527f}}} |
| 736 | seg=10 {{{38.6568527f, 38.6568527f}, {36.3137093f, 41}, {33, 41}}} |
| 737 | seg=11 {{{33, 41}, {29.6862907f, 41}, {27.3431454f, 38.6568527f}}} |
| 738 | seg=12 {{{27.3431454f, 38.6568527f}, {25, 36.3137093f}, {25, 33}}} |
| 739 | seg=13 {{{25, 33}, {25, 29.6862907f}, {27.3431454f, 27.3431454f}}} |
| 740 | seg=14 {{{27.3431454f, 27.3431454f}, {29.6862907f, 25}, {33, 25}}} |
| 741 | seg=15 {{{33, 25}, {36.3137093f, 25}, {38.6568527f, 27.3431454f}}} |
| 742 | seg=16 {{{38.6568527f, 27.3431454f}, {41, 29.6862907f}, {41, 33}}} |
| 743 | debugShowQuadIntersection wtTs[0]=1 {{{-33.1326447,-40.8928833}, {-29.8189526,-40.9036179}, {-27.4682293,-38.5680733}}} {{-27.4682293,-38.5680733}} wnTs[0]=0 {{{-27.4682293,-38.5680733}, {-25.117506,-36.2325325}, {-25.1067715,-32.9188423}}} |
| 744 | debugShowQuadIntersection wtTs[0]=0 {{{-33.1326447,-40.8928833}, {-29.8189526,-40.9036179}, {-27.4682293,-38.5680733}}} {{-33.1326447,-40.8928833}} wnTs[0]=1 {{{-38.7818794,-38.5314217}, {-36.4463348,-40.8821487}, {-33.1326447,-40.8928833}}} |
| 745 | debugShowQuadIntersection wtTs[0]=1 {{{-27.4682293,-38.5680733}, {-25.117506,-36.2325325}, {-25.1067715,-32.9188423}}} {{-25.1067715,-32.9188423}} wnTs[0]=0 {{{-25.1067715,-32.9188423}, {-25.0960369,-29.6051483}, {-27.4315796,-27.254425}}} |
| 746 | debugShowQuadIntersection wtTs[0]=1 {{{-25.1067715,-32.9188423}, {-25.0960369,-29.6051483}, {-27.4315796,-27.254425}}} {{-27.4315796,-27.254425}} wnTs[0]=0 {{{-27.4315796,-27.254425}, {-29.7671204,-24.9036999}, {-33.0808144,-24.8929653}}} |
| 747 | debugShowQuadIntersection wtTs[0]=1 {{{-27.4315796,-27.254425}, {-29.7671204,-24.9036999}, {-33.0808144,-24.8929653}}} {{-33.0808144,-24.8929653}} wnTs[0]=0 {{{-33.0808144,-24.8929653}, {-36.3945045,-24.8822308}, {-38.7452278,-27.2177753}}} |
| 748 | debugShowQuadIntersection wtTs[0]=1 {{{-33.0808144,-24.8929653}, {-36.3945045,-24.8822308}, {-38.7452278,-27.2177753}}} {{-38.7452278,-27.2177753}} wnTs[0]=0 {{{-38.7452278,-27.2177753}, {-41.0959549,-29.5533161}, {-41.1066895,-32.867012}}} |
| 749 | debugShowQuadIntersection wtTs[0]=1 {{{-38.7452278,-27.2177753}, {-41.0959549,-29.5533161}, {-41.1066895,-32.867012}}} {{-41.1066895,-32.867012}} wnTs[0]=0 {{{-41.1066895,-32.867012}, {-41.117424,-36.1807022}, {-38.7818794,-38.5314217}}} |
| 750 | debugShowQuadIntersection wtTs[0]=1 {{{-41.1066895,-32.867012}, {-41.117424,-36.1807022}, {-38.7818794,-38.5314217}}} {{-38.7818794,-38.5314217}} wnTs[0]=0 {{{-38.7818794,-38.5314217}, {-36.4463348,-40.8821487}, {-33.1326447,-40.8928833}}} |
| 751 | debugShowQuadIntersection wtTs[0]=1 {{{41,33}, {41,36.3137093}, {38.6568527,38.6568527}}} {{38.6568527,38.6568527}} wnTs[0]=0 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} |
| 752 | debugShowQuadIntersection wtTs[0]=0 {{{41,33}, {41,36.3137093}, {38.6568527,38.6568527}}} {{41,33}} wnTs[0]=1 {{{38.6568527,27.3431454}, {41,29.6862907}, {41,33}}} |
| 753 | debugShowQuadIntersection wtTs[0]=1 {{{38.6568527,38.6568527}, {36.3137093,41}, {33,41}}} {{33,41}} wnTs[0]=0 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} |
| 754 | debugShowQuadIntersection wtTs[0]=1 {{{33,41}, {29.6862907,41}, {27.3431454,38.6568527}}} {{27.3431454,38.6568527}} wnTs[0]=0 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} |
| 755 | debugShowQuadIntersection wtTs[0]=1 {{{27.3431454,38.6568527}, {25,36.3137093}, {25,33}}} {{25,33}} wnTs[0]=0 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} |
| 756 | debugShowQuadIntersection wtTs[0]=1 {{{25,33}, {25,29.6862907}, {27.3431454,27.3431454}}} {{27.3431454,27.3431454}} wnTs[0]=0 {{{27.3431454,27.3431454}, {29.6862907,25}, {33,25}}} |
| 757 | debugShowQuadIntersection wtTs[0]=1 {{{27.3431454,27.3431454}, {29.6862907,25}, {33,25}}} {{33,25}} wnTs[0]=0 {{{33,25}, {36.3137093,25}, {38.6568527,27.3431454}}} |
| 758 | debugShowQuadIntersection wtTs[0]=1 {{{33,25}, {36.3137093,25}, {38.6568527,27.3431454}}} {{38.6568527,27.3431454}} wnTs[0]=0 {{{38.6568527,27.3431454}, {41,29.6862907}, {41,33}}} |
| 759 | SkOpSegment::debugShowActiveSpans id=1 (-33.1326447,-40.8928833 -29.8189526,-40.9036179 -27.4682293,-38.5680733) t=0 (-33.1326447,-40.8928833) tEnd=1 windSum=? windValue=1 |
| 760 | SkOpSegment::debugShowActiveSpans id=2 (-27.4682293,-38.5680733 -25.117506,-36.2325325 -25.1067715,-32.9188423) t=0 (-27.4682293,-38.5680733) tEnd=1 windSum=? windValue=1 |
| 761 | SkOpSegment::debugShowActiveSpans id=3 (-25.1067715,-32.9188423 -25.0960369,-29.6051483 -27.4315796,-27.254425) t=0 (-25.1067715,-32.9188423) tEnd=1 windSum=? windValue=1 |
| 762 | SkOpSegment::debugShowActiveSpans id=4 (-27.4315796,-27.254425 -29.7671204,-24.9036999 -33.0808144,-24.8929653) t=0 (-27.4315796,-27.254425) tEnd=1 windSum=? windValue=1 |
| 763 | SkOpSegment::debugShowActiveSpans id=5 (-33.0808144,-24.8929653 -36.3945045,-24.8822308 -38.7452278,-27.2177753) t=0 (-33.0808144,-24.8929653) tEnd=1 windSum=? windValue=1 |
| 764 | SkOpSegment::debugShowActiveSpans id=6 (-38.7452278,-27.2177753 -41.0959549,-29.5533161 -41.1066895,-32.867012) t=0 (-38.7452278,-27.2177753) tEnd=1 windSum=? windValue=1 |
| 765 | SkOpSegment::debugShowActiveSpans id=7 (-41.1066895,-32.867012 -41.117424,-36.1807022 -38.7818794,-38.5314217) t=0 (-41.1066895,-32.867012) tEnd=1 windSum=? windValue=1 |
| 766 | SkOpSegment::debugShowActiveSpans id=8 (-38.7818794,-38.5314217 -36.4463348,-40.8821487 -33.1326447,-40.8928833) t=0 (-38.7818794,-38.5314217) tEnd=1 windSum=? windValue=1 |
| 767 | SkOpSegment::debugShowActiveSpans id=9 (41,33 41,36.3137093 38.6568527,38.6568527) t=0 (41,33) tEnd=1 windSum=? windValue=1 |
| 768 | SkOpSegment::debugShowActiveSpans id=10 (38.6568527,38.6568527 36.3137093,41 33,41) t=0 (38.6568527,38.6568527) tEnd=1 windSum=? windValue=1 |
| 769 | SkOpSegment::debugShowActiveSpans id=11 (33,41 29.6862907,41 27.3431454,38.6568527) t=0 (33,41) tEnd=1 windSum=? windValue=1 |
| 770 | SkOpSegment::debugShowActiveSpans id=12 (27.3431454,38.6568527 25,36.3137093 25,33) t=0 (27.3431454,38.6568527) tEnd=1 windSum=? windValue=1 |
| 771 | SkOpSegment::debugShowActiveSpans id=13 (25,33 25,29.6862907 27.3431454,27.3431454) t=0 (25,33) tEnd=1 windSum=? windValue=1 |
| 772 | SkOpSegment::debugShowActiveSpans id=14 (27.3431454,27.3431454 29.6862907,25 33,25) t=0 (27.3431454,27.3431454) tEnd=1 windSum=? windValue=1 |
| 773 | SkOpSegment::debugShowActiveSpans id=15 (33,25 36.3137093,25 38.6568527,27.3431454) t=0 (33,25) tEnd=1 windSum=? windValue=1 |
| 774 | SkOpSegment::debugShowActiveSpans id=16 (38.6568527,27.3431454 41,29.6862907 41,33) t=0 (38.6568527,27.3431454) tEnd=1 windSum=? windValue=1 |
| 775 | SkOpSpan::sortableTop dir=kTop seg=1 t=0.5 pt=(-30.0596943,-40.3170471) |
| 776 | SkOpSpan::sortableTop [0] valid=1 operand=0 span=1 ccw=1 seg=1 {{{-33.1326447f, -40.8928833f}, {-29.8189526f, -40.9036179f}, {-27.4682293f, -38.5680733f}}} t=0.5 pt=(-30.0596943,-40.3170471) slope=(2.83220768,1.16240501) |
| 777 | SkOpSegment::markWinding id=1 (-33.1326447,-40.8928833 -29.8189526,-40.9036179 -27.4682293,-38.5680733) t=0 [1] (-33.1326447,-40.8928833) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 778 | SkOpSegment::markWinding id=2 (-27.4682293,-38.5680733 -25.117506,-36.2325325 -25.1067715,-32.9188423) t=0 [3] (-27.4682293,-38.5680733) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 779 | SkOpSegment::markWinding id=3 (-25.1067715,-32.9188423 -25.0960369,-29.6051483 -27.4315796,-27.254425) t=0 [5] (-25.1067715,-32.9188423) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 780 | SkOpSegment::markWinding id=4 (-27.4315796,-27.254425 -29.7671204,-24.9036999 -33.0808144,-24.8929653) t=0 [7] (-27.4315796,-27.254425) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 781 | SkOpSegment::markWinding id=5 (-33.0808144,-24.8929653 -36.3945045,-24.8822308 -38.7452278,-27.2177753) t=0 [9] (-33.0808144,-24.8929653) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 782 | SkOpSegment::markWinding id=6 (-38.7452278,-27.2177753 -41.0959549,-29.5533161 -41.1066895,-32.867012) t=0 [11] (-38.7452278,-27.2177753) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 783 | SkOpSegment::markWinding id=7 (-41.1066895,-32.867012 -41.117424,-36.1807022 -38.7818794,-38.5314217) t=0 [13] (-41.1066895,-32.867012) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 784 | SkOpSegment::markWinding id=8 (-38.7818794,-38.5314217 -36.4463348,-40.8821487 -33.1326447,-40.8928833) t=0 [15] (-38.7818794,-38.5314217) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 785 | SkOpSegment::markWinding id=1 (-33.1326447,-40.8928833 -29.8189526,-40.9036179 -27.4682293,-38.5680733) t=0 [1] (-33.1326447,-40.8928833) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 786 | SkOpSegment::activeOp id=1 t=1 tEnd=0 op=union miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 |
| 787 | SkOpSegment::findNextOp simple |
| 788 | SkOpSegment::markDone id=1 (-33.1326447,-40.8928833 -29.8189526,-40.9036179 -27.4682293,-38.5680733) t=0 [1] (-33.1326447,-40.8928833) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 789 | bridgeOp current id=1 from=(-27.4682293,-38.5680733) to=(-33.1326447,-40.8928833) |
| 790 | path.moveTo(-27.4682293,-38.5680733); |
| 791 | path.quadTo(-29.8189526,-40.9036179, -33.1326447,-40.8928833); |
| 792 | SkOpSegment::findNextOp simple |
| 793 | SkOpSegment::markDone id=8 (-38.7818794,-38.5314217 -36.4463348,-40.8821487 -33.1326447,-40.8928833) t=0 [15] (-38.7818794,-38.5314217) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 794 | bridgeOp current id=8 from=(-33.1326447,-40.8928833) to=(-38.7818794,-38.5314217) |
| 795 | path.quadTo(-36.4463348,-40.8821487, -38.7818794,-38.5314217); |
| 796 | SkOpSegment::findNextOp simple |
| 797 | SkOpSegment::markDone id=7 (-41.1066895,-32.867012 -41.117424,-36.1807022 -38.7818794,-38.5314217) t=0 [13] (-41.1066895,-32.867012) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 798 | bridgeOp current id=7 from=(-38.7818794,-38.5314217) to=(-41.1066895,-32.867012) |
| 799 | path.quadTo(-41.117424,-36.1807022, -41.1066895,-32.867012); |
| 800 | SkOpSegment::findNextOp simple |
| 801 | SkOpSegment::markDone id=6 (-38.7452278,-27.2177753 -41.0959549,-29.5533161 -41.1066895,-32.867012) t=0 [11] (-38.7452278,-27.2177753) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 802 | bridgeOp current id=6 from=(-41.1066895,-32.867012) to=(-38.7452278,-27.2177753) |
| 803 | path.quadTo(-41.0959549,-29.5533161, -38.7452278,-27.2177753); |
| 804 | SkOpSegment::findNextOp simple |
| 805 | SkOpSegment::markDone id=5 (-33.0808144,-24.8929653 -36.3945045,-24.8822308 -38.7452278,-27.2177753) t=0 [9] (-33.0808144,-24.8929653) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 806 | bridgeOp current id=5 from=(-38.7452278,-27.2177753) to=(-33.0808144,-24.8929653) |
| 807 | path.quadTo(-36.3945045,-24.8822308, -33.0808144,-24.8929653); |
| 808 | SkOpSegment::findNextOp simple |
| 809 | SkOpSegment::markDone id=4 (-27.4315796,-27.254425 -29.7671204,-24.9036999 -33.0808144,-24.8929653) t=0 [7] (-27.4315796,-27.254425) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 810 | bridgeOp current id=4 from=(-33.0808144,-24.8929653) to=(-27.4315796,-27.254425) |
| 811 | path.quadTo(-29.7671204,-24.9036999, -27.4315796,-27.254425); |
| 812 | SkOpSegment::findNextOp simple |
| 813 | SkOpSegment::markDone id=3 (-25.1067715,-32.9188423 -25.0960369,-29.6051483 -27.4315796,-27.254425) t=0 [5] (-25.1067715,-32.9188423) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 814 | bridgeOp current id=3 from=(-27.4315796,-27.254425) to=(-25.1067715,-32.9188423) |
| 815 | path.quadTo(-25.0960369,-29.6051483, -25.1067715,-32.9188423); |
| 816 | SkOpSegment::findNextOp simple |
| 817 | SkOpSegment::markDone id=2 (-27.4682293,-38.5680733 -25.117506,-36.2325325 -25.1067715,-32.9188423) t=0 [3] (-27.4682293,-38.5680733) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 818 | bridgeOp current id=2 from=(-25.1067715,-32.9188423) to=(-27.4682293,-38.5680733) |
| 819 | path.quadTo(-25.117506,-36.2325325, -27.4682293,-38.5680733); |
| 820 | path.close(); |
| 821 | SkOpSegment::debugShowActiveSpans id=9 (41,33 41,36.3137093 38.6568527,38.6568527) t=0 (41,33) tEnd=1 windSum=? windValue=1 |
| 822 | SkOpSegment::debugShowActiveSpans id=10 (38.6568527,38.6568527 36.3137093,41 33,41) t=0 (38.6568527,38.6568527) tEnd=1 windSum=? windValue=1 |
| 823 | SkOpSegment::debugShowActiveSpans id=11 (33,41 29.6862907,41 27.3431454,38.6568527) t=0 (33,41) tEnd=1 windSum=? windValue=1 |
| 824 | SkOpSegment::debugShowActiveSpans id=12 (27.3431454,38.6568527 25,36.3137093 25,33) t=0 (27.3431454,38.6568527) tEnd=1 windSum=? windValue=1 |
| 825 | SkOpSegment::debugShowActiveSpans id=13 (25,33 25,29.6862907 27.3431454,27.3431454) t=0 (25,33) tEnd=1 windSum=? windValue=1 |
| 826 | SkOpSegment::debugShowActiveSpans id=14 (27.3431454,27.3431454 29.6862907,25 33,25) t=0 (27.3431454,27.3431454) tEnd=1 windSum=? windValue=1 |
| 827 | SkOpSegment::debugShowActiveSpans id=15 (33,25 36.3137093,25 38.6568527,27.3431454) t=0 (33,25) tEnd=1 windSum=? windValue=1 |
| 828 | SkOpSegment::debugShowActiveSpans id=16 (38.6568527,27.3431454 41,29.6862907 41,33) t=0 (38.6568527,27.3431454) tEnd=1 windSum=? windValue=1 |
| 829 | SkOpSpan::sortableTop dir=kLeft seg=9 t=0.5 pt=(40.4142151,36.0710678) |
| 830 | SkOpSpan::sortableTop [0] valid=1 operand=1 span=23 ccw=1 seg=12 {{{27.3431454f, 38.6568527f}, {25, 36.3137093f}, {25, 33}}} t=0.5 pt=(25.5857868,36.0710678) slope=(-1.17157269,-2.82842636) |
| 831 | SkOpSpan::sortableTop [1] valid=1 operand=1 span=17 ccw=0 seg=9 {{{41, 33}, {41, 36.3137093f}, {38.6568527f, 38.6568527f}}} t=0.5 pt=(40.4142151,36.0710678) slope=(-1.17157364,2.82842636) |
| 832 | SkOpSegment::markWinding id=12 (27.3431454,38.6568527 25,36.3137093 25,33) t=0 [23] (27.3431454,38.6568527) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 833 | SkOpSegment::markWinding id=13 (25,33 25,29.6862907 27.3431454,27.3431454) t=0 [25] (25,33) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 834 | SkOpSegment::markWinding id=14 (27.3431454,27.3431454 29.6862907,25 33,25) t=0 [27] (27.3431454,27.3431454) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 835 | SkOpSegment::markWinding id=15 (33,25 36.3137093,25 38.6568527,27.3431454) t=0 [29] (33,25) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 836 | SkOpSegment::markWinding id=16 (38.6568527,27.3431454 41,29.6862907 41,33) t=0 [31] (38.6568527,27.3431454) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 837 | SkOpSegment::markWinding id=9 (41,33 41,36.3137093 38.6568527,38.6568527) t=0 [17] (41,33) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 838 | SkOpSegment::markWinding id=10 (38.6568527,38.6568527 36.3137093,41 33,41) t=0 [19] (38.6568527,38.6568527) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 839 | SkOpSegment::markWinding id=11 (33,41 29.6862907,41 27.3431454,38.6568527) t=0 [21] (33,41) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 840 | SkOpSegment::markWinding id=12 (27.3431454,38.6568527 25,36.3137093 25,33) t=0 [23] (27.3431454,38.6568527) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 841 | SkOpSegment::activeOp id=9 t=1 tEnd=0 op=union miFrom=0 miTo=0 suFrom=0 suTo=1 result=1 |
| 842 | SkOpSegment::findNextOp simple |
| 843 | SkOpSegment::markDone id=9 (41,33 41,36.3137093 38.6568527,38.6568527) t=0 [17] (41,33) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 844 | bridgeOp current id=9 from=(38.6568527,38.6568527) to=(41,33) |
| 845 | path.moveTo(38.6568527,38.6568527); |
| 846 | path.quadTo(41,36.3137093, 41,33); |
| 847 | SkOpSegment::findNextOp simple |
| 848 | SkOpSegment::markDone id=16 (38.6568527,27.3431454 41,29.6862907 41,33) t=0 [31] (38.6568527,27.3431454) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 849 | bridgeOp current id=16 from=(41,33) to=(38.6568527,27.3431454) |
| 850 | path.quadTo(41,29.6862907, 38.6568527,27.3431454); |
| 851 | SkOpSegment::findNextOp simple |
| 852 | SkOpSegment::markDone id=15 (33,25 36.3137093,25 38.6568527,27.3431454) t=0 [29] (33,25) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 853 | bridgeOp current id=15 from=(38.6568527,27.3431454) to=(33,25) |
| 854 | path.quadTo(36.3137093,25, 33,25); |
| 855 | SkOpSegment::findNextOp simple |
| 856 | SkOpSegment::markDone id=14 (27.3431454,27.3431454 29.6862907,25 33,25) t=0 [27] (27.3431454,27.3431454) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 857 | bridgeOp current id=14 from=(33,25) to=(27.3431454,27.3431454) |
| 858 | path.quadTo(29.6862907,25, 27.3431454,27.3431454); |
| 859 | SkOpSegment::findNextOp simple |
| 860 | SkOpSegment::markDone id=13 (25,33 25,29.6862907 27.3431454,27.3431454) t=0 [25] (25,33) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 861 | bridgeOp current id=13 from=(27.3431454,27.3431454) to=(25,33) |
| 862 | path.quadTo(25,29.6862907, 25,33); |
| 863 | SkOpSegment::findNextOp simple |
| 864 | SkOpSegment::markDone id=12 (27.3431454,38.6568527 25,36.3137093 25,33) t=0 [23] (27.3431454,38.6568527) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 865 | bridgeOp current id=12 from=(25,33) to=(27.3431454,38.6568527) |
| 866 | path.quadTo(25,36.3137093, 27.3431454,38.6568527); |
| 867 | SkOpSegment::findNextOp simple |
| 868 | SkOpSegment::markDone id=11 (33,41 29.6862907,41 27.3431454,38.6568527) t=0 [21] (33,41) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 869 | bridgeOp current id=11 from=(27.3431454,38.6568527) to=(33,41) |
| 870 | path.quadTo(29.6862907,41, 33,41); |
| 871 | SkOpSegment::findNextOp simple |
| 872 | SkOpSegment::markDone id=10 (38.6568527,38.6568527 36.3137093,41 33,41) t=0 [19] (38.6568527,38.6568527) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 873 | bridgeOp current id=10 from=(33,41) to=(38.6568527,38.6568527) |
| 874 | path.quadTo(36.3137093,41, 38.6568527,38.6568527); |
caryclark | ef784fb | 2015-10-30 12:03:06 -0700 | [diff] [blame] | 875 | path.close(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 876 | </div> |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 877 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 878 | </div> |
| 879 | |
| 880 | <script type="text/javascript"> |
| 881 | |
| 882 | var testDivs = [ |
caryclark | 2bec26a | 2016-05-26 09:01:47 -0700 | [diff] [blame^] | 883 | fuzz763_4713_b, |
| 884 | fuzz763_4713parts, |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 885 | ]; |
| 886 | |
| 887 | var decimal_places = 3; // make this 3 to show more precision |
| 888 | |
| 889 | var tests = []; |
| 890 | var testLines = []; |
| 891 | var testTitles = []; |
| 892 | var testIndex = 0; |
| 893 | var ctx; |
| 894 | |
| 895 | var xmin, xmax, focusXmin, focusXmax; |
| 896 | var ymin, ymax, focusYmin, focusYmax; |
| 897 | var scale; |
| 898 | var mouseX, mouseY; |
| 899 | var srcLeft, srcTop; |
| 900 | var screenWidth, screenHeight; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 901 | var drawnPts, drawnLines, drawnQuads, drawnConics, drawnCubics; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 902 | var curveT = 0; |
| 903 | |
| 904 | var pt_labels = 2; |
| 905 | var collect_bounds = false; |
| 906 | var control_lines = 0; |
| 907 | var curve_t = false; |
| 908 | var debug_xy = 1; |
| 909 | var focus_enabled = false; |
| 910 | var focus_on_selection = false; |
| 911 | var step_limit = 0; |
| 912 | var draw_active = false; |
| 913 | var draw_add = false; |
| 914 | var draw_angle = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 915 | var draw_coincidence = false; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 916 | var draw_deriviatives = 0; |
| 917 | var draw_hints = false; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 918 | var draw_id = false; |
| 919 | var draw_intersection = 0; |
| 920 | var draw_intersectT = false; |
| 921 | var draw_legend = true; |
| 922 | var draw_log = false; |
| 923 | var draw_mark = false; |
| 924 | var draw_midpoint = false; |
| 925 | var draw_op = 0; |
| 926 | var draw_sequence = false; |
| 927 | var draw_sort = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 928 | var draw_top = false; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 929 | var draw_path = 3; |
| 930 | var draw_computed = 0; |
| 931 | var retina_scale = !!window.devicePixelRatio; |
| 932 | |
| 933 | var activeCount = 0; |
| 934 | var addCount = 0; |
| 935 | var angleCount = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 936 | var coinCount = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 937 | var opCount = 0; |
| 938 | var sectCount = 0; |
| 939 | var sortCount = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 940 | var topCount = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 941 | var markCount = 0; |
| 942 | var activeMax = 0; |
| 943 | var addMax = 0; |
| 944 | var angleMax = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 945 | var coinMax = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 946 | var sectMax = 0; |
| 947 | var sectMax2 = 0; |
| 948 | var sortMax = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 949 | var topMax = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 950 | var markMax = 0; |
| 951 | var opMax = 0; |
| 952 | var stepMax = 0; |
| 953 | var lastIndex = 0; |
| 954 | var hasPath = false; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 955 | var hasAlignedPath = false; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 956 | var hasComputedPath = false; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 957 | var angleBetween = false; |
| 958 | var afterIndex = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 959 | |
| 960 | var firstActiveSpan = -1; |
| 961 | var logStart = -1; |
| 962 | var logRange = 0; |
| 963 | |
| 964 | var SPAN_ID = 0; |
| 965 | var SPAN_X1 = SPAN_ID + 1; |
| 966 | var SPAN_Y1 = SPAN_X1 + 1; |
| 967 | var SPAN_X2 = SPAN_Y1 + 1; |
| 968 | var SPAN_Y2 = SPAN_X2 + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 969 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 970 | var SPAN_L_T = SPAN_Y2 + 1; |
| 971 | var SPAN_L_TX = SPAN_L_T + 1; |
| 972 | var SPAN_L_TY = SPAN_L_TX + 1; |
| 973 | var SPAN_L_TEND = SPAN_L_TY + 1; |
| 974 | var SPAN_L_OTHER = SPAN_L_TEND + 1; |
| 975 | var SPAN_L_OTHERT = SPAN_L_OTHER + 1; |
| 976 | var SPAN_L_OTHERI = SPAN_L_OTHERT + 1; |
| 977 | var SPAN_L_SUM = SPAN_L_OTHERI + 1; |
| 978 | var SPAN_L_VAL = SPAN_L_SUM + 1; |
| 979 | var SPAN_L_OPP = SPAN_L_VAL + 1; |
| 980 | |
| 981 | var SPAN_X3 = SPAN_Y2 + 1; |
| 982 | var SPAN_Y3 = SPAN_X3 + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 983 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 984 | var SPAN_Q_T = SPAN_Y3 + 1; |
| 985 | var SPAN_Q_TX = SPAN_Q_T + 1; |
| 986 | var SPAN_Q_TY = SPAN_Q_TX + 1; |
| 987 | var SPAN_Q_TEND = SPAN_Q_TY + 1; |
| 988 | var SPAN_Q_OTHER = SPAN_Q_TEND + 1; |
| 989 | var SPAN_Q_OTHERT = SPAN_Q_OTHER + 1; |
| 990 | var SPAN_Q_OTHERI = SPAN_Q_OTHERT + 1; |
| 991 | var SPAN_Q_SUM = SPAN_Q_OTHERI + 1; |
| 992 | var SPAN_Q_VAL = SPAN_Q_SUM + 1; |
| 993 | var SPAN_Q_OPP = SPAN_Q_VAL + 1; |
| 994 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 995 | var SPAN_K_W = SPAN_Y3 + 1; |
| 996 | var SPAN_K_T = SPAN_K_W + 1; |
| 997 | var SPAN_K_TX = SPAN_K_T + 1; |
| 998 | var SPAN_K_TY = SPAN_K_TX + 1; |
| 999 | var SPAN_K_TEND = SPAN_K_TY + 1; |
| 1000 | var SPAN_K_OTHER = SPAN_K_TEND + 1; |
| 1001 | var SPAN_K_OTHERT = SPAN_K_OTHER + 1; |
| 1002 | var SPAN_K_OTHERI = SPAN_K_OTHERT + 1; |
| 1003 | var SPAN_K_SUM = SPAN_K_OTHERI + 1; |
| 1004 | var SPAN_K_VAL = SPAN_K_SUM + 1; |
| 1005 | var SPAN_K_OPP = SPAN_K_VAL + 1; |
| 1006 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1007 | var SPAN_X4 = SPAN_Y3 + 1; |
| 1008 | var SPAN_Y4 = SPAN_X4 + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1009 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1010 | var SPAN_C_T = SPAN_Y4 + 1; |
| 1011 | var SPAN_C_TX = SPAN_C_T + 1; |
| 1012 | var SPAN_C_TY = SPAN_C_TX + 1; |
| 1013 | var SPAN_C_TEND = SPAN_C_TY + 1; |
| 1014 | var SPAN_C_OTHER = SPAN_C_TEND + 1; |
| 1015 | var SPAN_C_OTHERT = SPAN_C_OTHER + 1; |
| 1016 | var SPAN_C_OTHERI = SPAN_C_OTHERT + 1; |
| 1017 | var SPAN_C_SUM = SPAN_C_OTHERI + 1; |
| 1018 | var SPAN_C_VAL = SPAN_C_SUM + 1; |
| 1019 | var SPAN_C_OPP = SPAN_C_VAL + 1; |
| 1020 | |
| 1021 | var ACTIVE_LINE_SPAN = 1; |
| 1022 | var ACTIVE_QUAD_SPAN = ACTIVE_LINE_SPAN + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1023 | var ACTIVE_CONIC_SPAN = ACTIVE_QUAD_SPAN + 1; |
| 1024 | var ACTIVE_CUBIC_SPAN = ACTIVE_CONIC_SPAN + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1025 | |
| 1026 | var ADD_MOVETO = ACTIVE_CUBIC_SPAN + 1; |
| 1027 | var ADD_LINETO = ADD_MOVETO + 1; |
| 1028 | var ADD_QUADTO = ADD_LINETO + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1029 | var ADD_CONICTO = ADD_QUADTO + 1; |
| 1030 | var ADD_CUBICTO = ADD_CONICTO + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1031 | var ADD_CLOSE = ADD_CUBICTO + 1; |
| 1032 | var ADD_FILL = ADD_CLOSE + 1; |
| 1033 | |
| 1034 | var PATH_LINE = ADD_FILL + 1; |
| 1035 | var PATH_QUAD = PATH_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1036 | var PATH_CONIC = PATH_QUAD + 1; |
| 1037 | var PATH_CUBIC = PATH_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1038 | |
| 1039 | var INTERSECT_LINE = PATH_CUBIC + 1; |
| 1040 | var INTERSECT_LINE_2 = INTERSECT_LINE + 1; |
| 1041 | var INTERSECT_LINE_NO = INTERSECT_LINE_2 + 1; |
| 1042 | var INTERSECT_QUAD_LINE = INTERSECT_LINE_NO + 1; |
| 1043 | var INTERSECT_QUAD_LINE_2 = INTERSECT_QUAD_LINE + 1; |
| 1044 | var INTERSECT_QUAD_LINE_NO = INTERSECT_QUAD_LINE_2 + 1; |
| 1045 | var INTERSECT_QUAD = INTERSECT_QUAD_LINE_NO + 1; |
| 1046 | var INTERSECT_QUAD_2 = INTERSECT_QUAD + 1; |
| 1047 | var INTERSECT_QUAD_NO = INTERSECT_QUAD_2 + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1048 | var INTERSECT_CONIC_LINE = INTERSECT_QUAD_NO + 1; |
| 1049 | var INTERSECT_CONIC_LINE_2 = INTERSECT_CONIC_LINE + 1; |
| 1050 | var INTERSECT_CONIC_LINE_NO = INTERSECT_CONIC_LINE_2 + 1; |
| 1051 | var INTERSECT_CONIC = INTERSECT_CONIC_LINE_NO + 1; |
| 1052 | var INTERSECT_CONIC_2 = INTERSECT_CONIC + 1; |
| 1053 | var INTERSECT_CONIC_NO = INTERSECT_CONIC_2 + 1; |
| 1054 | var INTERSECT_SELF_CUBIC = INTERSECT_CONIC_NO + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1055 | var INTERSECT_SELF_CUBIC_NO = INTERSECT_SELF_CUBIC + 1; |
| 1056 | var INTERSECT_CUBIC_LINE = INTERSECT_SELF_CUBIC_NO + 1; |
| 1057 | var INTERSECT_CUBIC_LINE_2 = INTERSECT_CUBIC_LINE + 1; |
| 1058 | var INTERSECT_CUBIC_LINE_3 = INTERSECT_CUBIC_LINE_2 + 1; |
| 1059 | var INTERSECT_CUBIC_LINE_NO = INTERSECT_CUBIC_LINE_3 + 1; |
| 1060 | var INTERSECT_CUBIC_QUAD = INTERSECT_CUBIC_LINE_NO + 1; |
| 1061 | var INTERSECT_CUBIC_QUAD_2 = INTERSECT_CUBIC_QUAD + 1; |
| 1062 | var INTERSECT_CUBIC_QUAD_3 = INTERSECT_CUBIC_QUAD_2 + 1; |
| 1063 | var INTERSECT_CUBIC_QUAD_4 = INTERSECT_CUBIC_QUAD_3 + 1; |
| 1064 | var INTERSECT_CUBIC_QUAD_NO = INTERSECT_CUBIC_QUAD_4 + 1; |
| 1065 | var INTERSECT_CUBIC = INTERSECT_CUBIC_QUAD_NO + 1; |
| 1066 | var INTERSECT_CUBIC_2 = INTERSECT_CUBIC + 1; |
| 1067 | var INTERSECT_CUBIC_3 = INTERSECT_CUBIC_2 + 1; |
| 1068 | var INTERSECT_CUBIC_4 = INTERSECT_CUBIC_3 + 1; |
| 1069 | // FIXME: add cubic 5- 9 |
| 1070 | var INTERSECT_CUBIC_NO = INTERSECT_CUBIC_4 + 1; |
| 1071 | |
| 1072 | var SORT_UNARY = INTERSECT_CUBIC_NO + 1; |
| 1073 | var SORT_BINARY = SORT_UNARY + 1; |
| 1074 | |
| 1075 | var OP_DIFFERENCE = SORT_BINARY + 1; |
| 1076 | var OP_INTERSECT = OP_DIFFERENCE + 1; |
| 1077 | var OP_UNION = OP_INTERSECT + 1; |
| 1078 | var OP_XOR = OP_UNION + 1; |
| 1079 | |
| 1080 | var MARK_LINE = OP_XOR + 1; |
| 1081 | var MARK_QUAD = MARK_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1082 | var MARK_CONIC = MARK_QUAD + 1; |
| 1083 | var MARK_CUBIC = MARK_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1084 | var MARK_DONE_LINE = MARK_CUBIC + 1; |
| 1085 | var MARK_DONE_QUAD = MARK_DONE_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1086 | var MARK_DONE_CONIC = MARK_DONE_QUAD + 1; |
| 1087 | var MARK_DONE_CUBIC = MARK_DONE_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1088 | var MARK_UNSORTABLE_LINE = MARK_DONE_CUBIC + 1; |
| 1089 | var MARK_UNSORTABLE_QUAD = MARK_UNSORTABLE_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1090 | var MARK_UNSORTABLE_CONIC = MARK_UNSORTABLE_QUAD + 1; |
| 1091 | var MARK_UNSORTABLE_CUBIC = MARK_UNSORTABLE_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1092 | var MARK_SIMPLE_LINE = MARK_UNSORTABLE_CUBIC + 1; |
| 1093 | var MARK_SIMPLE_QUAD = MARK_SIMPLE_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1094 | var MARK_SIMPLE_CONIC = MARK_SIMPLE_QUAD + 1; |
| 1095 | var MARK_SIMPLE_CUBIC = MARK_SIMPLE_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1096 | var MARK_SIMPLE_DONE_LINE = MARK_SIMPLE_CUBIC + 1; |
| 1097 | var MARK_SIMPLE_DONE_QUAD = MARK_SIMPLE_DONE_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1098 | var MARK_SIMPLE_DONE_CONIC = MARK_SIMPLE_DONE_QUAD + 1; |
| 1099 | var MARK_SIMPLE_DONE_CUBIC = MARK_SIMPLE_DONE_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1100 | var MARK_DONE_UNARY_LINE = MARK_SIMPLE_DONE_CUBIC + 1; |
| 1101 | var MARK_DONE_UNARY_QUAD = MARK_DONE_UNARY_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1102 | var MARK_DONE_UNARY_CONIC = MARK_DONE_UNARY_QUAD + 1; |
| 1103 | var MARK_DONE_UNARY_CUBIC = MARK_DONE_UNARY_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1104 | var MARK_ANGLE_LAST = MARK_DONE_UNARY_CUBIC + 1; |
| 1105 | |
| 1106 | var COMPUTED_SET_1 = MARK_ANGLE_LAST + 1; |
| 1107 | var COMPUTED_SET_2 = COMPUTED_SET_1 + 1; |
| 1108 | |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1109 | var ANGLE_AFTER = COMPUTED_SET_2 + 1; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1110 | var ANGLE_AFTERPART = ANGLE_AFTER + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1111 | |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1112 | var ACTIVE_OP = ANGLE_AFTERPART + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1113 | |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1114 | var COIN_MAIN_SPAN = ACTIVE_OP + 1; |
| 1115 | var COIN_OPP_SPAN = COIN_MAIN_SPAN + 1; |
| 1116 | |
| 1117 | var FRAG_TYPE_LAST = COIN_OPP_SPAN; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1118 | |
| 1119 | var REC_TYPE_UNKNOWN = -1; |
| 1120 | var REC_TYPE_PATH = 0; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1121 | var REC_TYPE_PATH2 = 1; |
| 1122 | var REC_TYPE_SECT = 2; |
| 1123 | var REC_TYPE_ACTIVE = 3; |
| 1124 | var REC_TYPE_ADD = 4; |
| 1125 | var REC_TYPE_SORT = 5; |
| 1126 | var REC_TYPE_OP = 6; |
| 1127 | var REC_TYPE_MARK = 7; |
| 1128 | var REC_TYPE_COMPUTED = 8; |
| 1129 | var REC_TYPE_COIN = 9; |
| 1130 | var REC_TYPE_ANGLE = 10; |
| 1131 | var REC_TYPE_ACTIVE_OP = 11; |
| 1132 | var REC_TYPE_AFTERPART = 12; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 1133 | var REC_TYPE_TOP = 13; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1134 | var REC_TYPE_COINCIDENCE = 14; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1135 | var REC_TYPE_ALIGNED = 15; |
| 1136 | var REC_TYPE_LAST = REC_TYPE_ALIGNED; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1137 | |
| 1138 | function strs_to_nums(strs) { |
| 1139 | var result = []; |
| 1140 | for (var idx = 1; idx < strs.length; ++idx) { |
| 1141 | var str = strs[idx]; |
| 1142 | var num = parseFloat(str); |
| 1143 | if (isNaN(num)) { |
| 1144 | result.push(str); |
| 1145 | } else { |
| 1146 | result.push(num); |
| 1147 | } |
| 1148 | } |
| 1149 | return result; |
| 1150 | } |
| 1151 | |
| 1152 | function filter_str_by(id, str, regex, array) { |
| 1153 | if (regex.test(str)) { |
| 1154 | var strs = regex.exec(str); |
| 1155 | var result = strs_to_nums(strs); |
| 1156 | array.push(id); |
| 1157 | array.push(result); |
| 1158 | return true; |
| 1159 | } |
| 1160 | return false; |
| 1161 | } |
| 1162 | |
| 1163 | function construct_regexp2(pattern) { |
| 1164 | var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); |
| 1165 | escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*"); |
| 1166 | escape = escape.replace(/CUBIC_VAL/g, "\\(P_VAL P_VAL P_VAL P_VAL\\)"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1167 | escape = escape.replace(/CONIC_VAL/g, "\\(P_VAL P_VAL P_VAL W_VAL\\)"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1168 | escape = escape.replace(/QUAD_VAL/g, "\\(P_VAL P_VAL P_VAL\\)"); |
| 1169 | escape = escape.replace(/LINE_VAL/g, "\\(P_VAL P_VAL\\)"); |
| 1170 | escape = escape.replace(/FILL_TYPE/g, "SkPath::k[a-zA-Z]+_FillType"); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1171 | escape = escape.replace(/PTR_VAL/g, "0x[0-9A-F]+"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1172 | escape = escape.replace(/PT_VAL/g, "\\(P_VAL\\)"); |
| 1173 | escape = escape.replace(/P_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?, ?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?"); |
| 1174 | escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1175 | escape = escape.replace(/W_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1176 | escape = escape.replace(/PATH/g, "pathB?"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1177 | escape = escape.replace(/IDX/g, "(-?\\d+)"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1178 | escape = escape.replace(/NUM/g, "(-?\\d+)"); |
| 1179 | escape = escape.replace(/OPT/g, "(\\?|-?\\d+)"); |
| 1180 | return new RegExp(escape, 'i'); |
| 1181 | } |
| 1182 | |
| 1183 | function construct_regexp2c(pattern) { |
| 1184 | var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); |
| 1185 | escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*"); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1186 | escape = escape.replace(/CUBIC_VAL/g, "(?:\\$\\d = )?\\{\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}\\}"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1187 | escape = escape.replace(/CONIC_VAL/g, "(?:\\$\\d = )?\\{\\{\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}\\}, W_VAL\\}"); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1188 | escape = escape.replace(/QUAD_VAL/g, "(?:\\$\\d = )?\\{\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}\\}"); |
| 1189 | escape = escape.replace(/LINE_VAL/g, "(?:\\$\\d = )?\\{\\{\\{P_VAL\\}, \\{P_VAL\\}\\}\\}"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1190 | escape = escape.replace(/FILL_TYPE/g, "SkPath::k[a-zA-Z]+_FillType"); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1191 | escape = escape.replace(/PTR_VAL/g, "0x[0-9A-F]+"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1192 | escape = escape.replace(/PT_VAL/g, "\\{\\{P_VAL\\}\\}"); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1193 | escape = escape.replace(/P_VAL/g, "(?:f?[xX] = )?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?, *(?: f?[yY] = )?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1194 | escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1195 | escape = escape.replace(/W_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1196 | escape = escape.replace(/OPER/g, "[a-z]+"); |
| 1197 | escape = escape.replace(/PATH/g, "pathB?"); |
| 1198 | escape = escape.replace(/T_F/g, "([TF])"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1199 | escape = escape.replace(/IDX/g, "(-?\\d+)"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1200 | escape = escape.replace(/NUM/g, "(-?\\d+)"); |
| 1201 | escape = escape.replace(/OPT/g, "(\\?|-?\\d+)"); |
| 1202 | return new RegExp(escape, 'i'); |
| 1203 | } |
| 1204 | |
| 1205 | function match_regexp(str, lineNo, array, id, pattern) { |
| 1206 | var regex = construct_regexp2(pattern); |
| 1207 | if (filter_str_by(id, str, regex, array)) { |
| 1208 | return true; |
| 1209 | } |
| 1210 | regex = construct_regexp2c(pattern); |
| 1211 | return filter_str_by(id, str, regex, array); |
| 1212 | } |
| 1213 | |
| 1214 | function endsWith(str, suffix) { |
| 1215 | return str.indexOf(suffix, str.length - suffix.length) !== -1; |
| 1216 | } |
| 1217 | |
| 1218 | function parse_all(test) { |
| 1219 | var lines = test.match(/[^\r\n]+/g); |
| 1220 | var records = []; // a rec can be the original paths, a set of intersections, a set of active spans, a sort, or a path add |
| 1221 | var record = []; |
| 1222 | var recType = REC_TYPE_UNKNOWN; |
| 1223 | var lastLineNo; |
| 1224 | var moveX, moveY; |
| 1225 | for (var lineNo = 0; lineNo < lines.length; ++lineNo) { |
| 1226 | var line = lines[lineNo]; |
| 1227 | if (line.length == 0) { |
| 1228 | continue; |
| 1229 | } |
| 1230 | var opStart = "SkOpSegment::"; |
| 1231 | if (line.lastIndexOf(opStart, 0) === 0) { |
| 1232 | line = line.substr(opStart.length); |
| 1233 | } |
| 1234 | var angleStart = "SkOpAngle::"; |
| 1235 | if (line.lastIndexOf(angleStart, 0) === 0) { |
| 1236 | line = line.substr(angleStart.length); |
| 1237 | } |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1238 | var coinStart = "SkOpCoincidence::"; |
| 1239 | if (line.lastIndexOf(coinStart, 0) === 0) { |
| 1240 | line = line.substr(coinStart.length); |
| 1241 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1242 | var type = line.lastIndexOf("debugShowActiveSpans", 0) === 0 ? REC_TYPE_ACTIVE |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1243 | : line.lastIndexOf("debugShowCoincidence", 0) === 0 ? REC_TYPE_COINCIDENCE |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1244 | : line.lastIndexOf("((SkOpSegment*)", 0) === 0 ? REC_TYPE_PATH2 |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1245 | : line.lastIndexOf("debugShowTs", 0) === 0 ? REC_TYPE_COIN |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1246 | : line.lastIndexOf("afterPart", 0) === 0 ? REC_TYPE_AFTERPART |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1247 | : line.lastIndexOf("debugShow", 0) === 0 ? REC_TYPE_SECT |
| 1248 | : line.lastIndexOf("activeOp", 0) === 0 ? REC_TYPE_ACTIVE_OP |
| 1249 | : line.lastIndexOf("computed", 0) === 0 ? REC_TYPE_COMPUTED |
| 1250 | : line.lastIndexOf("debugOne", 0) === 0 ? REC_TYPE_SORT |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1251 | : line.lastIndexOf("aligned=", 0) === 0 ? REC_TYPE_ALIGNED |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1252 | : line.lastIndexOf("dumpOne", 0) === 0 ? REC_TYPE_SORT |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 1253 | : line.lastIndexOf("findTop", 0) === 0 ? REC_TYPE_TOP |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1254 | : line.lastIndexOf("pathB.", 0) === 0 ? REC_TYPE_ADD |
| 1255 | : line.lastIndexOf("path.", 0) === 0 ? REC_TYPE_ADD |
| 1256 | : line.lastIndexOf("after", 0) === 0 ? REC_TYPE_ANGLE |
| 1257 | : line.lastIndexOf("mark", 0) === 0 ? REC_TYPE_MARK |
| 1258 | : line.lastIndexOf(" {{", 0) === 0 ? REC_TYPE_COMPUTED |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1259 | : line.lastIndexOf("seg=", 0) === 0 ? REC_TYPE_PATH |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1260 | : line.lastIndexOf("op", 0) === 0 ? REC_TYPE_OP |
| 1261 | : line.lastIndexOf("$", 0) === 0 ? REC_TYPE_PATH |
| 1262 | : REC_TYPE_UNKNOWN; |
| 1263 | if (recType != type || recType == REC_TYPE_ADD || recType == REC_TYPE_SECT |
| 1264 | || recType == REC_TYPE_ACTIVE_OP || recType == REC_TYPE_ANGLE) { |
| 1265 | if (recType != REC_TYPE_UNKNOWN) { |
| 1266 | records.push(recType); |
| 1267 | records.push(lastLineNo); |
| 1268 | records.push(record); |
| 1269 | } |
| 1270 | record = []; |
| 1271 | recType = type; |
| 1272 | lastLineNo = lineNo; |
| 1273 | } |
| 1274 | var found = false; |
| 1275 | switch (recType) { |
| 1276 | case REC_TYPE_ACTIVE: |
| 1277 | found = match_regexp(line, lineNo, record, ACTIVE_LINE_SPAN, "debugShowActiveSpans" + |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1278 | " id=IDX LINE_VAL t=T_VAL PT_VAL tEnd=T_VAL windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1279 | ) || match_regexp(line, lineNo, record, ACTIVE_QUAD_SPAN, "debugShowActiveSpans" + |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1280 | " id=IDX QUAD_VAL t=T_VAL PT_VAL tEnd=T_VAL windSum=OPT windValue=IDX" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1281 | ) || match_regexp(line, lineNo, record, ACTIVE_CONIC_SPAN, "debugShowActiveSpans" + |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1282 | " id=IDX CONIC_VAL t=T_VAL PT_VAL tEnd=T_VAL windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1283 | ) || match_regexp(line, lineNo, record, ACTIVE_CUBIC_SPAN, "debugShowActiveSpans" + |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1284 | " id=IDX CUBIC_VAL t=T_VAL PT_VAL tEnd=T_VAL windSum=OPT windValue=IDX" |
| 1285 | ) || match_regexp(line, lineNo, record, ACTIVE_LINE_SPAN, "debugShowActiveSpans" + |
| 1286 | " id=IDX LINE_VAL t=T_VAL PT_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM" |
| 1287 | ) || match_regexp(line, lineNo, record, ACTIVE_QUAD_SPAN, "debugShowActiveSpans" + |
| 1288 | " id=IDX QUAD_VAL t=T_VAL PT_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM" |
| 1289 | ) || match_regexp(line, lineNo, record, ACTIVE_CONIC_SPAN, "debugShowActiveSpans" + |
| 1290 | " id=IDX CONIC_VAL t=T_VAL PT_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM" |
| 1291 | ) || match_regexp(line, lineNo, record, ACTIVE_CUBIC_SPAN, "debugShowActiveSpans" + |
| 1292 | " id=IDX CUBIC_VAL t=T_VAL PT_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1293 | ); |
| 1294 | break; |
| 1295 | case REC_TYPE_ACTIVE_OP: |
| 1296 | found = match_regexp(line, lineNo, record, ACTIVE_OP, "activeOp" + |
| 1297 | " id=IDX t=T_VAL tEnd=T_VAL op=OPER miFrom=NUM miTo=NUM suFrom=NUM suTo=NUM result=IDX" |
| 1298 | ); |
| 1299 | break; |
| 1300 | case REC_TYPE_ADD: |
| 1301 | if (match_regexp(line, lineNo, record, ADD_MOVETO, "PATH.moveTo(P_VAL);")) { |
| 1302 | moveX = record[1][0]; |
| 1303 | moveY = record[1][1]; |
| 1304 | found = true; |
| 1305 | } else if (match_regexp(line, lineNo, record, ADD_LINETO, "PATH.lineTo(P_VAL);")) { |
| 1306 | record[1].unshift(moveY); |
| 1307 | record[1].unshift(moveX); |
| 1308 | moveX = record[1][2]; |
| 1309 | moveY = record[1][3]; |
| 1310 | found = true; |
| 1311 | } else if (match_regexp(line, lineNo, record, ADD_QUADTO, "PATH.quadTo(P_VAL, P_VAL);")) { |
| 1312 | record[1].unshift(moveY); |
| 1313 | record[1].unshift(moveX); |
| 1314 | moveX = record[1][4]; |
| 1315 | moveY = record[1][5]; |
| 1316 | found = true; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1317 | } else if (match_regexp(line, lineNo, record, ADD_CONICTO, "PATH.conicTo(P_VAL, P_VAL, T_VAL);")) { |
| 1318 | record[1].unshift(moveY); |
| 1319 | record[1].unshift(moveX); |
| 1320 | moveX = record[1][4]; |
| 1321 | moveY = record[1][5]; |
| 1322 | found = true; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1323 | } else if (match_regexp(line, lineNo, record, ADD_CUBICTO, "PATH.cubicTo(P_VAL, P_VAL, P_VAL);")) { |
| 1324 | record[1].unshift(moveY); |
| 1325 | record[1].unshift(moveX); |
| 1326 | moveX = record[1][6]; |
| 1327 | moveY = record[1][7]; |
| 1328 | found = true; |
| 1329 | } else if (match_regexp(line, lineNo, record, ADD_FILL, "PATH.setFillType(FILL_TYPE);")) { |
| 1330 | found = true; |
| 1331 | } else { |
| 1332 | found = match_regexp(line, lineNo, record, ADD_CLOSE, "PATH.close();"); |
| 1333 | } |
| 1334 | break; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1335 | case REC_TYPE_AFTERPART: |
| 1336 | found = match_regexp(line, lineNo, record, PATH_LINE, "afterPart LINE_VAL") |
| 1337 | || match_regexp(line, lineNo, record, PATH_QUAD, "afterPart QUAD_VAL") |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1338 | || match_regexp(line, lineNo, record, PATH_CONIC, "afterPart CONIC_VAL") |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1339 | || match_regexp(line, lineNo, record, PATH_CUBIC, "afterPart CUBIC_VAL") |
| 1340 | break; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1341 | case REC_TYPE_ALIGNED: |
| 1342 | found = match_regexp(line, lineNo, record, PATH_LINE, "aligned=IDX LINE_VAL" |
| 1343 | ) || match_regexp(line, lineNo, record, PATH_QUAD, "aligned=IDX QUAD_VAL" |
| 1344 | ) || match_regexp(line, lineNo, record, PATH_CONIC, "aligned=IDX CONIC_VAL" |
| 1345 | ) || match_regexp(line, lineNo, record, PATH_CUBIC, "aligned=IDX CUBIC_VAL" |
| 1346 | ); |
| 1347 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1348 | case REC_TYPE_ANGLE: |
| 1349 | found = match_regexp(line, lineNo, record, ANGLE_AFTER, "after " + |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1350 | "[IDX/IDX] NUM/NUM tStart=T_VAL tEnd=T_VAL < [IDX/IDX] NUM/NUM tStart=T_VAL tEnd=T_VAL < [IDX/IDX] NUM/NUM tStart=T_VAL tEnd=T_VAL T_F IDX"); |
| 1351 | break; |
| 1352 | case REC_TYPE_COIN: |
| 1353 | found = true; |
| 1354 | break; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1355 | case REC_TYPE_COINCIDENCE: |
| 1356 | found = match_regexp(line, lineNo, record, COIN_MAIN_SPAN, "debugShowCoincidence" + |
| 1357 | " + id=IDX t=T_VAL tEnd=T_VAL" |
| 1358 | ) || match_regexp(line, lineNo, record, COIN_OPP_SPAN, "debugShowCoincidence" + |
| 1359 | " - id=IDX t=T_VAL tEnd=T_VAL" |
| 1360 | ); |
| 1361 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1362 | case REC_TYPE_COMPUTED: |
| 1363 | found = line == "computed quadratics given" |
| 1364 | || match_regexp(line, lineNo, record, COMPUTED_SET_1, "computed quadratics set 1" |
| 1365 | ) || match_regexp(line, lineNo, record, COMPUTED_SET_2, "computed quadratics set 2" |
| 1366 | ) || match_regexp(line, lineNo, record, PATH_QUAD, " QUAD_VAL," |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1367 | ) || match_regexp(line, lineNo, record, PATH_CONIC, " CONIC_VAL," |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1368 | ) || match_regexp(line, lineNo, record, PATH_CUBIC, " CUBIC_VAL," |
| 1369 | ); |
| 1370 | break; |
| 1371 | case REC_TYPE_PATH: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1372 | found = match_regexp(line, lineNo, record, PATH_LINE, "seg=IDX LINE_VAL" |
| 1373 | ) || match_regexp(line, lineNo, record, PATH_QUAD, "seg=IDX QUAD_VAL" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1374 | ) || match_regexp(line, lineNo, record, PATH_CONIC, "seg=IDX CONIC_VAL" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1375 | ) || match_regexp(line, lineNo, record, PATH_CUBIC, "seg=IDX CUBIC_VAL" |
| 1376 | ); |
| 1377 | break; |
| 1378 | case REC_TYPE_PATH2: |
| 1379 | found = match_regexp(line, lineNo, record, PATH_LINE, "((SkOpSegment*) PTR_VAL) [IDX] {LINE_VAL}" |
| 1380 | ) || match_regexp(line, lineNo, record, PATH_QUAD, "((SkOpSegment*) PTR_VAL) [IDX] {QUAD_VAL}" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1381 | ) || match_regexp(line, lineNo, record, PATH_CONIC, "((SkOpSegment*) PTR_VAL) [IDX] {CONIC_VAL}" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1382 | ) || match_regexp(line, lineNo, record, PATH_CUBIC, "((SkOpSegment*) PTR_VAL) [IDX] {CUBIC_VAL}" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1383 | ); |
| 1384 | break; |
| 1385 | case REC_TYPE_SECT: |
| 1386 | found = match_regexp(line, lineNo, record, INTERSECT_LINE, "debugShowLineIntersection" + |
| 1387 | " wtTs[0]=T_VAL LINE_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1388 | ) || match_regexp(line, lineNo, record, INTERSECT_LINE_2, "debugShowLineIntersection" + |
| 1389 | " wtTs[0]=T_VAL LINE_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1390 | ) || match_regexp(line, lineNo, record, INTERSECT_LINE_NO, "debugShowLineIntersection" + |
| 1391 | " no intersect LINE_VAL LINE_VAL" |
| 1392 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE, "debugShowQuadLineIntersection" + |
| 1393 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1394 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE_2, "debugShowQuadLineIntersection" + |
| 1395 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1396 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE_NO, "debugShowQuadLineIntersection" + |
| 1397 | " no intersect QUAD_VAL LINE_VAL" |
| 1398 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD, "debugShowQuadIntersection" + |
| 1399 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL" |
| 1400 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_2, "debugShowQuadIntersection" + |
| 1401 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL" |
| 1402 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_NO, "debugShowQuadIntersection" + |
| 1403 | " no intersect QUAD_VAL QUAD_VAL" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1404 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_LINE, "debugShowConicLineIntersection" + |
| 1405 | " wtTs[0]=T_VAL CONIC_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1406 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_LINE_2, "debugShowConicLineIntersection" + |
| 1407 | " wtTs[0]=T_VAL CONIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1408 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_LINE_NO, "debugShowConicLineIntersection" + |
| 1409 | " no intersect CONIC_VAL LINE_VAL" |
| 1410 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC, "debugShowConicIntersection" + |
| 1411 | " wtTs[0]=T_VAL CONIC_VAL PT_VAL wnTs[0]=T_VAL CONIC_VAL" |
| 1412 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_2, "debugShowConicIntersection" + |
| 1413 | " wtTs[0]=T_VAL CONIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL CONIC_VAL wnTs[1]=T_VAL" |
| 1414 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_NO, "debugShowConicIntersection" + |
| 1415 | " no intersect CONIC_VAL CONIC_VAL" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1416 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE, "debugShowCubicLineIntersection" + |
| 1417 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1418 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_2, "debugShowCubicLineIntersection" + |
| 1419 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1420 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_3, "debugShowCubicLineIntersection" + |
| 1421 | " 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" |
| 1422 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_NO, "debugShowCubicLineIntersection" + |
| 1423 | " no intersect CUBIC_VAL LINE_VAL" |
| 1424 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD, "debugShowCubicQuadIntersection" + |
| 1425 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL" |
| 1426 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_2, "debugShowCubicQuadIntersection" + |
| 1427 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL" |
| 1428 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_3, "debugShowCubicQuadIntersection" + |
| 1429 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wtTs[2]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL" |
| 1430 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_4, "debugShowCubicQuadIntersection" + |
| 1431 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wtTs[2]=T_VAL wtTs[3]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL wnTs[3]=T_VAL" |
| 1432 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_NO, "debugShowCubicQuadIntersection" + |
| 1433 | " no intersect CUBIC_VAL QUAD_VAL" |
| 1434 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC, "debugShowCubicIntersection" + |
| 1435 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL" |
| 1436 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_2, "debugShowCubicIntersection" + |
| 1437 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL wnTs[1]=T_VAL" |
| 1438 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_3, "debugShowCubicIntersection" + |
| 1439 | " 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" |
| 1440 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_4, "debugShowCubicIntersection" + |
| 1441 | " 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" |
| 1442 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_NO, "debugShowCubicIntersection" + |
| 1443 | " no intersect CUBIC_VAL CUBIC_VAL" |
| 1444 | ) || match_regexp(line, lineNo, record, INTERSECT_SELF_CUBIC, "debugShowCubicIntersection" + |
| 1445 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL" |
| 1446 | ) || match_regexp(line, lineNo, record, INTERSECT_SELF_CUBIC_NO, "debugShowCubicIntersection" + |
| 1447 | " no self intersect CUBIC_VAL" |
| 1448 | ); |
| 1449 | break; |
| 1450 | case REC_TYPE_SORT: |
| 1451 | var hasDone = / done/.test(line); |
| 1452 | var hasUnorderable = / unorderable/.test(line); |
| 1453 | var hasSmall = / small/.test(line); |
| 1454 | var hasTiny = / tiny/.test(line); |
| 1455 | var hasOperand = / operand/.test(line); |
| 1456 | var hasStop = / stop/.test(line); |
| 1457 | line.replace(/[ a-z]+$/, ""); |
| 1458 | found = match_regexp(line, lineNo, record, SORT_UNARY, "debugOne" + |
| 1459 | " [IDX/IDX] next=IDX/IDX sect=IDX/IDX s=T_VAL [IDX] e=T_VAL [IDX] sgn=NUM windVal=IDX windSum=OPT" |
| 1460 | ) || match_regexp(line, lineNo, record, SORT_BINARY, "debugOne" + |
| 1461 | " [IDX/IDX] next=IDX/IDX sect=IDX/IDX s=T_VAL [IDX] e=T_VAL [IDX] sgn=NUM windVal=IDX windSum=OPT oppVal=IDX oppSum=OPT" |
| 1462 | ) || match_regexp(line, lineNo, record, SORT_UNARY, "dumpOne" + |
| 1463 | " [IDX/IDX] next=IDX/IDX sect=NUM/NUM s=T_VAL [IDX] e=T_VAL [IDX] sgn=NUM windVal=IDX windSum=OPT" |
| 1464 | ) || match_regexp(line, lineNo, record, SORT_BINARY, "dumpOne" + |
| 1465 | " [IDX/IDX] next=IDX/IDX sect=NUM/NUM s=T_VAL [IDX] e=T_VAL [IDX] sgn=NUM windVal=IDX windSum=OPT oppVal=IDX oppSum=OPT" |
| 1466 | ); |
| 1467 | if (found) { |
| 1468 | record[1].push(hasDone); |
| 1469 | record[1].push(hasUnorderable); |
| 1470 | record[1].push(hasSmall); |
| 1471 | record[1].push(hasTiny); |
| 1472 | record[1].push(hasOperand); |
| 1473 | record[1].push(hasStop); |
| 1474 | } |
| 1475 | break; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 1476 | case REC_TYPE_TOP: |
| 1477 | found = match_regexp(line, lineNo, record, ACTIVE_OP, "findTop" + |
| 1478 | " id=IDX s=T_VAL e=T_VAL cw=NUM swap=NUM inflections=NUM monotonic=NUM" |
| 1479 | ) || match_regexp(line, lineNo, record, ACTIVE_OP, "findTop" + |
| 1480 | " id=IDX s=T_VAL e=T_VAL (-) cw=NUM swap=NUM inflections=NUM monotonic=NUM" |
| 1481 | ) || match_regexp(line, lineNo, record, ACTIVE_OP, "findTop" + |
| 1482 | " id=IDX s=T_VAL e=T_VAL (+) cw=NUM swap=NUM inflections=NUM monotonic=NUM" |
| 1483 | ); |
| 1484 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1485 | case REC_TYPE_MARK: |
| 1486 | found = match_regexp(line, lineNo, record, MARK_LINE, "markWinding" + |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1487 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1488 | ) || match_regexp(line, lineNo, record, MARK_QUAD, "markWinding" + |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1489 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1490 | ) || match_regexp(line, lineNo, record, MARK_CONIC, "markWinding" + |
| 1491 | " id=IDX CONIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1492 | ) || match_regexp(line, lineNo, record, MARK_CUBIC, "markWinding" + |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1493 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX" |
| 1494 | ) || match_regexp(line, lineNo, record, MARK_DONE_LINE, "markDone" + |
| 1495 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=OPT newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX oppValue=OPT" |
| 1496 | ) || match_regexp(line, lineNo, record, MARK_DONE_QUAD, "markDone" + |
| 1497 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=OPT newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX oppValue=OPT" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1498 | ) || match_regexp(line, lineNo, record, MARK_DONE_CONIC, "markDone" + |
| 1499 | " id=IDX CONIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=OPT newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX oppValue=OPT" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1500 | ) || match_regexp(line, lineNo, record, MARK_DONE_CUBIC, "markDone" + |
| 1501 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=OPT newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX oppValue=OPT" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1502 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_LINE, "markWinding" + |
| 1503 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1504 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_QUAD, "markWinding" + |
| 1505 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1506 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_CONIC, "markWinding" + |
| 1507 | " id=IDX CONIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1508 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_CUBIC, "markWinding" + |
| 1509 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1510 | ) || match_regexp(line, lineNo, record, MARK_ANGLE_LAST, "markAngle" + |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1511 | " last segment=IDX span=IDX" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1512 | ) || match_regexp(line, lineNo, record, MARK_ANGLE_LAST, "markAngle" + |
| 1513 | " last segment=IDX span=IDX windSum=OPT"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1514 | break; |
| 1515 | case REC_TYPE_OP: |
| 1516 | if (line.lastIndexOf("oppSign oppSign=", 0) === 0 |
| 1517 | || line.lastIndexOf("operator<", 0) === 0) { |
| 1518 | found = true; |
| 1519 | break; |
| 1520 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1521 | found = match_regexp(line, lineNo, record, OP_DIFFERENCE, "op diff" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1522 | ) || match_regexp(line, lineNo, record, OP_INTERSECT, "op intersect" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1523 | ) || match_regexp(line, lineNo, record, OP_INTERSECT, "op sect" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1524 | ) || match_regexp(line, lineNo, record, OP_UNION, "op union" |
| 1525 | ) || match_regexp(line, lineNo, record, OP_XOR, "op xor" |
| 1526 | ); |
| 1527 | break; |
| 1528 | case REC_TYPE_UNKNOWN: |
| 1529 | found = true; |
| 1530 | break; |
| 1531 | } |
| 1532 | if (!found) { |
| 1533 | console.log(line + " [" + lineNo + "] of type " + type + " not found"); |
| 1534 | } |
| 1535 | } |
| 1536 | if (recType != REC_TYPE_UNKNOWN) { |
| 1537 | records.push(recType); |
| 1538 | records.push(lastLineNo); |
| 1539 | records.push(record); |
| 1540 | } |
| 1541 | if (records.length >= 1) { |
| 1542 | tests[testIndex] = records; |
| 1543 | testLines[testIndex] = lines; |
| 1544 | } |
| 1545 | } |
| 1546 | |
| 1547 | function init(test) { |
| 1548 | var canvas = document.getElementById('canvas'); |
| 1549 | if (!canvas.getContext) return; |
| 1550 | ctx = canvas.getContext('2d'); |
| 1551 | var resScale = retina_scale && window.devicePixelRatio ? window.devicePixelRatio : 1; |
| 1552 | var unscaledWidth = window.innerWidth - 20; |
| 1553 | var unscaledHeight = window.innerHeight - 20; |
| 1554 | screenWidth = unscaledWidth; |
| 1555 | screenHeight = unscaledHeight; |
| 1556 | canvas.width = unscaledWidth * resScale; |
| 1557 | canvas.height = unscaledHeight * resScale; |
| 1558 | canvas.style.width = unscaledWidth + 'px'; |
| 1559 | canvas.style.height = unscaledHeight + 'px'; |
| 1560 | if (resScale != 1) { |
| 1561 | ctx.scale(resScale, resScale); |
| 1562 | } |
| 1563 | xmin = Infinity; |
| 1564 | xmax = -Infinity; |
| 1565 | ymin = Infinity; |
| 1566 | ymax = -Infinity; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1567 | hasPath = hasAlignedPath = hasComputedPath = false; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1568 | firstActiveSpan = -1; |
| 1569 | for (var tIndex = 0; tIndex < test.length; tIndex += 3) { |
| 1570 | var recType = test[tIndex]; |
| 1571 | if (!typeof recType == 'number' || recType < REC_TYPE_UNKNOWN || recType > REC_TYPE_LAST) { |
| 1572 | console.log("unknown rec type: " + recType); |
| 1573 | throw "stop execution"; |
| 1574 | } |
| 1575 | var records = test[tIndex + 2]; |
| 1576 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 1577 | var fragType = records[recordIndex]; |
| 1578 | if (!typeof fragType == 'number' || fragType < 1 || fragType > FRAG_TYPE_LAST) { |
| 1579 | console.log("unknown in range frag type: " + fragType); |
| 1580 | throw "stop execution"; |
| 1581 | } |
| 1582 | var frags = records[recordIndex + 1]; |
| 1583 | var first = 0; |
| 1584 | var last = -1; |
| 1585 | var first2 = 0; |
| 1586 | var last2 = 0; |
| 1587 | switch (recType) { |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1588 | case REC_TYPE_ALIGNED: |
| 1589 | hasAlignedPath = true; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1590 | case REC_TYPE_COMPUTED: |
| 1591 | if (fragType == COMPUTED_SET_1 || fragType == COMPUTED_SET_2) { |
| 1592 | break; |
| 1593 | } |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1594 | if (REC_TYPE_COMPUTED == recType) { |
| 1595 | hasComputedPath = true; |
| 1596 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1597 | case REC_TYPE_PATH: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1598 | first = 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1599 | switch (fragType) { |
| 1600 | case PATH_LINE: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1601 | last = 5; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1602 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1603 | case PATH_CONIC: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1604 | case PATH_QUAD: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1605 | last = 7; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1606 | break; |
| 1607 | case PATH_CUBIC: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1608 | last = 9; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1609 | break; |
| 1610 | default: |
| 1611 | console.log("unknown " + (recType == REC_TYPE_PATH ? "REC_TYPE_PATH" |
| 1612 | : "REC_TYPE_COMPUTED") + " frag type:" + fragType); |
| 1613 | throw "stop execution"; |
| 1614 | } |
| 1615 | if (recType == REC_TYPE_PATH) { |
| 1616 | hasPath = true; |
| 1617 | } |
| 1618 | break; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1619 | case REC_TYPE_PATH2: |
| 1620 | first = 1; |
| 1621 | switch (fragType) { |
| 1622 | case PATH_LINE: |
| 1623 | last = 5; |
| 1624 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1625 | case PATH_CONIC: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1626 | case PATH_QUAD: |
| 1627 | last = 7; |
| 1628 | break; |
| 1629 | case PATH_CUBIC: |
| 1630 | last = 9; |
| 1631 | break; |
| 1632 | default: |
| 1633 | console.log("unknown " + (recType == REC_TYPE_PATH2 ? "REC_TYPE_PATH2" |
| 1634 | : "REC_TYPE_COMPUTED") + " frag type:" + fragType); |
| 1635 | throw "stop execution"; |
| 1636 | } |
| 1637 | if (recType == REC_TYPE_PATH2) { |
| 1638 | hasPath = true; |
| 1639 | } |
| 1640 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1641 | case REC_TYPE_ACTIVE: |
| 1642 | if (firstActiveSpan < 0) { |
| 1643 | firstActiveSpan = tIndex; |
| 1644 | } |
| 1645 | first = 1; |
| 1646 | switch (fragType) { |
| 1647 | case ACTIVE_LINE_SPAN: |
| 1648 | last = 5; |
| 1649 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1650 | case ACTIVE_CONIC_SPAN: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1651 | case ACTIVE_QUAD_SPAN: |
| 1652 | last = 7; |
| 1653 | break; |
| 1654 | case ACTIVE_CUBIC_SPAN: |
| 1655 | last = 9; |
| 1656 | break; |
| 1657 | default: |
| 1658 | console.log("unknown REC_TYPE_ACTIVE frag type: " + fragType); |
| 1659 | throw "stop execution"; |
| 1660 | } |
| 1661 | break; |
| 1662 | case REC_TYPE_ADD: |
| 1663 | switch (fragType) { |
| 1664 | case ADD_MOVETO: |
| 1665 | break; |
| 1666 | case ADD_LINETO: |
| 1667 | last = 4; |
| 1668 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1669 | case ADD_CONICTO: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1670 | case ADD_QUADTO: |
| 1671 | last = 6; |
| 1672 | break; |
| 1673 | case ADD_CUBICTO: |
| 1674 | last = 8; |
| 1675 | break; |
| 1676 | case ADD_CLOSE: |
| 1677 | case ADD_FILL: |
| 1678 | break; |
| 1679 | default: |
| 1680 | console.log("unknown REC_TYPE_ADD frag type: " + fragType); |
| 1681 | throw "stop execution"; |
| 1682 | } |
| 1683 | break; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1684 | case REC_TYPE_AFTERPART: |
| 1685 | switch (fragType) { |
| 1686 | case PATH_LINE: |
| 1687 | last = 4; |
| 1688 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1689 | case PATH_CONIC: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1690 | case PATH_QUAD: |
| 1691 | last = 6; |
| 1692 | break; |
| 1693 | case PATH_CUBIC: |
| 1694 | last = 8; |
| 1695 | break; |
| 1696 | default: |
| 1697 | console.log("unknown REC_TYPE_ACTIVEPART frag type: " + fragType); |
| 1698 | throw "stop execution"; |
| 1699 | } |
| 1700 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1701 | case REC_TYPE_SECT: |
| 1702 | switch (fragType) { |
| 1703 | case INTERSECT_LINE: |
| 1704 | first = 1; last = 5; first2 = 8; last2 = 12; |
| 1705 | break; |
| 1706 | case INTERSECT_LINE_2: |
| 1707 | first = 1; last = 5; first2 = 11; last2 = 15; |
| 1708 | break; |
| 1709 | case INTERSECT_LINE_NO: |
| 1710 | first = 0; last = 4; first2 = 4; last2 = 8; |
| 1711 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1712 | case INTERSECT_CONIC_LINE: |
| 1713 | first = 1; last = 7; first2 = 11; last2 = 15; |
| 1714 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1715 | case INTERSECT_QUAD_LINE: |
| 1716 | first = 1; last = 7; first2 = 10; last2 = 14; |
| 1717 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1718 | case INTERSECT_CONIC_LINE_2: |
| 1719 | first = 1; last = 7; first2 = 14; last2 = 18; |
| 1720 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1721 | case INTERSECT_QUAD_LINE_2: |
| 1722 | first = 1; last = 7; first2 = 13; last2 = 17; |
| 1723 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1724 | case INTERSECT_CONIC_LINE_NO: |
| 1725 | first = 0; last = 6; first2 = 7; last2 = 11; |
| 1726 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1727 | case INTERSECT_QUAD_LINE_NO: |
| 1728 | first = 0; last = 6; first2 = 6; last2 = 10; |
| 1729 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1730 | case INTERSECT_CONIC: |
| 1731 | first = 1; last = 7; first2 = 11; last2 = 17; |
| 1732 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1733 | case INTERSECT_QUAD: |
| 1734 | first = 1; last = 7; first2 = 10; last2 = 16; |
| 1735 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1736 | case INTERSECT_CONIC_2: |
| 1737 | first = 1; last = 7; first2 = 14; last2 = 20; |
| 1738 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1739 | case INTERSECT_QUAD_2: |
| 1740 | first = 1; last = 7; first2 = 13; last2 = 19; |
| 1741 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1742 | case INTERSECT_CONIC_NO: |
| 1743 | first = 0; last = 6; first2 = 7; last2 = 13; |
| 1744 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1745 | case INTERSECT_QUAD_NO: |
| 1746 | first = 0; last = 6; first2 = 6; last2 = 12; |
| 1747 | break; |
| 1748 | case INTERSECT_SELF_CUBIC: |
| 1749 | first = 1; last = 9; |
| 1750 | break; |
| 1751 | case INTERSECT_SELF_CUBIC_NO: |
| 1752 | first = 0; last = 8; |
| 1753 | break; |
| 1754 | case INTERSECT_CUBIC_LINE: |
| 1755 | first = 1; last = 9; first2 = 12; last2 = 16; |
| 1756 | break; |
| 1757 | case INTERSECT_CUBIC_LINE_2: |
| 1758 | first = 1; last = 9; first2 = 15; last2 = 19; |
| 1759 | break; |
| 1760 | case INTERSECT_CUBIC_LINE_3: |
| 1761 | first = 1; last = 9; first2 = 18; last2 = 22; |
| 1762 | break; |
| 1763 | case INTERSECT_CUBIC_LINE_NO: |
| 1764 | first = 0; last = 8; first2 = 8; last2 = 12; |
| 1765 | break; |
| 1766 | case INTERSECT_CUBIC_QUAD: |
| 1767 | first = 1; last = 9; first2 = 12; last2 = 18; |
| 1768 | break; |
| 1769 | case INTERSECT_CUBIC_QUAD_2: |
| 1770 | first = 1; last = 9; first2 = 15; last2 = 21; |
| 1771 | break; |
| 1772 | case INTERSECT_CUBIC_QUAD_3: |
| 1773 | first = 1; last = 9; first2 = 18; last2 = 24; |
| 1774 | break; |
| 1775 | case INTERSECT_CUBIC_QUAD_4: |
| 1776 | first = 1; last = 9; first2 = 21; last2 = 27; |
| 1777 | break; |
| 1778 | case INTERSECT_CUBIC_QUAD_NO: |
| 1779 | first = 0; last = 8; first2 = 8; last2 = 14; |
| 1780 | break; |
| 1781 | case INTERSECT_CUBIC: |
| 1782 | first = 1; last = 9; first2 = 12; last2 = 20; |
| 1783 | break; |
| 1784 | case INTERSECT_CUBIC_2: |
| 1785 | first = 1; last = 9; first2 = 15; last2 = 23; |
| 1786 | break; |
| 1787 | case INTERSECT_CUBIC_3: |
| 1788 | first = 1; last = 9; first2 = 18; last2 = 26; |
| 1789 | break; |
| 1790 | case INTERSECT_CUBIC_4: |
| 1791 | first = 1; last = 9; first2 = 21; last2 = 29; |
| 1792 | break; |
| 1793 | case INTERSECT_CUBIC_NO: |
| 1794 | first = 0; last = 8; first2 = 8; last2 = 16; |
| 1795 | break; |
| 1796 | default: |
| 1797 | console.log("unknown REC_TYPE_SECT frag type: " + fragType); |
| 1798 | throw "stop execution"; |
| 1799 | } |
| 1800 | break; |
| 1801 | default: |
| 1802 | continue; |
| 1803 | } |
| 1804 | for (var idx = first; idx < last; idx += 2) { |
| 1805 | xmin = Math.min(xmin, frags[idx]); |
| 1806 | xmax = Math.max(xmax, frags[idx]); |
| 1807 | ymin = Math.min(ymin, frags[idx + 1]); |
| 1808 | ymax = Math.max(ymax, frags[idx + 1]); |
| 1809 | } |
| 1810 | for (var idx = first2; idx < last2; idx += 2) { |
| 1811 | xmin = Math.min(xmin, frags[idx]); |
| 1812 | xmax = Math.max(xmax, frags[idx]); |
| 1813 | ymin = Math.min(ymin, frags[idx + 1]); |
| 1814 | ymax = Math.max(ymax, frags[idx + 1]); |
| 1815 | } |
| 1816 | } |
| 1817 | } |
| 1818 | var angleBounds = [Infinity, Infinity, -Infinity, -Infinity]; |
| 1819 | for (var tIndex = 0; tIndex < test.length; tIndex += 3) { |
| 1820 | var recType = test[tIndex]; |
| 1821 | var records = test[tIndex + 2]; |
| 1822 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 1823 | var fragType = records[recordIndex]; |
| 1824 | var frags = records[recordIndex + 1]; |
| 1825 | switch (recType) { |
| 1826 | case REC_TYPE_ACTIVE_OP: |
| 1827 | if (!draw_op) { |
| 1828 | break; |
| 1829 | } |
| 1830 | { |
| 1831 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 1832 | curve_extremes(curve, angleBounds); |
| 1833 | } |
| 1834 | break; |
| 1835 | case REC_TYPE_ANGLE: |
| 1836 | if (!draw_angle) { |
| 1837 | break; |
| 1838 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1839 | { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1840 | var curve = curvePartialByID(test, frags[0], frags[4], frags[5]); |
| 1841 | curve_extremes(curve, angleBounds); |
| 1842 | curve = curvePartialByID(test, frags[6], frags[10], frags[11]); |
| 1843 | curve_extremes(curve, angleBounds); |
| 1844 | curve = curvePartialByID(test, frags[12], frags[16], frags[17]); |
| 1845 | } |
| 1846 | break; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1847 | case REC_TYPE_COINCIDENCE: |
| 1848 | if (!draw_coincidence) { |
| 1849 | break; |
| 1850 | } |
| 1851 | { |
| 1852 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 1853 | curve_extremes(curve, angleBounds); |
| 1854 | } |
| 1855 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1856 | case REC_TYPE_SORT: |
| 1857 | if (!draw_sort) { |
| 1858 | break; |
| 1859 | } |
| 1860 | if (fragType == SORT_UNARY || fragType == SORT_BINARY) { |
| 1861 | var curve = curvePartialByID(test, frags[0], frags[6], frags[8]); |
| 1862 | curve_extremes(curve, angleBounds); |
| 1863 | } |
| 1864 | break; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 1865 | case REC_TYPE_TOP: |
| 1866 | if (!draw_top) { |
| 1867 | break; |
| 1868 | } |
| 1869 | { |
| 1870 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 1871 | curve_extremes(curve, angleBounds); |
| 1872 | } |
| 1873 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1874 | } |
| 1875 | } |
| 1876 | } |
| 1877 | xmin = Math.min(xmin, angleBounds[0]); |
| 1878 | ymin = Math.min(ymin, angleBounds[1]); |
| 1879 | xmax = Math.max(xmax, angleBounds[2]); |
| 1880 | ymax = Math.max(ymax, angleBounds[3]); |
| 1881 | setScale(xmin, xmax, ymin, ymax); |
| 1882 | if (hasPath == false && hasComputedPath == true && !draw_computed) { |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1883 | draw_computed = 7; // show quadratics, conics, and cubics |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1884 | } |
| 1885 | if (hasPath == true && hasComputedPath == false && draw_computed) { |
| 1886 | draw_computed = 0; |
| 1887 | } |
| 1888 | } |
| 1889 | |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1890 | function curveByIDMatch(test, id, recMatch) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1891 | var tIndex = -3; |
| 1892 | while ((tIndex += 3) < test.length) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1893 | var recType = test[tIndex]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1894 | if (recType == REC_TYPE_OP) { |
| 1895 | continue; |
| 1896 | } |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1897 | if (recType != recMatch) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1898 | return []; |
| 1899 | } |
| 1900 | var records = test[tIndex + 2]; |
| 1901 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 1902 | var fragType = records[recordIndex]; |
| 1903 | var frags = records[recordIndex + 1]; |
| 1904 | if (frags[0] == id) { |
| 1905 | switch (fragType) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1906 | case PATH_LINE: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1907 | return [frags[1], frags[2], frags[3], frags[4]]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1908 | case PATH_QUAD: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1909 | return [frags[1], frags[2], frags[3], frags[4], |
| 1910 | frags[5], frags[6]]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1911 | case PATH_CONIC: |
| 1912 | return [frags[1], frags[2], frags[3], frags[4], |
| 1913 | frags[5], frags[6], frags[7]]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1914 | case PATH_CUBIC: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1915 | return [frags[1], frags[2], frags[3], frags[4], |
| 1916 | frags[5], frags[6], frags[7], frags[8]]; |
| 1917 | } |
| 1918 | } |
| 1919 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1920 | } |
| 1921 | return []; |
| 1922 | } |
| 1923 | |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1924 | function curveByID(test, id) { |
| 1925 | var result = draw_path >= 4 ? curveByIDMatch(test, id, REC_TYPE_ALIGNED) : []; |
| 1926 | if (!result.length) { |
| 1927 | result = curveByIDMatch(test, id, REC_TYPE_PATH); |
| 1928 | } |
| 1929 | return result; |
| 1930 | } |
| 1931 | |
| 1932 | function curvePartialByIDMatch(test, id, t0, t1, recMatch) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1933 | var tIndex = -3; |
| 1934 | while ((tIndex += 3) < test.length) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1935 | var recType = test[tIndex]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1936 | if (recType == REC_TYPE_OP) { |
| 1937 | continue; |
| 1938 | } |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1939 | if (recType != recMatch) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1940 | return []; |
| 1941 | } |
| 1942 | var records = test[tIndex + 2]; |
| 1943 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 1944 | var fragType = records[recordIndex]; |
| 1945 | var frags = records[recordIndex + 1]; |
| 1946 | if (frags[0] == id) { |
| 1947 | switch (fragType) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1948 | case PATH_LINE: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1949 | return linePartial(frags[1], frags[2], frags[3], frags[4], t0, t1); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1950 | case PATH_QUAD: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1951 | return quadPartial(frags[1], frags[2], frags[3], frags[4], |
| 1952 | frags[5], frags[6], t0, t1); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1953 | case PATH_CONIC: |
| 1954 | return conicPartial(frags[1], frags[2], frags[3], frags[4], |
| 1955 | frags[5], frags[6], frags[7], t0, t1); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1956 | case PATH_CUBIC: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1957 | return cubicPartial(frags[1], frags[2], frags[3], frags[4], |
| 1958 | frags[5], frags[6], frags[7], frags[8], t0, t1); |
| 1959 | } |
| 1960 | } |
| 1961 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1962 | } |
| 1963 | return []; |
| 1964 | } |
| 1965 | |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1966 | function curvePartialByID(test, id, t0, t1) { |
| 1967 | var result = draw_path >= 4 ? curvePartialByIDMatch(test, id, t0, t1, REC_TYPE_ALIGNED) : []; |
| 1968 | if (!result.length) { |
| 1969 | result = curvePartialByIDMatch(test, id, t0, t1, REC_TYPE_PATH); |
| 1970 | } |
| 1971 | return result; |
| 1972 | } |
| 1973 | |
| 1974 | function idByCurveIDMatch(test, frag, type, recMatch) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1975 | var tIndex = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1976 | while (tIndex < test.length) { |
| 1977 | var recType = test[tIndex]; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1978 | if (recType != recMatch) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1979 | ++tIndex; |
| 1980 | continue; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1981 | } |
| 1982 | var records = test[tIndex + 2]; |
| 1983 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 1984 | var fragType = records[recordIndex]; |
| 1985 | var frags = records[recordIndex + 1]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1986 | if (frag.length != frags.length - 1) { |
| 1987 | continue; |
| 1988 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1989 | switch (fragType) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1990 | case PATH_LINE: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1991 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 1992 | || frag[2] != frags[3] || frag[3] != frags[4]) { |
| 1993 | continue; |
| 1994 | } |
| 1995 | return frags[0]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1996 | case PATH_QUAD: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1997 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 1998 | || frag[2] != frags[3] || frag[3] != frags[4] |
| 1999 | || frag[4] != frags[5] || frag[5] != frags[6]) { |
| 2000 | continue; |
| 2001 | } |
| 2002 | return frags[0]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2003 | case PATH_CONIC: |
| 2004 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 2005 | || frag[2] != frags[3] || frag[3] != frags[4] |
| 2006 | || frag[4] != frags[5] || frag[5] != frags[6] |
| 2007 | || frag[6] != frags[7]) { |
| 2008 | continue; |
| 2009 | } |
| 2010 | return frags[0]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2011 | case PATH_CUBIC: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2012 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 2013 | || frag[2] != frags[3] || frag[3] != frags[4] |
| 2014 | || frag[4] != frags[5] || frag[5] != frags[6] |
| 2015 | || frag[6] != frags[7] || frag[7] != frags[8]) { |
| 2016 | continue; |
| 2017 | } |
| 2018 | return frags[0]; |
| 2019 | } |
| 2020 | } |
| 2021 | ++tIndex; |
| 2022 | } |
| 2023 | return -1; |
| 2024 | } |
| 2025 | |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 2026 | function idByCurve(test, frag, type) { |
| 2027 | var result = draw_path >= 4 ? idByCurveIDMatch(test, frag, type, REC_TYPE_ALIGNED) : []; |
| 2028 | if (!result.length) { |
| 2029 | result = idByCurveIDMatch(test, frag, type, REC_TYPE_PATH); |
| 2030 | } |
| 2031 | return result; |
| 2032 | } |
| 2033 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2034 | function curve_extremes(curve, bounds) { |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2035 | var length = curve.length == 7 ? 6 : curve.length; |
caryclark | ed0935a | 2015-10-22 07:23:52 -0700 | [diff] [blame] | 2036 | for (var index = 0; index < length; index += 2) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2037 | var x = curve[index]; |
| 2038 | var y = curve[index + 1]; |
| 2039 | bounds[0] = Math.min(bounds[0], x); |
| 2040 | bounds[1] = Math.min(bounds[1], y); |
| 2041 | bounds[2] = Math.max(bounds[2], x); |
| 2042 | bounds[3] = Math.max(bounds[3], y); |
| 2043 | } |
| 2044 | } |
| 2045 | |
| 2046 | function setScale(x0, x1, y0, y1) { |
| 2047 | var srcWidth = x1 - x0; |
| 2048 | var srcHeight = y1 - y0; |
| 2049 | var usableWidth = screenWidth; |
| 2050 | var xDigits = Math.ceil(Math.log(Math.abs(xmax)) / Math.log(10)); |
| 2051 | var yDigits = Math.ceil(Math.log(Math.abs(ymax)) / Math.log(10)); |
| 2052 | usableWidth -= (xDigits + yDigits) * 10; |
| 2053 | usableWidth -= decimal_places * 10; |
| 2054 | if (draw_legend) { |
| 2055 | usableWidth -= 40; |
| 2056 | } |
| 2057 | var hscale = usableWidth / srcWidth; |
| 2058 | var vscale = screenHeight / srcHeight; |
| 2059 | scale = Math.min(hscale, vscale); |
| 2060 | var invScale = 1 / scale; |
| 2061 | var sxmin = x0 - invScale * 5; |
| 2062 | var symin = y0 - invScale * 10; |
| 2063 | var sxmax = x1 + invScale * (6 * decimal_places + 10); |
| 2064 | var symax = y1 + invScale * 10; |
| 2065 | srcWidth = sxmax - sxmin; |
| 2066 | srcHeight = symax - symin; |
| 2067 | hscale = usableWidth / srcWidth; |
| 2068 | vscale = screenHeight / srcHeight; |
| 2069 | scale = Math.min(hscale, vscale); |
| 2070 | srcLeft = sxmin; |
| 2071 | srcTop = symin; |
| 2072 | } |
| 2073 | |
| 2074 | function drawArc(curve, op, from, to) { |
| 2075 | var type = PATH_LINE + (curve.length / 2 - 2); |
| 2076 | var pt = pointAtT(curve, type, op ? 0.4 : 0.6); |
| 2077 | var dy = pt.y - curve[1]; |
| 2078 | var dx = pt.x - curve[0]; |
| 2079 | var dist = Math.sqrt(dy * dy + dx * dx); |
| 2080 | var _dist = dist * scale; |
| 2081 | var angle = Math.atan2(dy, dx); |
| 2082 | var _px = (curve[0] - srcLeft) * scale; |
| 2083 | var _py = (curve[1] - srcTop) * scale; |
| 2084 | var divisor = 4; |
| 2085 | var endDist; |
| 2086 | do { |
| 2087 | var ends = []; |
| 2088 | for (var index = -1; index <= 1; index += 2) { |
| 2089 | var px = Math.cos(index * Math.PI / divisor); |
| 2090 | var py = Math.sin(index * Math.PI / divisor); |
| 2091 | ends.push(px); |
| 2092 | ends.push(py); |
| 2093 | } |
| 2094 | var endDx = (ends[2] - ends[0]) * scale * dist; |
| 2095 | var endDy = (ends[3] - ends[1]) * scale * dist; |
| 2096 | endDist = Math.sqrt(endDx * endDx + endDy * endDy); |
| 2097 | if (endDist < 100) { |
| 2098 | break; |
| 2099 | } |
| 2100 | divisor *= 2; |
| 2101 | } while (true); |
| 2102 | if (endDist < 30) { |
| 2103 | return; |
| 2104 | } |
| 2105 | if (op) { |
| 2106 | divisor *= 2; |
| 2107 | } |
| 2108 | ctx.strokeStyle = op ? "rgba(210,0,45, 0.4)" : "rgba(90,90,90, 0.5)"; |
| 2109 | ctx.beginPath(); |
| 2110 | ctx.arc(_px, _py, _dist, angle - Math.PI / divisor, angle + Math.PI / divisor, false); |
| 2111 | ctx.stroke(); |
| 2112 | var saveAlign = ctx.textAlign; |
| 2113 | var saveStyle = ctx.fillStyle; |
| 2114 | var saveFont = ctx.font; |
| 2115 | ctx.textAlign = "center"; |
| 2116 | ctx.fillStyle = "black"; |
| 2117 | ctx.font = "normal 24px Arial"; |
| 2118 | divisor *= 0.8; |
| 2119 | for (var index = -1; index <= 1; index += 2) { |
| 2120 | var px = curve[0] + Math.cos(angle + index * Math.PI / divisor) * dist; |
| 2121 | var py = curve[1] + Math.sin(angle + index * Math.PI / divisor) * dist; |
| 2122 | var _px = (px - srcLeft) * scale; |
| 2123 | var _py = (py - srcTop) * scale; |
| 2124 | ctx.fillText(index < 0 ? to.toString() : from.toString(), _px, _py + 8); |
| 2125 | } |
| 2126 | ctx.textAlign = saveAlign; |
| 2127 | ctx.fillStyle = saveStyle; |
| 2128 | ctx.font = saveFont; |
| 2129 | } |
| 2130 | |
| 2131 | function drawPoint(px, py, end) { |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2132 | var length = drawnPts.length == 7 ? 6 : drawnPts.length; |
| 2133 | for (var pts = 0; pts < length; pts += 2) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2134 | var x = drawnPts[pts]; |
| 2135 | var y = drawnPts[pts + 1]; |
| 2136 | if (px == x && py == y) { |
| 2137 | return; |
| 2138 | } |
| 2139 | } |
| 2140 | drawnPts.push(px); |
| 2141 | drawnPts.push(py); |
| 2142 | var label = px.toFixed(decimal_places) + ", " + py.toFixed(decimal_places); |
| 2143 | var _px = (px - srcLeft) * scale; |
| 2144 | var _py = (py - srcTop) * scale; |
| 2145 | ctx.beginPath(); |
| 2146 | ctx.arc(_px, _py, 3, 0, Math.PI*2, true); |
| 2147 | ctx.closePath(); |
| 2148 | if (end) { |
| 2149 | ctx.fill(); |
| 2150 | } else { |
| 2151 | ctx.stroke(); |
| 2152 | } |
| 2153 | if (debug_xy) { |
| 2154 | ctx.textAlign = "left"; |
| 2155 | ctx.fillText(label, _px + 5, _py); |
| 2156 | } |
| 2157 | } |
| 2158 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2159 | function coordCount(curveType) { |
| 2160 | switch (curveType) { |
| 2161 | case PATH_LINE: |
| 2162 | return 4; |
| 2163 | case PATH_QUAD: |
| 2164 | return 6; |
| 2165 | case PATH_CONIC: |
| 2166 | return 6; |
| 2167 | case PATH_CUBIC: |
| 2168 | return 8; |
| 2169 | } |
| 2170 | return -1; |
| 2171 | } |
| 2172 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2173 | function drawPoints(ptArray, curveType, drawControls) { |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2174 | var count = coordCount(curveType); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2175 | for (var idx = 0; idx < count; idx += 2) { |
| 2176 | if (!drawControls && idx != 0 && idx != count - 2) { |
| 2177 | continue; |
| 2178 | } |
| 2179 | drawPoint(ptArray[idx], ptArray[idx + 1], idx == 0 || idx == count - 2); |
| 2180 | } |
| 2181 | } |
| 2182 | |
| 2183 | function drawControlLines(curve, curveType, drawEnd) { |
| 2184 | if (curveType == PATH_LINE) { |
| 2185 | return; |
| 2186 | } |
| 2187 | ctx.strokeStyle = "rgba(0,0,0, 0.3)"; |
| 2188 | drawLine(curve[0], curve[1], curve[2], curve[3]); |
| 2189 | drawLine(curve[2], curve[3], curve[4], curve[5]); |
| 2190 | if (curveType == PATH_CUBIC) { |
| 2191 | drawLine(curve[4], curve[5], curve[6], curve[7]); |
| 2192 | if (drawEnd > 1) { |
| 2193 | drawLine(curve[6], curve[7], curve[0], curve[1]); |
| 2194 | if (drawEnd > 2) { |
| 2195 | drawLine(curve[0], curve[1], curve[4], curve[5]); |
| 2196 | drawLine(curve[6], curve[7], curve[2], curve[3]); |
| 2197 | } |
| 2198 | } |
| 2199 | } else if (drawEnd > 1) { |
| 2200 | drawLine(curve[4], curve[5], curve[0], curve[1]); |
| 2201 | } |
| 2202 | } |
| 2203 | |
| 2204 | function pointAtT(curve, curveType, t) { |
| 2205 | var xy = {}; |
| 2206 | switch (curveType) { |
| 2207 | case PATH_LINE: |
| 2208 | var a = 1 - t; |
| 2209 | var b = t; |
| 2210 | xy.x = a * curve[0] + b * curve[2]; |
| 2211 | xy.y = a * curve[1] + b * curve[3]; |
| 2212 | break; |
| 2213 | case PATH_QUAD: |
| 2214 | var one_t = 1 - t; |
| 2215 | var a = one_t * one_t; |
| 2216 | var b = 2 * one_t * t; |
| 2217 | var c = t * t; |
| 2218 | xy.x = a * curve[0] + b * curve[2] + c * curve[4]; |
| 2219 | xy.y = a * curve[1] + b * curve[3] + c * curve[5]; |
| 2220 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2221 | case PATH_CONIC: |
| 2222 | var one_t = 1 - t; |
| 2223 | var a = one_t * one_t; |
| 2224 | var b = 2 * one_t * t; |
| 2225 | var c = t * t; |
| 2226 | xy.x = a * curve[0] + b * curve[2] * curve[6] + c * curve[4]; |
| 2227 | xy.y = a * curve[1] + b * curve[3] * curve[6] + c * curve[5]; |
| 2228 | var d = a + b * curve[6] + c; |
| 2229 | xy.x /= d; |
| 2230 | xy.y /= d; |
| 2231 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2232 | case PATH_CUBIC: |
| 2233 | var one_t = 1 - t; |
| 2234 | var one_t2 = one_t * one_t; |
| 2235 | var a = one_t2 * one_t; |
| 2236 | var b = 3 * one_t2 * t; |
| 2237 | var t2 = t * t; |
| 2238 | var c = 3 * one_t * t2; |
| 2239 | var d = t2 * t; |
| 2240 | xy.x = a * curve[0] + b * curve[2] + c * curve[4] + d * curve[6]; |
| 2241 | xy.y = a * curve[1] + b * curve[3] + c * curve[5] + d * curve[7]; |
| 2242 | break; |
| 2243 | } |
| 2244 | return xy; |
| 2245 | } |
| 2246 | |
| 2247 | function drawPointAtT(curve, curveType) { |
| 2248 | var x, y; |
| 2249 | var xy = pointAtT(curve, curveType, curveT); |
| 2250 | drawPoint(xy.x, xy.y, true); |
| 2251 | if (!draw_intersectT) { |
| 2252 | return; |
| 2253 | } |
| 2254 | ctx.fillStyle = "red"; |
| 2255 | drawTAtPointUp(xy.x, xy.y, curveT); |
| 2256 | } |
| 2257 | |
| 2258 | function drawTAtPointUp(px, py, t) { |
| 2259 | var label = t.toFixed(decimal_places); |
| 2260 | var _px = (px - srcLeft)* scale; |
| 2261 | var _py = (py - srcTop) * scale; |
| 2262 | ctx.fillText(label, _px + 5, _py - 10); |
| 2263 | } |
| 2264 | |
| 2265 | function drawTAtPointDown(px, py, t) { |
| 2266 | var label = t.toFixed(decimal_places); |
| 2267 | var _px = (px - srcLeft)* scale; |
| 2268 | var _py = (py - srcTop) * scale; |
| 2269 | ctx.fillText(label, _px + 5, _py + 10); |
| 2270 | } |
| 2271 | |
| 2272 | function alreadyDrawnLine(x1, y1, x2, y2) { |
| 2273 | if (collect_bounds) { |
| 2274 | if (focus_enabled) { |
| 2275 | focusXmin = Math.min(focusXmin, x1, x2); |
| 2276 | focusYmin = Math.min(focusYmin, y1, y2); |
| 2277 | focusXmax = Math.max(focusXmax, x1, x2); |
| 2278 | focusYmax = Math.max(focusYmax, y1, y2); |
| 2279 | } |
| 2280 | return true; |
| 2281 | } |
| 2282 | for (var pts = 0; pts < drawnLines.length; pts += 4) { |
| 2283 | if (x1 == drawnLines[pts] && y1 == drawnLines[pts + 1] |
| 2284 | && x2 == drawnLines[pts + 2] && y2 == drawnLines[pts + 3]) { |
| 2285 | return true; |
| 2286 | } |
| 2287 | } |
| 2288 | drawnLines.push(x1); |
| 2289 | drawnLines.push(y1); |
| 2290 | drawnLines.push(x2); |
| 2291 | drawnLines.push(y2); |
| 2292 | return false; |
| 2293 | } |
| 2294 | |
| 2295 | function drawLine(x1, y1, x2, y2) { |
| 2296 | if (alreadyDrawnLine(x1, y1, x2, y2)) { |
| 2297 | return; |
| 2298 | } |
| 2299 | ctx.beginPath(); |
| 2300 | ctx.moveTo((x1 - srcLeft) * scale, |
| 2301 | (y1 - srcTop) * scale); |
| 2302 | ctx.lineTo((x2 - srcLeft) * scale, |
| 2303 | (y2 - srcTop) * scale); |
| 2304 | ctx.stroke(); |
| 2305 | } |
| 2306 | |
| 2307 | function linePartial(x1, y1, x2, y2, t1, t2) { |
| 2308 | var dx = x1 - x2; |
| 2309 | var dy = y1 - y2; |
| 2310 | var array = [ |
| 2311 | x1 - t1 * dx, |
| 2312 | y1 - t1 * dy, |
| 2313 | x1 - t2 * dx, |
| 2314 | y1 - t2 * dy |
| 2315 | ]; |
| 2316 | return array; |
| 2317 | } |
| 2318 | |
| 2319 | function drawLinePartial(x1, y1, x2, y2, t1, t2) { |
| 2320 | var a = linePartial(x1, y1, x2, y2, t1, t2); |
| 2321 | var ax = a[0]; |
| 2322 | var ay = a[1]; |
| 2323 | var bx = a[2]; |
| 2324 | var by = a[3]; |
| 2325 | if (alreadyDrawnLine(ax, ay, bx, by)) { |
| 2326 | return; |
| 2327 | } |
| 2328 | ctx.beginPath(); |
| 2329 | ctx.moveTo((ax - srcLeft) * scale, |
| 2330 | (ay - srcTop) * scale); |
| 2331 | ctx.lineTo((bx - srcLeft) * scale, |
| 2332 | (by - srcTop) * scale); |
| 2333 | ctx.stroke(); |
| 2334 | } |
| 2335 | |
| 2336 | function alreadyDrawnQuad(x1, y1, x2, y2, x3, y3) { |
| 2337 | if (collect_bounds) { |
| 2338 | if (focus_enabled) { |
| 2339 | focusXmin = Math.min(focusXmin, x1, x2, x3); |
| 2340 | focusYmin = Math.min(focusYmin, y1, y2, y3); |
| 2341 | focusXmax = Math.max(focusXmax, x1, x2, x3); |
| 2342 | focusYmax = Math.max(focusYmax, y1, y2, y3); |
| 2343 | } |
| 2344 | return true; |
| 2345 | } |
| 2346 | for (var pts = 0; pts < drawnQuads.length; pts += 6) { |
| 2347 | if (x1 == drawnQuads[pts] && y1 == drawnQuads[pts + 1] |
| 2348 | && x2 == drawnQuads[pts + 2] && y2 == drawnQuads[pts + 3] |
| 2349 | && x3 == drawnQuads[pts + 4] && y3 == drawnQuads[pts + 5]) { |
| 2350 | return true; |
| 2351 | } |
| 2352 | } |
| 2353 | drawnQuads.push(x1); |
| 2354 | drawnQuads.push(y1); |
| 2355 | drawnQuads.push(x2); |
| 2356 | drawnQuads.push(y2); |
| 2357 | drawnQuads.push(x3); |
| 2358 | drawnQuads.push(y3); |
| 2359 | return false; |
| 2360 | } |
| 2361 | |
| 2362 | function drawQuad(x1, y1, x2, y2, x3, y3) { |
| 2363 | if (alreadyDrawnQuad(x1, y1, x2, y2, x3, y3)) { |
| 2364 | return; |
| 2365 | } |
| 2366 | ctx.beginPath(); |
| 2367 | ctx.moveTo((x1 - srcLeft) * scale, |
| 2368 | (y1 - srcTop) * scale); |
| 2369 | ctx.quadraticCurveTo((x2 - srcLeft) * scale, |
| 2370 | (y2 - srcTop) * scale, |
| 2371 | (x3 - srcLeft) * scale, |
| 2372 | (y3 - srcTop) * scale); |
| 2373 | ctx.stroke(); |
| 2374 | } |
| 2375 | |
| 2376 | function interp(A, B, t) { |
| 2377 | return A + (B - A) * t; |
| 2378 | } |
| 2379 | |
| 2380 | function interp_quad_coords(x1, x2, x3, t) |
| 2381 | { |
| 2382 | var ab = interp(x1, x2, t); |
| 2383 | var bc = interp(x2, x3, t); |
| 2384 | var abc = interp(ab, bc, t); |
| 2385 | return abc; |
| 2386 | } |
| 2387 | |
| 2388 | function quadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { |
| 2389 | var ax = interp_quad_coords(x1, x2, x3, t1); |
| 2390 | var ay = interp_quad_coords(y1, y2, y3, t1); |
| 2391 | var dx = interp_quad_coords(x1, x2, x3, (t1 + t2) / 2); |
| 2392 | var dy = interp_quad_coords(y1, y2, y3, (t1 + t2) / 2); |
| 2393 | var cx = interp_quad_coords(x1, x2, x3, t2); |
| 2394 | var cy = interp_quad_coords(y1, y2, y3, t2); |
| 2395 | var bx = 2*dx - (ax + cx)/2; |
| 2396 | var by = 2*dy - (ay + cy)/2; |
| 2397 | var array = [ |
| 2398 | ax, ay, bx, by, cx, cy |
| 2399 | ]; |
| 2400 | return array; |
| 2401 | } |
| 2402 | |
| 2403 | function drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { |
| 2404 | var a = quadPartial(x1, y1, x2, y2, x3, y3, t1, t2); |
| 2405 | var ax = a[0]; |
| 2406 | var ay = a[1]; |
| 2407 | var bx = a[2]; |
| 2408 | var by = a[3]; |
| 2409 | var cx = a[4]; |
| 2410 | var cy = a[5]; |
| 2411 | if (alreadyDrawnQuad(ax, ay, bx, by, cx, cy)) { |
| 2412 | return; |
| 2413 | } |
| 2414 | ctx.beginPath(); |
| 2415 | ctx.moveTo((ax - srcLeft) * scale, |
| 2416 | (ay - srcTop) * scale); |
| 2417 | ctx.quadraticCurveTo((bx - srcLeft) * scale, |
| 2418 | (by - srcTop) * scale, |
| 2419 | (cx - srcLeft) * scale, |
| 2420 | (cy - srcTop) * scale); |
| 2421 | ctx.stroke(); |
| 2422 | } |
| 2423 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2424 | function alreadyDrawnConic(x1, y1, x2, y2, x3, y3, w) { |
| 2425 | if (collect_bounds) { |
| 2426 | if (focus_enabled) { |
| 2427 | focusXmin = Math.min(focusXmin, x1, x2, x3); |
| 2428 | focusYmin = Math.min(focusYmin, y1, y2, y3); |
| 2429 | focusXmax = Math.max(focusXmax, x1, x2, x3); |
| 2430 | focusYmax = Math.max(focusYmax, y1, y2, y3); |
| 2431 | } |
| 2432 | return true; |
| 2433 | } |
| 2434 | for (var pts = 0; pts < drawnConics.length; pts += 8) { |
| 2435 | if (x1 == drawnConics[pts] && y1 == drawnCubics[pts + 1] |
| 2436 | && x2 == drawnCubics[pts + 2] && y2 == drawnCubics[pts + 3] |
| 2437 | && x3 == drawnCubics[pts + 4] && y3 == drawnCubics[pts + 5] |
| 2438 | && w == drawnCubics[pts + 6]) { |
| 2439 | return true; |
| 2440 | } |
| 2441 | } |
| 2442 | drawnConics.push(x1); |
| 2443 | drawnConics.push(y1); |
| 2444 | drawnConics.push(x2); |
| 2445 | drawnConics.push(y2); |
| 2446 | drawnConics.push(x3); |
| 2447 | drawnConics.push(y3); |
| 2448 | drawnCubics.push(w); |
| 2449 | return false; |
| 2450 | } |
| 2451 | |
| 2452 | var kMaxConicToQuadPOW2 = 5; |
| 2453 | |
| 2454 | function computeQuadPOW2(curve, tol) { |
| 2455 | var a = curve[6] - 1; |
| 2456 | var k = a / (4 * (2 + a)); |
| 2457 | var x = k * (curve[0] - 2 * curve[2] + curve[4]); |
| 2458 | var y = k * (curve[1] - 2 * curve[3] + curve[5]); |
| 2459 | |
| 2460 | var error = Math.sqrt(x * x + y * y); |
| 2461 | var pow2; |
| 2462 | for (pow2 = 0; pow2 < kMaxConicToQuadPOW2; ++pow2) { |
| 2463 | if (error <= tol) { |
| 2464 | break; |
| 2465 | } |
| 2466 | error *= 0.25; |
| 2467 | } |
| 2468 | return pow2; |
| 2469 | } |
| 2470 | |
| 2471 | function subdivide_w_value(w) { |
| 2472 | return Math.sqrt(0.5 + w * 0.5); |
| 2473 | } |
| 2474 | |
| 2475 | function chop(curve, part1, part2) { |
| 2476 | var w = curve[6]; |
| 2477 | var scale = 1 / (1 + w); |
| 2478 | part1[0] = curve[0]; |
| 2479 | part1[1] = curve[1]; |
| 2480 | part1[2] = (curve[0] + curve[2] * w) * scale; |
| 2481 | part1[3] = (curve[1] + curve[3] * w) * scale; |
| 2482 | part1[4] = part2[0] = (curve[0] + (curve[2] * w) * 2 + curve[4]) * scale * 0.5; |
| 2483 | part1[5] = part2[1] = (curve[1] + (curve[3] * w) * 2 + curve[5]) * scale * 0.5; |
| 2484 | part2[2] = (curve[2] * w + curve[4]) * scale; |
| 2485 | part2[3] = (curve[3] * w + curve[5]) * scale; |
| 2486 | part2[4] = curve[4]; |
| 2487 | part2[5] = curve[5]; |
| 2488 | part1[6] = part2[6] = subdivide_w_value(w); |
| 2489 | } |
| 2490 | |
| 2491 | function subdivide(curve, level, pts) { |
| 2492 | if (0 == level) { |
| 2493 | pts.push(curve[2]); |
| 2494 | pts.push(curve[3]); |
| 2495 | pts.push(curve[4]); |
| 2496 | pts.push(curve[5]); |
| 2497 | } else { |
| 2498 | var part1 = [], part2 = []; |
| 2499 | chop(curve, part1, part2); |
| 2500 | --level; |
| 2501 | subdivide(part1, level, pts); |
| 2502 | subdivide(part2, level, pts); |
| 2503 | } |
| 2504 | } |
| 2505 | |
| 2506 | function chopIntoQuadsPOW2(curve, pow2, pts) { |
| 2507 | subdivide(curve, pow2, pts); |
| 2508 | return 1 << pow2; |
| 2509 | } |
| 2510 | |
| 2511 | function drawConicWithQuads(x1, y1, x2, y2, x3, y3, w) { |
| 2512 | if (alreadyDrawnConic(x1, y1, x2, y2, x3, y3, w)) { |
| 2513 | return; |
| 2514 | } |
| 2515 | ctx.beginPath(); |
| 2516 | ctx.moveTo((x1 - srcLeft) * scale, |
| 2517 | (y1 - srcTop) * scale); |
| 2518 | var tol = 1 / scale; |
| 2519 | var curve = [x1, y1, x2, y2, x3, y3, w]; |
| 2520 | var pow2 = computeQuadPOW2(curve, tol); |
| 2521 | var pts = []; |
| 2522 | chopIntoQuadsPOW2(curve, pow2, pts); |
| 2523 | for (var i = 0; i < pts.length; i += 4) { |
| 2524 | ctx.quadraticCurveTo( |
| 2525 | (pts[i + 0] - srcLeft) * scale, (pts[i + 1] - srcTop) * scale, |
| 2526 | (pts[i + 2] - srcLeft) * scale, (pts[i + 3] - srcTop) * scale); |
| 2527 | } |
| 2528 | ctx.stroke(); |
| 2529 | } |
| 2530 | |
| 2531 | function conic_eval_numerator(x1, x2, x3, w, t) { |
| 2532 | var src2w = x2 * w; |
| 2533 | var C = x1; |
| 2534 | var A = x3 - 2 * src2w + C; |
| 2535 | var B = 2 * (src2w - C); |
| 2536 | return (A * t + B) * t + C; |
| 2537 | } |
| 2538 | |
| 2539 | |
| 2540 | function conic_eval_denominator(w, t) { |
| 2541 | var B = 2 * (w - 1); |
| 2542 | var C = 1; |
| 2543 | var A = -B; |
| 2544 | return (A * t + B) * t + C; |
| 2545 | } |
| 2546 | |
| 2547 | function conicPartial(x1, y1, x2, y2, x3, y3, w, t1, t2) { |
| 2548 | var ax = conic_eval_numerator(x1, x2, x3, w, t1); |
| 2549 | var ay = conic_eval_numerator(y1, y2, y3, w, t1); |
| 2550 | var az = conic_eval_denominator(w, t1); |
| 2551 | var midT = (t1 + t2) / 2; |
| 2552 | var dx = conic_eval_numerator(x1, x2, x3, w, midT); |
| 2553 | var dy = conic_eval_numerator(y1, y2, y3, w, midT); |
| 2554 | var dz = conic_eval_denominator(w, midT); |
| 2555 | var cx = conic_eval_numerator(x1, x2, x3, w, t2); |
| 2556 | var cy = conic_eval_numerator(y1, y2, y3, w, t2); |
| 2557 | var cz = conic_eval_denominator(w, t2); |
| 2558 | var bx = 2 * dx - (ax + cx) / 2; |
| 2559 | var by = 2 * dy - (ay + cy) / 2; |
| 2560 | var bz = 2 * dz - (az + cz) / 2; |
| 2561 | var dt = t2 - t1; |
| 2562 | var dt_1 = 1 - dt; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2563 | var array = [ |
caryclark | ed0935a | 2015-10-22 07:23:52 -0700 | [diff] [blame] | 2564 | ax / az, ay / az, bx / bz, by / bz, cx / cz, cy / cz, 0 |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2565 | ]; |
caryclark | ed0935a | 2015-10-22 07:23:52 -0700 | [diff] [blame] | 2566 | var dMidAC = { x:(array[0] + array[4]) / 2, y:(array[1] + array[5]) / 2 }; |
| 2567 | var dMid = { x:dx / dz, y:dy / dz }; |
| 2568 | var dWNumer = { x:dMidAC.x - dMid.x, y:dMidAC.y - dMid.y }; |
| 2569 | var dWDenom = { x:dMid.x - array[2], y:dMid.y - array[3] }; |
| 2570 | var partW = Math.sqrt(dWNumer.x * dWNumer.x + dWNumer.y * dWNumer.y) |
| 2571 | / Math.sqrt(dWDenom.x * dWDenom.x + dWDenom.y * dWDenom.y); |
| 2572 | array[6] = partW; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2573 | return array; |
| 2574 | } |
| 2575 | |
| 2576 | function drawConicPartial(x1, y1, x2, y2, x3, y3, w, t1, t2) { |
| 2577 | var a = conicPartial(x1, y1, x2, y2, x3, y3, w, t1, t2); |
| 2578 | var ax = a[0]; |
| 2579 | var ay = a[1]; |
| 2580 | var bx = a[2]; |
| 2581 | var by = a[3]; |
| 2582 | var cx = a[4]; |
| 2583 | var cy = a[5]; |
| 2584 | var w_ = a[6]; |
| 2585 | drawConicWithQuads(ax, ay, bx, by, cx, cy, w_); |
| 2586 | } |
| 2587 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2588 | function alreadyDrawnCubic(x1, y1, x2, y2, x3, y3, x4, y4) { |
| 2589 | if (collect_bounds) { |
| 2590 | if (focus_enabled) { |
| 2591 | focusXmin = Math.min(focusXmin, x1, x2, x3, x4); |
| 2592 | focusYmin = Math.min(focusYmin, y1, y2, y3, y4); |
| 2593 | focusXmax = Math.max(focusXmax, x1, x2, x3, x4); |
| 2594 | focusYmax = Math.max(focusYmax, y1, y2, y3, y4); |
| 2595 | } |
| 2596 | return true; |
| 2597 | } |
| 2598 | for (var pts = 0; pts < drawnCubics.length; pts += 8) { |
| 2599 | if (x1 == drawnCubics[pts] && y1 == drawnCubics[pts + 1] |
| 2600 | && x2 == drawnCubics[pts + 2] && y2 == drawnCubics[pts + 3] |
| 2601 | && x3 == drawnCubics[pts + 4] && y3 == drawnCubics[pts + 5] |
| 2602 | && x4 == drawnCubics[pts + 6] && y4 == drawnCubics[pts + 7]) { |
| 2603 | return true; |
| 2604 | } |
| 2605 | } |
| 2606 | drawnCubics.push(x1); |
| 2607 | drawnCubics.push(y1); |
| 2608 | drawnCubics.push(x2); |
| 2609 | drawnCubics.push(y2); |
| 2610 | drawnCubics.push(x3); |
| 2611 | drawnCubics.push(y3); |
| 2612 | drawnCubics.push(x4); |
| 2613 | drawnCubics.push(y4); |
| 2614 | return false; |
| 2615 | } |
| 2616 | |
| 2617 | function drawCubic(x1, y1, x2, y2, x3, y3, x4, y4) { |
| 2618 | if (alreadyDrawnCubic(x1, y1, x2, y2, x3, y3, x4, y4)) { |
| 2619 | return; |
| 2620 | } |
| 2621 | ctx.beginPath(); |
| 2622 | ctx.moveTo((x1 - srcLeft) * scale, |
| 2623 | (y1 - srcTop) * scale); |
| 2624 | ctx.bezierCurveTo((x2 - srcLeft) * scale, |
| 2625 | (y2 - srcTop) * scale, |
| 2626 | (x3 - srcLeft) * scale, |
| 2627 | (y3 - srcTop) * scale, |
| 2628 | (x4 - srcLeft) * scale, |
| 2629 | (y4 - srcTop) * scale); |
| 2630 | ctx.stroke(); |
| 2631 | } |
| 2632 | |
| 2633 | function interp_cubic_coords(x1, x2, x3, x4, t) |
| 2634 | { |
| 2635 | var ab = interp(x1, x2, t); |
| 2636 | var bc = interp(x2, x3, t); |
| 2637 | var cd = interp(x3, x4, t); |
| 2638 | var abc = interp(ab, bc, t); |
| 2639 | var bcd = interp(bc, cd, t); |
| 2640 | var abcd = interp(abc, bcd, t); |
| 2641 | return abcd; |
| 2642 | } |
| 2643 | |
| 2644 | function cubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { |
| 2645 | var ax = interp_cubic_coords(x1, x2, x3, x4, t1); |
| 2646 | var ay = interp_cubic_coords(y1, y2, y3, y4, t1); |
| 2647 | var ex = interp_cubic_coords(x1, x2, x3, x4, (t1*2+t2)/3); |
| 2648 | var ey = interp_cubic_coords(y1, y2, y3, y4, (t1*2+t2)/3); |
| 2649 | var fx = interp_cubic_coords(x1, x2, x3, x4, (t1+t2*2)/3); |
| 2650 | var fy = interp_cubic_coords(y1, y2, y3, y4, (t1+t2*2)/3); |
| 2651 | var dx = interp_cubic_coords(x1, x2, x3, x4, t2); |
| 2652 | var dy = interp_cubic_coords(y1, y2, y3, y4, t2); |
| 2653 | var mx = ex * 27 - ax * 8 - dx; |
| 2654 | var my = ey * 27 - ay * 8 - dy; |
| 2655 | var nx = fx * 27 - ax - dx * 8; |
| 2656 | var ny = fy * 27 - ay - dy * 8; |
| 2657 | var bx = (mx * 2 - nx) / 18; |
| 2658 | var by = (my * 2 - ny) / 18; |
| 2659 | var cx = (nx * 2 - mx) / 18; |
| 2660 | var cy = (ny * 2 - my) / 18; |
| 2661 | var array = [ |
| 2662 | ax, ay, bx, by, cx, cy, dx, dy |
| 2663 | ]; |
| 2664 | return array; |
| 2665 | } |
| 2666 | |
| 2667 | function drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { |
| 2668 | var a = cubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2); |
| 2669 | var ax = a[0]; |
| 2670 | var ay = a[1]; |
| 2671 | var bx = a[2]; |
| 2672 | var by = a[3]; |
| 2673 | var cx = a[4]; |
| 2674 | var cy = a[5]; |
| 2675 | var dx = a[6]; |
| 2676 | var dy = a[7]; |
| 2677 | if (alreadyDrawnCubic(ax, ay, bx, by, cx, cy, dx, dy)) { |
| 2678 | return; |
| 2679 | } |
| 2680 | ctx.beginPath(); |
| 2681 | ctx.moveTo((ax - srcLeft) * scale, |
| 2682 | (ay - srcTop) * scale); |
| 2683 | ctx.bezierCurveTo((bx - srcLeft) * scale, |
| 2684 | (by - srcTop) * scale, |
| 2685 | (cx - srcLeft) * scale, |
| 2686 | (cy - srcTop) * scale, |
| 2687 | (dx - srcLeft) * scale, |
| 2688 | (dy - srcTop) * scale); |
| 2689 | ctx.stroke(); |
| 2690 | } |
| 2691 | |
| 2692 | function drawCurve(c) { |
| 2693 | switch (c.length) { |
| 2694 | case 4: |
| 2695 | drawLine(c[0], c[1], c[2], c[3]); |
| 2696 | break; |
| 2697 | case 6: |
| 2698 | drawQuad(c[0], c[1], c[2], c[3], c[4], c[5]); |
| 2699 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2700 | case 7: |
| 2701 | drawConicWithQuads(c[0], c[1], c[2], c[3], c[4], c[5], c[6]); |
| 2702 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2703 | case 8: |
| 2704 | drawCubic(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7]); |
| 2705 | break; |
| 2706 | } |
| 2707 | } |
| 2708 | |
| 2709 | function boundsWidth(pts) { |
| 2710 | var min = pts[0]; |
| 2711 | var max = pts[0]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2712 | var length = pts.length == 7 ? 6 : pts.length; |
| 2713 | for (var idx = 2; idx < length; idx += 2) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2714 | min = Math.min(min, pts[idx]); |
| 2715 | max = Math.max(max, pts[idx]); |
| 2716 | } |
| 2717 | return max - min; |
| 2718 | } |
| 2719 | |
| 2720 | function boundsHeight(pts) { |
| 2721 | var min = pts[1]; |
| 2722 | var max = pts[1]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2723 | var length = pts.length == 7 ? 6 : pts.length; |
| 2724 | for (var idx = 3; idx < length; idx += 2) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2725 | min = Math.min(min, pts[idx]); |
| 2726 | max = Math.max(max, pts[idx]); |
| 2727 | } |
| 2728 | return max - min; |
| 2729 | } |
| 2730 | |
| 2731 | function tangent(pts) { |
| 2732 | var dx = pts[2] - pts[0]; |
| 2733 | var dy = pts[3] - pts[1]; |
| 2734 | if (dx == 0 && dy == 0 && pts.length > 4) { |
| 2735 | dx = pts[4] - pts[0]; |
| 2736 | dy = pts[5] - pts[1]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2737 | if (dx == 0 && dy == 0 && pts.length == 8) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2738 | dx = pts[6] - pts[0]; |
| 2739 | dy = pts[7] - pts[1]; |
| 2740 | } |
| 2741 | } |
| 2742 | return Math.atan2(-dy, dx); |
| 2743 | } |
| 2744 | |
| 2745 | function hodograph(cubic) { |
| 2746 | var hodo = []; |
| 2747 | hodo[0] = 3 * (cubic[2] - cubic[0]); |
| 2748 | hodo[1] = 3 * (cubic[3] - cubic[1]); |
| 2749 | hodo[2] = 3 * (cubic[4] - cubic[2]); |
| 2750 | hodo[3] = 3 * (cubic[5] - cubic[3]); |
| 2751 | hodo[4] = 3 * (cubic[6] - cubic[4]); |
| 2752 | hodo[5] = 3 * (cubic[7] - cubic[5]); |
| 2753 | return hodo; |
| 2754 | } |
| 2755 | |
| 2756 | function hodograph2(cubic) { |
| 2757 | var quad = hodograph(cubic); |
| 2758 | var hodo = []; |
| 2759 | hodo[0] = 2 * (quad[2] - quad[0]); |
| 2760 | hodo[1] = 2 * (quad[3] - quad[1]); |
| 2761 | hodo[2] = 2 * (quad[4] - quad[2]); |
| 2762 | hodo[3] = 2 * (quad[5] - quad[3]); |
| 2763 | return hodo; |
| 2764 | } |
| 2765 | |
| 2766 | function quadraticRootsReal(A, B, C, s) { |
| 2767 | if (A == 0) { |
| 2768 | if (B == 0) { |
| 2769 | s[0] = 0; |
| 2770 | return C == 0; |
| 2771 | } |
| 2772 | s[0] = -C / B; |
| 2773 | return 1; |
| 2774 | } |
| 2775 | /* normal form: x^2 + px + q = 0 */ |
| 2776 | var p = B / (2 * A); |
| 2777 | var q = C / A; |
| 2778 | var p2 = p * p; |
| 2779 | if (p2 < q) { |
| 2780 | return 0; |
| 2781 | } |
| 2782 | var sqrt_D = 0; |
| 2783 | if (p2 > q) { |
| 2784 | sqrt_D = sqrt(p2 - q); |
| 2785 | } |
| 2786 | s[0] = sqrt_D - p; |
| 2787 | s[1] = -sqrt_D - p; |
| 2788 | return 1 + s[0] != s[1]; |
| 2789 | } |
| 2790 | |
| 2791 | function add_valid_ts(s, realRoots, t) { |
| 2792 | var foundRoots = 0; |
| 2793 | for (var index = 0; index < realRoots; ++index) { |
| 2794 | var tValue = s[index]; |
| 2795 | if (tValue >= 0 && tValue <= 1) { |
| 2796 | for (var idx2 = 0; idx2 < foundRoots; ++idx2) { |
| 2797 | if (t[idx2] != tValue) { |
| 2798 | t[foundRoots++] = tValue; |
| 2799 | } |
| 2800 | } |
| 2801 | } |
| 2802 | } |
| 2803 | return foundRoots; |
| 2804 | } |
| 2805 | |
| 2806 | function quadraticRootsValidT(a, b, c, t) { |
| 2807 | var s = []; |
| 2808 | var realRoots = quadraticRootsReal(A, B, C, s); |
| 2809 | var foundRoots = add_valid_ts(s, realRoots, t); |
| 2810 | return foundRoots != 0; |
| 2811 | } |
| 2812 | |
| 2813 | function find_cubic_inflections(cubic, tValues) { |
| 2814 | var Ax = src[2] - src[0]; |
| 2815 | var Ay = src[3] - src[1]; |
| 2816 | var Bx = src[4] - 2 * src[2] + src[0]; |
| 2817 | var By = src[5] - 2 * src[3] + src[1]; |
| 2818 | var Cx = src[6] + 3 * (src[2] - src[4]) - src[0]; |
| 2819 | var Cy = src[7] + 3 * (src[3] - src[5]) - src[1]; |
| 2820 | return quadraticRootsValidT(Bx * Cy - By * Cx, (Ax * Cy - Ay * Cx), |
| 2821 | Ax * By - Ay * Bx, tValues); |
| 2822 | } |
| 2823 | |
| 2824 | function dxy_at_t(curve, type, t) { |
| 2825 | var dxy = {}; |
| 2826 | if (type == PATH_QUAD) { |
| 2827 | var a = t - 1; |
| 2828 | var b = 1 - 2 * t; |
| 2829 | var c = t; |
| 2830 | dxy.x = a * curve[0] + b * curve[2] + c * curve[4]; |
| 2831 | dxy.y = a * curve[1] + b * curve[3] + c * curve[5]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2832 | } else if (type == PATH_CONIC) { |
| 2833 | var p20x = curve[4] - curve[0]; |
| 2834 | var p20y = curve[5] - curve[1]; |
| 2835 | var p10xw = (curve[2] - curve[0]) * curve[6]; |
| 2836 | var p10yw = (curve[3] - curve[1]) * curve[6]; |
| 2837 | var coeff0x = curve[6] * p20x - p20x; |
| 2838 | var coeff0y = curve[6] * p20y - p20y; |
| 2839 | var coeff1x = p20x - 2 * p10xw; |
| 2840 | var coeff1y = p20y - 2 * p10yw; |
| 2841 | dxy.x = t * (t * coeff0x + coeff1x) + p10xw; |
| 2842 | dxy.y = t * (t * coeff0y + coeff1y) + p10yw; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2843 | } else if (type == PATH_CUBIC) { |
| 2844 | var one_t = 1 - t; |
| 2845 | var a = curve[0]; |
| 2846 | var b = curve[2]; |
| 2847 | var c = curve[4]; |
| 2848 | var d = curve[6]; |
| 2849 | dxy.x = 3 * ((b - a) * one_t * one_t + 2 * (c - b) * t * one_t + (d - c) * t * t); |
| 2850 | a = curve[1]; |
| 2851 | b = curve[3]; |
| 2852 | c = curve[5]; |
| 2853 | d = curve[7]; |
| 2854 | dxy.y = 3 * ((b - a) * one_t * one_t + 2 * (c - b) * t * one_t + (d - c) * t * t); |
| 2855 | } |
| 2856 | return dxy; |
| 2857 | } |
| 2858 | |
| 2859 | function drawLabel(num, px, py) { |
| 2860 | ctx.beginPath(); |
| 2861 | ctx.arc(px, py, 8, 0, Math.PI*2, true); |
| 2862 | ctx.closePath(); |
| 2863 | ctx.strokeStyle = "rgba(0,0,0, 0.4)"; |
| 2864 | ctx.lineWidth = num == 0 || num == 3 ? 2 : 1; |
| 2865 | ctx.stroke(); |
| 2866 | ctx.fillStyle = "black"; |
| 2867 | ctx.font = "normal 10px Arial"; |
| 2868 | // ctx.rotate(0.001); |
| 2869 | ctx.fillText(num, px - 2, py + 3); |
| 2870 | // ctx.rotate(-0.001); |
| 2871 | } |
| 2872 | |
| 2873 | function drawLabelX(ymin, num, loc) { |
| 2874 | var px = (loc - srcLeft) * scale; |
| 2875 | var py = (ymin - srcTop) * scale - 20; |
| 2876 | drawLabel(num, px, py); |
| 2877 | } |
| 2878 | |
| 2879 | function drawLabelY(xmin, num, loc) { |
| 2880 | var px = (xmin - srcLeft) * scale - 20; |
| 2881 | var py = (loc - srcTop) * scale; |
| 2882 | drawLabel(num, px, py); |
| 2883 | } |
| 2884 | |
| 2885 | function drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY) { |
| 2886 | ctx.beginPath(); |
| 2887 | ctx.moveTo(hx, hy - 100); |
| 2888 | ctx.lineTo(hx, hy); |
| 2889 | ctx.strokeStyle = hMinY < 0 ? "green" : "blue"; |
| 2890 | ctx.stroke(); |
| 2891 | ctx.beginPath(); |
| 2892 | ctx.moveTo(hx, hy); |
| 2893 | ctx.lineTo(hx, hy + 100); |
| 2894 | ctx.strokeStyle = hMaxY > 0 ? "green" : "blue"; |
| 2895 | ctx.stroke(); |
| 2896 | ctx.beginPath(); |
| 2897 | ctx.moveTo(hx - 100, hy); |
| 2898 | ctx.lineTo(hx, hy); |
| 2899 | ctx.strokeStyle = hMinX < 0 ? "green" : "blue"; |
| 2900 | ctx.stroke(); |
| 2901 | ctx.beginPath(); |
| 2902 | ctx.moveTo(hx, hy); |
| 2903 | ctx.lineTo(hx + 100, hy); |
| 2904 | ctx.strokeStyle = hMaxX > 0 ? "green" : "blue"; |
| 2905 | ctx.stroke(); |
| 2906 | } |
| 2907 | |
| 2908 | function scalexy(x, y, mag) { |
| 2909 | var length = Math.sqrt(x * x + y * y); |
| 2910 | return mag / length; |
| 2911 | } |
| 2912 | |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 2913 | function drawArrow(x, y, dx, dy, s) { |
| 2914 | var dscale = scalexy(dx, dy, 1 / scale * 100 * s); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2915 | dx *= dscale; |
| 2916 | dy *= dscale; |
| 2917 | ctx.beginPath(); |
| 2918 | ctx.moveTo((x - srcLeft) * scale, (y - srcTop) * scale); |
| 2919 | x += dx; |
| 2920 | y += dy; |
| 2921 | ctx.lineTo((x - srcLeft) * scale, (y - srcTop) * scale); |
| 2922 | dx /= 10; |
| 2923 | dy /= 10; |
| 2924 | ctx.lineTo((x - dy - srcLeft) * scale, (y + dx - srcTop) * scale); |
| 2925 | ctx.lineTo((x + dx * 2 - srcLeft) * scale, (y + dy * 2 - srcTop) * scale); |
| 2926 | ctx.lineTo((x + dy - srcLeft) * scale, (y - dx - srcTop) * scale); |
| 2927 | ctx.lineTo((x - srcLeft) * scale, (y - srcTop) * scale); |
| 2928 | ctx.strokeStyle = "rgba(0,75,0, 0.4)"; |
| 2929 | ctx.stroke(); |
| 2930 | } |
| 2931 | |
| 2932 | function x_at_t(curve, t) { |
| 2933 | var one_t = 1 - t; |
| 2934 | if (curve.length == 4) { |
| 2935 | return one_t * curve[0] + t * curve[2]; |
| 2936 | } |
| 2937 | var one_t2 = one_t * one_t; |
| 2938 | var t2 = t * t; |
| 2939 | if (curve.length == 6) { |
| 2940 | return one_t2 * curve[0] + 2 * one_t * t * curve[2] + t2 * curve[4]; |
| 2941 | } |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2942 | if (curve.length == 7) { |
| 2943 | return (one_t2 * curve[0] + 2 * one_t * t * curve[2] * curve[6] + t2 * curve[4]) |
| 2944 | / (one_t2 +2 * one_t * t * curve[6] + t2); |
| 2945 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2946 | var a = one_t2 * one_t; |
| 2947 | var b = 3 * one_t2 * t; |
| 2948 | var c = 3 * one_t * t2; |
| 2949 | var d = t2 * t; |
| 2950 | return a * curve[0] + b * curve[2] + c * curve[4] + d * curve[6]; |
| 2951 | } |
| 2952 | |
| 2953 | function y_at_t(curve, t) { |
| 2954 | var one_t = 1 - t; |
| 2955 | if (curve.length == 4) { |
| 2956 | return one_t * curve[1] + t * curve[3]; |
| 2957 | } |
| 2958 | var one_t2 = one_t * one_t; |
| 2959 | var t2 = t * t; |
| 2960 | if (curve.length == 6) { |
| 2961 | return one_t2 * curve[1] + 2 * one_t * t * curve[3] + t2 * curve[5]; |
| 2962 | } |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2963 | if (curve.length == 7) { |
| 2964 | return (one_t2 * curve[1] + 2 * one_t * t * curve[3] * curve[6] + t2 * curve[5]) |
| 2965 | / (one_t2 +2 * one_t * t * curve[6] + t2); |
| 2966 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2967 | var a = one_t2 * one_t; |
| 2968 | var b = 3 * one_t2 * t; |
| 2969 | var c = 3 * one_t * t2; |
| 2970 | var d = t2 * t; |
| 2971 | return a * curve[1] + b * curve[3] + c * curve[5] + d * curve[7]; |
| 2972 | } |
| 2973 | |
| 2974 | function drawOrder(curve, label) { |
| 2975 | var px = x_at_t(curve, 0.75); |
| 2976 | var py = y_at_t(curve, 0.75); |
| 2977 | var _px = (px - srcLeft) * scale; |
| 2978 | var _py = (py - srcTop) * scale; |
| 2979 | ctx.beginPath(); |
| 2980 | ctx.arc(_px, _py, 15, 0, Math.PI * 2, true); |
| 2981 | ctx.closePath(); |
| 2982 | ctx.fillStyle = "white"; |
| 2983 | ctx.fill(); |
| 2984 | if (label == 'L') { |
| 2985 | ctx.strokeStyle = "rgba(255,0,0, 1)"; |
| 2986 | ctx.fillStyle = "rgba(255,0,0, 1)"; |
| 2987 | } else { |
| 2988 | ctx.strokeStyle = "rgba(0,0,255, 1)"; |
| 2989 | ctx.fillStyle = "rgba(0,0,255, 1)"; |
| 2990 | } |
| 2991 | ctx.stroke(); |
| 2992 | ctx.font = "normal 16px Arial"; |
| 2993 | ctx.textAlign = "center"; |
| 2994 | ctx.fillText(label, _px, _py + 5); |
| 2995 | ctx.font = "normal 10px Arial"; |
| 2996 | } |
| 2997 | |
| 2998 | function drawID(curve, id) { |
| 2999 | var px = x_at_t(curve, 0.5); |
| 3000 | var py = y_at_t(curve, 0.5); |
| 3001 | var _px = (px - srcLeft) * scale; |
| 3002 | var _py = (py - srcTop) * scale; |
| 3003 | draw_id_at(id, _px, _py); |
| 3004 | } |
| 3005 | |
| 3006 | function draw_id_at(id, _px, _py) { |
| 3007 | ctx.beginPath(); |
| 3008 | ctx.arc(_px, _py, 15, 0, Math.PI * 2, true); |
| 3009 | ctx.closePath(); |
| 3010 | ctx.fillStyle = "white"; |
| 3011 | ctx.fill(); |
| 3012 | ctx.strokeStyle = "rgba(127,127,0, 1)"; |
| 3013 | ctx.fillStyle = "rgba(127,127,0, 1)"; |
| 3014 | ctx.stroke(); |
| 3015 | ctx.font = "normal 16px Arial"; |
| 3016 | ctx.textAlign = "center"; |
| 3017 | ctx.fillText(id, _px, _py + 5); |
| 3018 | ctx.font = "normal 10px Arial"; |
| 3019 | } |
| 3020 | |
| 3021 | function drawLinePartialID(id, x1, y1, x2, y2, t1, t2) { |
| 3022 | var curve = [x1, y1, x2, y2]; |
| 3023 | drawCurvePartialID(id, curve, t1, t2); |
| 3024 | } |
| 3025 | |
| 3026 | function drawQuadPartialID(id, x1, y1, x2, y2, x3, y3, t1, t2) { |
| 3027 | var curve = [x1, y1, x2, y2, x3, y3]; |
| 3028 | drawCurvePartialID(id, curve, t1, t2); |
| 3029 | } |
| 3030 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3031 | function drawConicPartialID(id, x1, y1, x2, y2, x3, y3, w, t1, t2) { |
| 3032 | var curve = [x1, y1, x2, y2, x3, y3, w]; |
| 3033 | drawCurvePartialID(id, curve, t1, t2); |
| 3034 | } |
| 3035 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3036 | function drawCubicPartialID(id, x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { |
| 3037 | var curve = [x1, y1, x2, y2, x3, y3, x4, y4]; |
| 3038 | drawCurvePartialID(id, curve, t1, t2); |
| 3039 | } |
| 3040 | |
| 3041 | function drawCurvePartialID(id, curve, t1, t2) { |
| 3042 | var px = x_at_t(curve, (t1 + t2) / 2); |
| 3043 | var py = y_at_t(curve, (t1 + t2) / 2); |
| 3044 | var _px = (px - srcLeft) * scale; |
| 3045 | var _py = (py - srcTop) * scale; |
| 3046 | draw_id_at(id, _px, _py); |
| 3047 | } |
| 3048 | |
| 3049 | function drawCurveSpecials(test, curve, type) { |
| 3050 | if (pt_labels) { |
| 3051 | drawPoints(curve, type, pt_labels == 2); |
| 3052 | } |
| 3053 | if (control_lines != 0) { |
| 3054 | drawControlLines(curve, type, control_lines); |
| 3055 | } |
| 3056 | if (curve_t) { |
| 3057 | drawPointAtT(curve, type); |
| 3058 | } |
| 3059 | if (draw_midpoint) { |
| 3060 | var mid = pointAtT(curve, type, 0.5); |
| 3061 | drawPoint(mid.x, mid.y, true); |
| 3062 | } |
| 3063 | if (draw_id) { |
| 3064 | var id = idByCurve(test, curve, type); |
| 3065 | if (id >= 0) { |
| 3066 | drawID(curve, id); |
| 3067 | } |
| 3068 | } |
| 3069 | if (type == PATH_LINE) { |
| 3070 | return; |
| 3071 | } |
| 3072 | if (draw_deriviatives > 0) { |
| 3073 | var d = dxy_at_t(curve, type, 0); |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3074 | drawArrow(curve[0], curve[1], d.x, d.y, 1); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3075 | if (draw_deriviatives == 2) { |
| 3076 | d = dxy_at_t(curve, type, 1); |
| 3077 | if (type == PATH_CUBIC) { |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3078 | drawArrow(curve[6], curve[7], d.x, d.y, 1); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3079 | } else { |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3080 | drawArrow(curve[4], curve[5], d.x, d.y, 1); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3081 | } |
| 3082 | } |
| 3083 | if (draw_midpoint) { |
| 3084 | var mid = pointAtT(curve, type, 0.5); |
| 3085 | d = dxy_at_t(curve, type, 0.5); |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3086 | drawArrow(mid.x, mid.y, d.x, d.y, 1); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3087 | } |
| 3088 | } |
| 3089 | if (type != PATH_CUBIC) { |
| 3090 | return; |
| 3091 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3092 | if (draw_sequence) { |
| 3093 | var ymin = Math.min(curve[1], curve[3], curve[5], curve[7]); |
| 3094 | for (var i = 0; i < 8; i+= 2) { |
| 3095 | drawLabelX(ymin, i >> 1, curve[i]); |
| 3096 | } |
| 3097 | var xmin = Math.min(curve[0], curve[2], curve[4], curve[6]); |
| 3098 | for (var i = 1; i < 8; i+= 2) { |
| 3099 | drawLabelY(xmin, i >> 1, curve[i]); |
| 3100 | } |
| 3101 | } |
| 3102 | } |
| 3103 | |
| 3104 | function logCurves(test) { |
| 3105 | for (curves in test) { |
| 3106 | var curve = test[curves]; |
| 3107 | dumpCurve(curve); |
| 3108 | } |
| 3109 | } |
| 3110 | |
| 3111 | function curveToString(curve) { |
| 3112 | var str = "{{"; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3113 | var length = curve.length == 7 ? 6 : curve.length; |
| 3114 | if (curve.length == 7) { |
| 3115 | str += "{"; |
| 3116 | } |
| 3117 | for (i = 0; i < length; i += 2) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3118 | str += curve[i].toFixed(decimal_places) + "," + curve[i + 1].toFixed(decimal_places); |
| 3119 | if (i < curve.length - 2) { |
| 3120 | str += "}, {"; |
| 3121 | } |
| 3122 | } |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3123 | str += "}"; |
| 3124 | if (curve.length == 7) { |
| 3125 | str += "}, " + curve[6].toFixed(decimal_places); |
| 3126 | } |
| 3127 | str += "}"; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3128 | return str; |
| 3129 | } |
| 3130 | |
| 3131 | function dumpCurve(curve) { |
| 3132 | console.log(curveToString(curve)); |
| 3133 | } |
| 3134 | |
| 3135 | function draw(test, lines, title) { |
| 3136 | ctx.fillStyle = "rgba(0,0,0, 0.1)"; |
| 3137 | ctx.font = "normal 50px Arial"; |
| 3138 | ctx.textAlign = "left"; |
| 3139 | ctx.fillText(title, 50, 50); |
| 3140 | ctx.font = "normal 10px Arial"; |
| 3141 | ctx.lineWidth = "1.001"; "0.999"; |
| 3142 | var secondPath = test.length; |
| 3143 | var closeCount = 0; |
| 3144 | logStart = -1; |
| 3145 | logRange = 0; |
| 3146 | // find last active rec type at this step |
| 3147 | var curType = test[0]; |
| 3148 | var curStep = 0; |
| 3149 | var hasOp = false; |
| 3150 | var lastActive = 0; |
| 3151 | var lastAdd = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3152 | var lastCoin = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3153 | var lastSect = 0; |
| 3154 | var lastSort = 0; |
| 3155 | var lastMark = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3156 | var lastTop = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3157 | activeCount = 0; |
| 3158 | addCount = 0; |
| 3159 | angleCount = 0; |
| 3160 | opCount = 0; |
| 3161 | sectCount = 0; |
| 3162 | sortCount = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3163 | topCount = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3164 | markCount = 0; |
| 3165 | activeMax = 0; |
| 3166 | addMax = 0; |
| 3167 | angleMax = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3168 | coinMax = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3169 | opMax = 0; |
| 3170 | sectMax = 0; |
| 3171 | sectMax2 = 0; |
| 3172 | sortMax = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3173 | topMax = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3174 | markMax = 0; |
| 3175 | lastIndex = test.length - 3; |
| 3176 | for (var tIndex = 0; tIndex < test.length; tIndex += 3) { |
| 3177 | var recType = test[tIndex]; |
| 3178 | if (!typeof recType == 'number' || recType < REC_TYPE_UNKNOWN || recType > REC_TYPE_LAST) { |
| 3179 | console.log("unknown rec type: " + recType); |
| 3180 | throw "stop execution"; |
| 3181 | } |
| 3182 | // if (curType == recType && curType != REC_TYPE_ADD) { |
| 3183 | // continue; |
| 3184 | // } |
| 3185 | var inStepRange = step_limit == 0 || curStep < step_limit; |
| 3186 | curType = recType; |
| 3187 | if (recType == REC_TYPE_OP) { |
| 3188 | hasOp = true; |
| 3189 | continue; |
| 3190 | } |
| 3191 | if (recType == REC_TYPE_UNKNOWN) { |
| 3192 | // these types do not advance step |
| 3193 | continue; |
| 3194 | } |
| 3195 | var bumpStep = false; |
| 3196 | var records = test[tIndex + 2]; |
| 3197 | var fragType = records[0]; |
| 3198 | if (recType == REC_TYPE_ADD) { |
| 3199 | if (records.length != 2) { |
| 3200 | console.log("expect only two elements: " + records.length); |
| 3201 | throw "stop execution"; |
| 3202 | } |
| 3203 | if (fragType == ADD_MOVETO || fragType == ADD_CLOSE) { |
| 3204 | continue; |
| 3205 | } |
| 3206 | ++addMax; |
| 3207 | if (!draw_add || !inStepRange) { |
| 3208 | continue; |
| 3209 | } |
| 3210 | lastAdd = tIndex; |
| 3211 | ++addCount; |
| 3212 | bumpStep = true; |
| 3213 | } |
| 3214 | if (recType == REC_TYPE_PATH && hasOp) { |
| 3215 | secondPath = tIndex; |
| 3216 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3217 | if (recType == REC_TYPE_PATH2 && hasOp) { |
| 3218 | secondPath = tIndex; |
| 3219 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3220 | if (recType == REC_TYPE_ACTIVE) { |
| 3221 | ++activeMax; |
| 3222 | if (!draw_active || !inStepRange) { |
| 3223 | continue; |
| 3224 | } |
| 3225 | lastActive = tIndex; |
| 3226 | ++activeCount; |
| 3227 | bumpStep = true; |
| 3228 | } |
| 3229 | if (recType == REC_TYPE_ACTIVE_OP) { |
| 3230 | ++opMax; |
| 3231 | if (!draw_op || !inStepRange) { |
| 3232 | continue; |
| 3233 | } |
| 3234 | lastOp = tIndex; |
| 3235 | ++opCount; |
| 3236 | bumpStep = true; |
| 3237 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3238 | if (recType == REC_TYPE_AFTERPART) { |
| 3239 | if (draw_angle != 3 || !inStepRange) { |
| 3240 | continue; |
| 3241 | } |
| 3242 | lastAngle = tIndex; |
| 3243 | ++angleCount; |
| 3244 | bumpStep = true; |
| 3245 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3246 | if (recType == REC_TYPE_ANGLE) { |
| 3247 | ++angleMax; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3248 | if (draw_angle == 0 || draw_angle == 3 || !inStepRange) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3249 | continue; |
| 3250 | } |
| 3251 | lastAngle = tIndex; |
| 3252 | ++angleCount; |
| 3253 | bumpStep = true; |
| 3254 | } |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3255 | if (recType == REC_TYPE_COINCIDENCE) { |
| 3256 | ++coinMax; |
| 3257 | if (!draw_coincidence || !inStepRange) { |
| 3258 | continue; |
| 3259 | } |
| 3260 | lastCoin = tIndex; |
| 3261 | ++coinCount; |
| 3262 | bumpStep = true; |
| 3263 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3264 | if (recType == REC_TYPE_SECT) { |
| 3265 | if (records.length != 2) { |
| 3266 | console.log("expect only two elements: " + records.length); |
| 3267 | throw "stop execution"; |
| 3268 | } |
| 3269 | ++sectMax; |
| 3270 | var sectBump = 1; |
| 3271 | switch (fragType) { |
| 3272 | case INTERSECT_LINE: |
| 3273 | case INTERSECT_QUAD_LINE: |
| 3274 | case INTERSECT_QUAD: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3275 | case INTERSECT_CONIC_LINE: |
| 3276 | case INTERSECT_CONIC: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3277 | case INTERSECT_SELF_CUBIC: |
| 3278 | case INTERSECT_CUBIC_LINE: |
| 3279 | case INTERSECT_CUBIC_QUAD: |
| 3280 | case INTERSECT_CUBIC: |
| 3281 | sectBump = 1; |
| 3282 | break; |
| 3283 | case INTERSECT_LINE_2: |
| 3284 | case INTERSECT_QUAD_LINE_2: |
| 3285 | case INTERSECT_QUAD_2: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3286 | case INTERSECT_CONIC_LINE_2: |
| 3287 | case INTERSECT_CONIC_2: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3288 | case INTERSECT_CUBIC_LINE_2: |
| 3289 | case INTERSECT_CUBIC_QUAD_2: |
| 3290 | case INTERSECT_CUBIC_2: |
| 3291 | sectBump = 2; |
| 3292 | break; |
| 3293 | case INTERSECT_LINE_NO: |
| 3294 | case INTERSECT_QUAD_LINE_NO: |
| 3295 | case INTERSECT_QUAD_NO: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3296 | case INTERSECT_CONIC_LINE_NO: |
| 3297 | case INTERSECT_CONIC_NO: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3298 | case INTERSECT_SELF_CUBIC_NO: |
| 3299 | case INTERSECT_CUBIC_LINE_NO: |
| 3300 | case INTERSECT_CUBIC_QUAD_NO: |
| 3301 | case INTERSECT_CUBIC_NO: |
| 3302 | sectBump = 0; |
| 3303 | break; |
| 3304 | case INTERSECT_CUBIC_LINE_3: |
| 3305 | case INTERSECT_CUBIC_QUAD_3: |
| 3306 | case INTERSECT_CUBIC_3: |
| 3307 | sectBump = 3; |
| 3308 | break; |
| 3309 | case INTERSECT_CUBIC_QUAD_4: |
| 3310 | case INTERSECT_CUBIC_4: |
| 3311 | sectBump = 4; |
| 3312 | break; |
| 3313 | default: |
| 3314 | console.log("missing case " + records.length); |
| 3315 | throw "stop execution"; |
| 3316 | } |
| 3317 | sectMax2 += sectBump; |
| 3318 | if (draw_intersection <= 1 || !inStepRange) { |
| 3319 | continue; |
| 3320 | } |
| 3321 | lastSect = tIndex; |
| 3322 | sectCount += sectBump; |
| 3323 | bumpStep = true; |
| 3324 | } |
| 3325 | if (recType == REC_TYPE_SORT) { |
| 3326 | ++sortMax; |
| 3327 | if (!draw_sort || !inStepRange) { |
| 3328 | continue; |
| 3329 | } |
| 3330 | lastSort = tIndex; |
| 3331 | ++sortCount; |
| 3332 | bumpStep = true; |
| 3333 | } |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3334 | if (recType == REC_TYPE_TOP) { |
| 3335 | ++topMax; |
| 3336 | if (!draw_top || !inStepRange) { |
| 3337 | continue; |
| 3338 | } |
| 3339 | lastTop = tIndex; |
| 3340 | ++topCount; |
| 3341 | bumpStep = true; |
| 3342 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3343 | if (recType == REC_TYPE_MARK) { |
| 3344 | ++markMax; |
| 3345 | if (!draw_mark || !inStepRange) { |
| 3346 | continue; |
| 3347 | } |
| 3348 | lastMark = tIndex; |
| 3349 | ++markCount; |
| 3350 | bumpStep = true; |
| 3351 | } |
| 3352 | if (bumpStep) { |
| 3353 | lastIndex = tIndex; |
| 3354 | logStart = test[tIndex + 1]; |
| 3355 | logRange = records.length / 2; |
| 3356 | ++curStep; |
| 3357 | } |
| 3358 | } |
| 3359 | stepMax = (draw_add ? addMax : 0) |
| 3360 | + (draw_active ? activeMax : 0) |
reed | 0dc4dd6 | 2015-03-24 13:55:33 -0700 | [diff] [blame] | 3361 | + (draw_angle ? angleMax : 0) |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3362 | + (draw_coincidence ? coinMax : 0) |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3363 | + (draw_op ? opMax : 0) |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3364 | + (draw_sort ? sortMax : 0) |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3365 | + (draw_top ? topMax : 0) |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3366 | + (draw_mark ? markMax : 0) |
| 3367 | + (draw_intersection == 2 ? sectMax : draw_intersection == 3 ? sectMax2 : 0); |
| 3368 | if (stepMax == 0) { |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3369 | stepMax = addMax + activeMax + angleMax + coinMax + opMax + sortMax + topMax + markMax; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3370 | } |
| 3371 | drawnPts = []; |
| 3372 | drawnLines = []; |
| 3373 | drawnQuads = []; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3374 | drawnConics = []; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3375 | drawnCubics = []; |
| 3376 | focusXmin = focusYmin = Infinity; |
| 3377 | focusXmax = focusYmax = -Infinity; |
| 3378 | var pathIndex = 0; |
| 3379 | var opLetter = 'S'; |
| 3380 | for (var tIndex = lastIndex; tIndex >= 0; tIndex -= 3) { |
| 3381 | var recType = test[tIndex]; |
| 3382 | var records = test[tIndex + 2]; |
| 3383 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 3384 | var fragType = records[recordIndex]; |
| 3385 | if (!typeof fragType == 'number' || fragType < 1 || fragType > FRAG_TYPE_LAST) { |
| 3386 | console.log("unknown in range frag type: " + fragType); |
| 3387 | throw "stop execution"; |
| 3388 | } |
| 3389 | var frags = records[recordIndex + 1]; |
| 3390 | focus_enabled = false; |
| 3391 | switch (recType) { |
| 3392 | case REC_TYPE_COMPUTED: |
| 3393 | if (draw_computed == 0) { |
| 3394 | continue; |
| 3395 | } |
| 3396 | ctx.lineWidth = 1; |
| 3397 | ctx.strokeStyle = pathIndex == 0 ? "black" : "red"; |
| 3398 | ctx.fillStyle = "blue"; |
| 3399 | var drawThis = false; |
| 3400 | switch (fragType) { |
| 3401 | case PATH_QUAD: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3402 | if ((draw_computed & 0x9) == 1 || ((draw_computed & 8) != 0 |
| 3403 | && (draw_computed & 7) == pathIndex)) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3404 | drawQuad(frags[0], frags[1], frags[2], frags[3], |
| 3405 | frags[4], frags[5]); |
| 3406 | drawThis = true; |
| 3407 | } |
| 3408 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3409 | case PATH_CONIC: |
| 3410 | if ((draw_computed & 0xA) == 2 || ((draw_computed & 8) != 0 |
| 3411 | && (draw_computed & 7) == pathIndex)) { |
| 3412 | drawConicWithQuads(frags[0], frags[1], frags[2], frags[3], |
| 3413 | frags[4], frags[5], frags[6]); |
| 3414 | drawThis = true; |
| 3415 | } |
| 3416 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3417 | case PATH_CUBIC: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3418 | if ((draw_computed & 0xC) == 4 || ((draw_computed & 8) != 0 |
| 3419 | && (draw_computed & 7) == pathIndex)) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3420 | drawCubic(frags[0], frags[1], frags[2], frags[3], |
| 3421 | frags[4], frags[5], frags[6], frags[7]); |
| 3422 | drawThis = true; |
| 3423 | } |
| 3424 | ++pathIndex; |
| 3425 | break; |
| 3426 | case COMPUTED_SET_1: |
| 3427 | pathIndex = 0; |
| 3428 | break; |
| 3429 | case COMPUTED_SET_2: |
| 3430 | pathIndex = 1; |
| 3431 | break; |
| 3432 | default: |
| 3433 | console.log("unknown REC_TYPE_COMPUTED frag type: " + fragType); |
| 3434 | throw "stop execution"; |
| 3435 | } |
| 3436 | if (!drawThis || collect_bounds) { |
| 3437 | break; |
| 3438 | } |
| 3439 | drawCurveSpecials(test, frags, fragType); |
| 3440 | break; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 3441 | case REC_TYPE_ALIGNED: |
| 3442 | if (draw_path < 4) { |
| 3443 | continue; |
| 3444 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3445 | case REC_TYPE_PATH: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3446 | case REC_TYPE_PATH2: |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 3447 | if (REC_TYPE_ALIGNED != recType && draw_path >= 4) { |
| 3448 | continue; |
| 3449 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3450 | if (!draw_path) { |
| 3451 | continue; |
| 3452 | } |
| 3453 | var firstPath = tIndex < secondPath; |
| 3454 | if ((draw_path & (firstPath ? 1 : 2)) == 0) { |
| 3455 | continue; |
| 3456 | } |
| 3457 | ctx.lineWidth = 1; |
| 3458 | ctx.strokeStyle = firstPath ? "black" : "red"; |
| 3459 | ctx.fillStyle = "blue"; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3460 | var frags2 = []; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3461 | switch (fragType) { |
| 3462 | case PATH_LINE: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3463 | for (var i = 0; i < 4; ++ i) { frags2[i] = frags[i + 1]; } |
| 3464 | drawLine(frags2[0], frags2[1], frags2[2], frags2[3]); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3465 | break; |
| 3466 | case PATH_QUAD: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3467 | for (var i = 0; i < 6; ++ i) { frags2[i] = frags[i + 1]; } |
| 3468 | drawQuad(frags2[0], frags2[1], frags2[2], frags2[3], |
| 3469 | frags2[4], frags2[5]); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3470 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3471 | case PATH_CONIC: |
| 3472 | for (var i = 0; i < 7; ++ i) { frags2[i] = frags[i + 1]; } |
| 3473 | drawConicWithQuads(frags2[0], frags2[1], frags2[2], frags2[3], |
| 3474 | frags2[4], frags2[5], frags2[6]); |
| 3475 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3476 | case PATH_CUBIC: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3477 | for (var i = 0; i < 8; ++ i) { frags2[i] = frags[i + 1]; } |
| 3478 | drawCubic(frags2[0], frags2[1], frags2[2], frags2[3], |
| 3479 | frags2[4], frags2[5], frags2[6], frags2[7]); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3480 | break; |
| 3481 | default: |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 3482 | console.log("unknown " + recType + " frag type: " + fragType); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3483 | throw "stop execution"; |
| 3484 | } |
| 3485 | if (collect_bounds) { |
| 3486 | break; |
| 3487 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3488 | drawCurveSpecials(test, frags2, fragType); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3489 | break; |
| 3490 | case REC_TYPE_OP: |
| 3491 | switch (fragType) { |
| 3492 | case OP_INTERSECT: opLetter = 'I'; break; |
| 3493 | case OP_DIFFERENCE: opLetter = 'D'; break; |
| 3494 | case OP_UNION: opLetter = 'U'; break; |
| 3495 | case OP_XOR: opLetter = 'X'; break; |
| 3496 | default: |
| 3497 | console.log("unknown REC_TYPE_OP frag type: " + fragType); |
| 3498 | throw "stop execution"; |
| 3499 | } |
| 3500 | break; |
| 3501 | case REC_TYPE_ACTIVE: |
| 3502 | if (!draw_active || (step_limit > 0 && tIndex < lastActive)) { |
| 3503 | continue; |
| 3504 | } |
| 3505 | var x1 = frags[SPAN_X1]; |
| 3506 | var y1 = frags[SPAN_Y1]; |
| 3507 | var x2 = frags[SPAN_X2]; |
| 3508 | var y2 = frags[SPAN_Y2]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3509 | var x3, y3, x3, y4, t1, t2, w; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3510 | ctx.lineWidth = 3; |
| 3511 | ctx.strokeStyle = "rgba(0,0,255, 0.3)"; |
| 3512 | focus_enabled = true; |
| 3513 | switch (fragType) { |
| 3514 | case ACTIVE_LINE_SPAN: |
| 3515 | t1 = frags[SPAN_L_T]; |
| 3516 | t2 = frags[SPAN_L_TEND]; |
| 3517 | drawLinePartial(x1, y1, x2, y2, t1, t2); |
| 3518 | if (draw_id) { |
| 3519 | drawLinePartialID(frags[0], x1, y1, x2, y2, t1, t2); |
| 3520 | } |
| 3521 | break; |
| 3522 | case ACTIVE_QUAD_SPAN: |
| 3523 | x3 = frags[SPAN_X3]; |
| 3524 | y3 = frags[SPAN_Y3]; |
| 3525 | t1 = frags[SPAN_Q_T]; |
| 3526 | t2 = frags[SPAN_Q_TEND]; |
| 3527 | drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2); |
| 3528 | if (draw_id) { |
| 3529 | drawQuadPartialID(frags[0], x1, y1, x2, y2, x3, y3, t1, t2); |
| 3530 | } |
| 3531 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3532 | case ACTIVE_CONIC_SPAN: |
| 3533 | x3 = frags[SPAN_X3]; |
| 3534 | y3 = frags[SPAN_Y3]; |
| 3535 | t1 = frags[SPAN_K_T]; |
| 3536 | t2 = frags[SPAN_K_TEND]; |
| 3537 | w = frags[SPAN_K_W]; |
| 3538 | drawConicPartial(x1, y1, x2, y2, x3, y3, w, t1, t2); |
| 3539 | if (draw_id) { |
| 3540 | drawConicPartialID(frags[0], x1, y1, x2, y2, x3, y3, w, t1, t2); |
| 3541 | } |
| 3542 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3543 | case ACTIVE_CUBIC_SPAN: |
| 3544 | x3 = frags[SPAN_X3]; |
| 3545 | y3 = frags[SPAN_Y3]; |
| 3546 | x4 = frags[SPAN_X4]; |
| 3547 | y4 = frags[SPAN_Y4]; |
| 3548 | t1 = frags[SPAN_C_T]; |
| 3549 | t2 = frags[SPAN_C_TEND]; |
| 3550 | drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2); |
| 3551 | if (draw_id) { |
| 3552 | drawCubicPartialID(frags[0], x1, y1, x2, y2, x3, y3, x4, y4, t1, t2); |
| 3553 | } |
| 3554 | break; |
| 3555 | default: |
| 3556 | console.log("unknown REC_TYPE_ACTIVE frag type: " + fragType); |
| 3557 | throw "stop execution"; |
| 3558 | } |
| 3559 | break; |
| 3560 | case REC_TYPE_ACTIVE_OP: |
| 3561 | if (!draw_op || (step_limit > 0 && tIndex < lastOp)) { |
| 3562 | continue; |
| 3563 | } |
| 3564 | focus_enabled = true; |
| 3565 | ctx.lineWidth = 3; |
| 3566 | var activeSpan = frags[7] == "1"; |
| 3567 | ctx.strokeStyle = activeSpan ? "rgba(45,160,0, 0.3)" : "rgba(255,45,0, 0.5)"; |
| 3568 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 3569 | drawCurve(curve); |
| 3570 | if (draw_op > 1) { |
| 3571 | drawArc(curve, false, frags[3], frags[4]); |
| 3572 | drawArc(curve, true, frags[5], frags[6]); |
| 3573 | } |
| 3574 | break; |
| 3575 | case REC_TYPE_ADD: |
| 3576 | if (!draw_add) { |
| 3577 | continue; |
| 3578 | } |
| 3579 | ctx.lineWidth = 3; |
| 3580 | ctx.strokeStyle = closeCount == 0 ? "rgba(0,0,255, 0.3)" |
| 3581 | : closeCount == 1 ? "rgba(0,127,0, 0.3)" |
| 3582 | : closeCount == 2 ? "rgba(0,127,127, 0.3)" |
| 3583 | : closeCount == 3 ? "rgba(127,127,0, 0.3)" |
| 3584 | : "rgba(127,0,127, 0.3)"; |
| 3585 | focus_enabled = true; |
| 3586 | switch (fragType) { |
| 3587 | case ADD_MOVETO: |
| 3588 | break; |
| 3589 | case ADD_LINETO: |
| 3590 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 3591 | drawLine(frags[0], frags[1], frags[2], frags[3]); |
| 3592 | } |
| 3593 | break; |
| 3594 | case ADD_QUADTO: |
| 3595 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 3596 | drawQuad(frags[0], frags[1], frags[2], frags[3], frags[4], frags[5]); |
| 3597 | } |
| 3598 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3599 | case ADD_CONICTO: |
| 3600 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 3601 | drawConicWithQuads(frags[0], frags[1], frags[2], frags[3], |
| 3602 | frags[4], frags[5], frags[6]); |
| 3603 | } |
| 3604 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3605 | case ADD_CUBICTO: |
| 3606 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 3607 | drawCubic(frags[0], frags[1], frags[2], frags[3], |
| 3608 | frags[4], frags[5], frags[6], frags[7]); |
| 3609 | } |
| 3610 | break; |
| 3611 | case ADD_CLOSE: |
| 3612 | ++closeCount; |
| 3613 | break; |
| 3614 | case ADD_FILL: |
| 3615 | break; |
| 3616 | default: |
| 3617 | console.log("unknown REC_TYPE_ADD frag type: " + fragType); |
| 3618 | throw "stop execution"; |
| 3619 | } |
| 3620 | break; |
| 3621 | case REC_TYPE_ANGLE: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3622 | angleBetween = frags[18] == "T"; |
| 3623 | afterIndex = 0; |
| 3624 | if (draw_angle == 0 || draw_angle == 3 || (step_limit > 0 && tIndex < lastAngle)) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3625 | continue; |
| 3626 | } |
| 3627 | focus_enabled = true; |
| 3628 | ctx.lineWidth = 3; |
| 3629 | ctx.strokeStyle = "rgba(127,45,127, 0.3)"; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3630 | var leftCurve = curvePartialByID(test, frags[0], frags[4], frags[5]); |
| 3631 | var midCurve = curvePartialByID(test, frags[6], frags[10], frags[11]); |
| 3632 | var rightCurve = curvePartialByID(test, frags[12], frags[16], frags[17]); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3633 | drawCurve(leftCurve); |
| 3634 | drawCurve(rightCurve); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3635 | ctx.strokeStyle = angleBetween ? "rgba(0,160,45, 0.3)" : "rgba(255,0,45, 0.5)"; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3636 | drawCurve(midCurve); |
| 3637 | if (draw_angle > 1) { |
| 3638 | drawOrder(leftCurve, 'L'); |
| 3639 | drawOrder(rightCurve, 'R'); |
| 3640 | } |
| 3641 | break; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3642 | case REC_TYPE_AFTERPART: |
| 3643 | if (draw_angle != 3 || (step_limit > 0 && tIndex < lastAngle)) { |
| 3644 | continue; |
| 3645 | } |
| 3646 | ctx.strokeStyle = afterIndex == 0 ? "rgba(255,0,0, 1.0)" |
| 3647 | : (afterIndex == 1) == angleBetween ? "rgba(0,128,0, 1.0)" |
| 3648 | : "rgba(0,0,255, 1.0)"; |
| 3649 | switch (fragType) { |
| 3650 | case PATH_LINE: |
| 3651 | drawLine(frags[0], frags[1], frags[2], frags[3]); |
| 3652 | break; |
| 3653 | case PATH_QUAD: |
| 3654 | drawQuad(frags[0], frags[1], frags[2], frags[3], |
| 3655 | frags[4], frags[5]); |
| 3656 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3657 | case PATH_CONIC: |
| 3658 | drawConicWithQuads(frags[0], frags[1], frags[2], frags[3], |
| 3659 | frags[4], frags[5], frags[6]); |
| 3660 | break; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3661 | case PATH_CUBIC: |
| 3662 | drawCubic(frags[0], frags[1], frags[2], frags[3], |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3663 | frags[4], frags[5], frags[6], frags[7]); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3664 | break; |
| 3665 | default: |
| 3666 | console.log("unknown REC_TYPE_AFTERPART frag type: " + fragType); |
| 3667 | throw "stop execution"; |
| 3668 | } |
| 3669 | ++afterIndex; |
| 3670 | break; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3671 | case REC_TYPE_COINCIDENCE: |
| 3672 | if (!draw_coincidence || (step_limit > 0 && tIndex < lastCoin)) { |
| 3673 | continue; |
| 3674 | } |
| 3675 | focus_enabled = true; |
| 3676 | ctx.lineWidth = 3; |
| 3677 | ctx.strokeStyle = "rgba(127,45,63, 0.3)"; |
| 3678 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 3679 | drawCurve(curve); |
| 3680 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3681 | case REC_TYPE_SECT: |
| 3682 | if (!draw_intersection) { |
| 3683 | continue; |
| 3684 | } |
| 3685 | if (draw_intersection != 1 && (step_limit > 0 && tIndex < lastSect)) { |
| 3686 | continue; |
| 3687 | } |
| 3688 | // draw_intersection == 1 : show all |
| 3689 | // draw_intersection == 2 : step == 0 ? show all : show intersection line #step |
| 3690 | // draw_intersection == 3 : step == 0 ? show all : show intersection #step |
| 3691 | ctx.lineWidth = 1; |
| 3692 | ctx.strokeStyle = "rgba(0,0,255, 0.3)"; |
| 3693 | ctx.fillStyle = "blue"; |
| 3694 | focus_enabled = true; |
| 3695 | var f = []; |
| 3696 | var c1s; |
| 3697 | var c1l; |
| 3698 | var c2s; |
| 3699 | var c2l; |
| 3700 | switch (fragType) { |
| 3701 | case INTERSECT_LINE: |
| 3702 | f.push(5, 6, 0, 7); |
| 3703 | c1s = 1; c1l = 4; c2s = 8; c2l = 4; |
| 3704 | break; |
| 3705 | case INTERSECT_LINE_2: |
| 3706 | f.push(5, 6, 0, 10); |
| 3707 | f.push(8, 9, 7, 15); |
| 3708 | c1s = 1; c1l = 4; c2s = 11; c2l = 4; |
| 3709 | break; |
| 3710 | case INTERSECT_LINE_NO: |
| 3711 | c1s = 0; c1l = 4; c2s = 4; c2l = 4; |
| 3712 | break; |
| 3713 | case INTERSECT_QUAD_LINE: |
| 3714 | f.push(7, 8, 0, 9); |
| 3715 | c1s = 1; c1l = 6; c2s = 10; c2l = 4; |
| 3716 | break; |
| 3717 | case INTERSECT_QUAD_LINE_2: |
| 3718 | f.push(7, 8, 0, 12); |
| 3719 | f.push(10, 11, 9, 17); |
| 3720 | c1s = 1; c1l = 6; c2s = 13; c2l = 4; |
| 3721 | break; |
| 3722 | case INTERSECT_QUAD_LINE_NO: |
| 3723 | c1s = 0; c1l = 6; c2s = 6; c2l = 4; |
| 3724 | break; |
| 3725 | case INTERSECT_QUAD: |
| 3726 | f.push(7, 8, 0, 9); |
| 3727 | c1s = 1; c1l = 6; c2s = 10; c2l = 6; |
| 3728 | break; |
| 3729 | case INTERSECT_QUAD_2: |
| 3730 | f.push(7, 8, 0, 12); |
| 3731 | f.push(10, 11, 9, 19); |
| 3732 | c1s = 1; c1l = 6; c2s = 13; c2l = 6; |
| 3733 | break; |
| 3734 | case INTERSECT_QUAD_NO: |
| 3735 | c1s = 0; c1l = 6; c2s = 6; c2l = 6; |
| 3736 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3737 | case INTERSECT_CONIC_LINE: |
| 3738 | f.push(8, 9, 0, 10); |
| 3739 | c1s = 1; c1l = 7; c2s = 11; c2l = 4; |
| 3740 | break; |
| 3741 | case INTERSECT_CONIC_LINE_2: |
| 3742 | f.push(8, 9, 0, 12); |
| 3743 | f.push(11, 12, 10, 18); |
| 3744 | c1s = 1; c1l = 7; c2s = 14; c2l = 4; |
| 3745 | break; |
| 3746 | case INTERSECT_CONIC_LINE_NO: |
| 3747 | c1s = 0; c1l = 7; c2s = 7; c2l = 4; |
| 3748 | break; |
| 3749 | case INTERSECT_CONIC: |
| 3750 | f.push(8, 9, 0, 10); |
| 3751 | c1s = 1; c1l = 7; c2s = 11; c2l = 7; |
| 3752 | break; |
| 3753 | case INTERSECT_CONIC_2: |
| 3754 | f.push(8, 9, 0, 13); |
| 3755 | f.push(11, 12, 10, 21); |
| 3756 | c1s = 1; c1l = 7; c2s = 14; c2l = 7; |
| 3757 | break; |
| 3758 | case INTERSECT_CONIC_NO: |
| 3759 | c1s = 0; c1l = 7; c2s = 7; c2l = 7; |
| 3760 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3761 | case INTERSECT_SELF_CUBIC: |
| 3762 | f.push(9, 10, 0, 11); |
| 3763 | c1s = 1; c1l = 8; c2s = 0; c2l = 0; |
| 3764 | break; |
| 3765 | case INTERSECT_SELF_CUBIC_NO: |
| 3766 | c1s = 0; c1l = 8; c2s = 0; c2l = 0; |
| 3767 | break; |
| 3768 | case INTERSECT_CUBIC_LINE: |
| 3769 | f.push(9, 10, 0, 11); |
| 3770 | c1s = 1; c1l = 8; c2s = 12; c2l = 4; |
| 3771 | break; |
| 3772 | case INTERSECT_CUBIC_LINE_2: |
| 3773 | f.push(9, 10, 0, 14); |
| 3774 | f.push(12, 13, 11, 19); |
| 3775 | c1s = 1; c1l = 8; c2s = 15; c2l = 4; |
| 3776 | break; |
| 3777 | case INTERSECT_CUBIC_LINE_3: |
| 3778 | f.push(9, 10, 0, 17); |
| 3779 | f.push(12, 13, 11, 22); |
| 3780 | f.push(15, 16, 14, 23); |
| 3781 | c1s = 1; c1l = 8; c2s = 18; c2l = 4; |
| 3782 | break; |
| 3783 | case INTERSECT_CUBIC_QUAD_NO: |
| 3784 | c1s = 0; c1l = 8; c2s = 8; c2l = 6; |
| 3785 | break; |
| 3786 | case INTERSECT_CUBIC_QUAD: |
| 3787 | f.push(9, 10, 0, 11); |
| 3788 | c1s = 1; c1l = 8; c2s = 12; c2l = 6; |
| 3789 | break; |
| 3790 | case INTERSECT_CUBIC_QUAD_2: |
| 3791 | f.push(9, 10, 0, 14); |
| 3792 | f.push(12, 13, 11, 21); |
| 3793 | c1s = 1; c1l = 8; c2s = 15; c2l = 6; |
| 3794 | break; |
| 3795 | case INTERSECT_CUBIC_QUAD_3: |
| 3796 | f.push(9, 10, 0, 17); |
| 3797 | f.push(12, 13, 11, 24); |
| 3798 | f.push(15, 16, 14, 25); |
| 3799 | c1s = 1; c1l = 8; c2s = 18; c2l = 6; |
| 3800 | break; |
| 3801 | case INTERSECT_CUBIC_QUAD_4: |
| 3802 | f.push(9, 10, 0, 20); |
| 3803 | f.push(12, 13, 11, 27); |
| 3804 | f.push(15, 16, 14, 28); |
| 3805 | f.push(18, 19, 17, 29); |
| 3806 | c1s = 1; c1l = 8; c2s = 21; c2l = 6; |
| 3807 | break; |
| 3808 | case INTERSECT_CUBIC_LINE_NO: |
| 3809 | c1s = 0; c1l = 8; c2s = 8; c2l = 4; |
| 3810 | break; |
| 3811 | case INTERSECT_CUBIC: |
| 3812 | f.push(9, 10, 0, 11); |
| 3813 | c1s = 1; c1l = 8; c2s = 12; c2l = 8; |
| 3814 | break; |
| 3815 | case INTERSECT_CUBIC_2: |
| 3816 | f.push(9, 10, 0, 14); |
| 3817 | f.push(12, 13, 11, 23); |
| 3818 | c1s = 1; c1l = 8; c2s = 15; c2l = 8; |
| 3819 | break; |
| 3820 | case INTERSECT_CUBIC_3: |
| 3821 | f.push(9, 10, 0, 17); |
| 3822 | f.push(12, 13, 11, 26); |
| 3823 | f.push(15, 16, 14, 27); |
| 3824 | c1s = 1; c1l = 8; c2s = 18; c2l = 8; |
| 3825 | break; |
| 3826 | case INTERSECT_CUBIC_4: |
| 3827 | f.push(9, 10, 0, 20); |
| 3828 | f.push(12, 13, 11, 29); |
| 3829 | f.push(15, 16, 14, 30); |
| 3830 | f.push(18, 19, 17, 31); |
| 3831 | c1s = 1; c1l = 8; c2s = 21; c2l = 8; |
| 3832 | break; |
| 3833 | case INTERSECT_CUBIC_NO: |
| 3834 | c1s = 0; c1l = 8; c2s = 8; c2l = 8; |
| 3835 | break; |
| 3836 | default: |
| 3837 | console.log("unknown REC_TYPE_SECT frag type: " + fragType); |
| 3838 | throw "stop execution"; |
| 3839 | } |
| 3840 | if (draw_intersection != 1) { |
| 3841 | var id = -1; |
| 3842 | var curve; |
| 3843 | switch (c1l) { |
| 3844 | case 4: |
| 3845 | drawLine(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3]); |
| 3846 | if (draw_id) { |
| 3847 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3]]; |
| 3848 | id = idByCurve(test, curve, PATH_LINE); |
| 3849 | } |
| 3850 | break; |
| 3851 | case 6: |
| 3852 | drawQuad(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 3853 | frags[c1s + 4], frags[c1s + 5]); |
| 3854 | if (draw_id) { |
| 3855 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 3856 | frags[c1s + 4], frags[c1s + 5]]; |
| 3857 | id = idByCurve(test, curve, PATH_QUAD); |
| 3858 | } |
| 3859 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3860 | case 7: |
| 3861 | drawConicWithQuads(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 3862 | frags[c1s + 4], frags[c1s + 5], frags[c1s + 6]); |
| 3863 | if (draw_id) { |
| 3864 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 3865 | frags[c1s + 4], frags[c1s + 5], frags[c1s + 6]]; |
| 3866 | id = idByCurve(test, curve, PATH_CONIC); |
| 3867 | } |
| 3868 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3869 | case 8: |
| 3870 | drawCubic(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 3871 | frags[c1s + 4], frags[c1s + 5], frags[c1s + 6], frags[c1s + 7]); |
| 3872 | if (draw_id) { |
| 3873 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 3874 | frags[c1s + 4], frags[c1s + 5], frags[c1s + 6], frags[c1s + 7]]; |
| 3875 | id = idByCurve(test, curve, PATH_CUBIC); |
| 3876 | } |
| 3877 | break; |
| 3878 | } |
| 3879 | if (id >= 0) { |
| 3880 | drawID(curve, id); |
| 3881 | } |
| 3882 | id = -1; |
| 3883 | switch (c2l) { |
| 3884 | case 0: |
| 3885 | break; |
| 3886 | case 4: |
| 3887 | drawLine(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3]); |
| 3888 | if (draw_id) { |
| 3889 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3]]; |
| 3890 | id = idByCurve(test, curve, PATH_LINE); |
| 3891 | } |
| 3892 | break; |
| 3893 | case 6: |
| 3894 | drawQuad(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 3895 | frags[c2s + 4], frags[c2s + 5]); |
| 3896 | if (draw_id) { |
| 3897 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 3898 | frags[c2s + 4], frags[c2s + 5]]; |
| 3899 | id = idByCurve(test, curve, PATH_QUAD); |
| 3900 | } |
| 3901 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3902 | case 7: |
| 3903 | drawConicWithQuads(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 3904 | frags[c2s + 4], frags[c2s + 5], frags[c2s + 6]); |
| 3905 | if (draw_id) { |
| 3906 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 3907 | frags[c2s + 4], frags[c2s + 5], frags[c2s + 6]]; |
| 3908 | id = idByCurve(test, curve, PATH_CONIC); |
| 3909 | } |
| 3910 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3911 | case 8: |
| 3912 | drawCubic(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 3913 | frags[c2s + 4], frags[c2s + 5], frags[c2s + 6], frags[c2s + 7]); |
| 3914 | if (draw_id) { |
| 3915 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 3916 | frags[c2s + 4], frags[c2s + 5], frags[c2s + 6], frags[c2s + 7]]; |
| 3917 | id = idByCurve(test, curve, PATH_CUBIC); |
| 3918 | } |
| 3919 | break; |
| 3920 | } |
| 3921 | if (id >= 0) { |
| 3922 | drawID(curve, id); |
| 3923 | } |
| 3924 | } |
| 3925 | if (collect_bounds) { |
| 3926 | break; |
| 3927 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3928 | if (draw_intersection != 3 || step_limit == 0 || tIndex >= lastSect) { |
| 3929 | for (var idx = 0; idx < f.length; idx += 4) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3930 | drawPoint(frags[f[idx]], frags[f[idx + 1]], true); |
| 3931 | } |
| 3932 | } |
| 3933 | if (!draw_intersectT) { |
| 3934 | break; |
| 3935 | } |
| 3936 | ctx.fillStyle = "red"; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3937 | if (draw_intersection != 3 || step_limit == 0 || tIndex >= lastSect) { |
| 3938 | for (var idx = 0; idx < f.length; idx += 4) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3939 | drawTAtPointUp(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 2]]); |
| 3940 | drawTAtPointDown(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 3]]); |
| 3941 | } |
| 3942 | } |
| 3943 | break; |
| 3944 | case REC_TYPE_SORT: |
| 3945 | if (!draw_sort || (step_limit > 0 && tIndex < lastSort)) { |
| 3946 | continue; |
| 3947 | } |
| 3948 | ctx.lineWidth = 3; |
| 3949 | ctx.strokeStyle = "rgba(127,127,0, 0.5)"; |
| 3950 | focus_enabled = true; |
| 3951 | switch (fragType) { |
| 3952 | case SORT_UNARY: |
| 3953 | case SORT_BINARY: |
| 3954 | var curve = curvePartialByID(test, frags[0], frags[6], frags[8]); |
| 3955 | drawCurve(curve); |
| 3956 | break; |
| 3957 | default: |
| 3958 | console.log("unknown REC_TYPE_SORT frag type: " + fragType); |
| 3959 | throw "stop execution"; |
| 3960 | } |
| 3961 | break; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3962 | case REC_TYPE_TOP: |
| 3963 | if (!draw_top || (step_limit > 0 && tIndex < lastTop)) { |
| 3964 | continue; |
| 3965 | } |
| 3966 | ctx.lineWidth = 3; |
| 3967 | ctx.strokeStyle = "rgba(127,127,0, 0.5)"; |
| 3968 | focus_enabled = true; |
| 3969 | { |
| 3970 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 3971 | drawCurve(curve); |
| 3972 | var type = PATH_LINE + (curve.length / 2 - 2); |
| 3973 | var mid = pointAtT(curve, type, 0.5); |
| 3974 | var d = dxy_at_t(curve, type, 0.5); |
| 3975 | drawArrow(mid.x, mid.y, d.x, d.y, 0.3); |
| 3976 | } |
| 3977 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3978 | case REC_TYPE_MARK: |
| 3979 | if (!draw_mark || (step_limit > 0 && tIndex < lastMark)) { |
| 3980 | continue; |
| 3981 | } |
| 3982 | ctx.lineWidth = 3; |
| 3983 | ctx.strokeStyle = fragType >= MARK_DONE_LINE ? |
| 3984 | "rgba(127,0,127, 0.5)" : "rgba(127,127,0, 0.5)"; |
| 3985 | focus_enabled = true; |
| 3986 | switch (fragType) { |
| 3987 | case MARK_LINE: |
| 3988 | case MARK_DONE_LINE: |
| 3989 | case MARK_UNSORTABLE_LINE: |
| 3990 | case MARK_SIMPLE_LINE: |
| 3991 | case MARK_SIMPLE_DONE_LINE: |
| 3992 | case MARK_DONE_UNARY_LINE: |
| 3993 | drawLinePartial(frags[1], frags[2], frags[3], frags[4], |
| 3994 | frags[5], frags[9]); |
| 3995 | if (draw_id) { |
| 3996 | drawLinePartialID(frags[0], frags[1], frags[2], frags[3], frags[4], |
| 3997 | frags[5], frags[9]); |
| 3998 | } |
| 3999 | break; |
| 4000 | case MARK_QUAD: |
| 4001 | case MARK_DONE_QUAD: |
| 4002 | case MARK_UNSORTABLE_QUAD: |
| 4003 | case MARK_SIMPLE_QUAD: |
| 4004 | case MARK_SIMPLE_DONE_QUAD: |
| 4005 | case MARK_DONE_UNARY_QUAD: |
| 4006 | drawQuadPartial(frags[1], frags[2], frags[3], frags[4], |
| 4007 | frags[5], frags[6], frags[7], frags[11]); |
| 4008 | if (draw_id) { |
| 4009 | drawQuadPartialID(frags[0], frags[1], frags[2], frags[3], frags[4], |
| 4010 | frags[5], frags[6], frags[7], frags[11]); |
| 4011 | } |
| 4012 | break; |
| 4013 | case MARK_CUBIC: |
| 4014 | case MARK_DONE_CUBIC: |
| 4015 | case MARK_UNSORTABLE_CUBIC: |
| 4016 | case MARK_SIMPLE_CUBIC: |
| 4017 | case MARK_SIMPLE_DONE_CUBIC: |
| 4018 | case MARK_DONE_UNARY_CUBIC: |
| 4019 | drawCubicPartial(frags[1], frags[2], frags[3], frags[4], |
| 4020 | frags[5], frags[6], frags[7], frags[8], frags[9], frags[13]); |
| 4021 | if (draw_id) { |
| 4022 | drawCubicPartialID(frags[0], frags[1], frags[2], frags[3], frags[4], |
| 4023 | frags[5], frags[6], frags[7], frags[8], frags[9], frags[13]); |
| 4024 | } |
| 4025 | break; |
| 4026 | case MARK_ANGLE_LAST: |
| 4027 | // FIXME: ignored for now |
| 4028 | break; |
| 4029 | default: |
| 4030 | console.log("unknown REC_TYPE_MARK frag type: " + fragType); |
| 4031 | throw "stop execution"; |
| 4032 | } |
| 4033 | break; |
| 4034 | default: |
| 4035 | continue; |
| 4036 | } |
| 4037 | } |
| 4038 | switch (recType) { |
| 4039 | case REC_TYPE_SORT: |
| 4040 | if (!draw_sort || (step_limit > 0 && tIndex < lastSort)) { |
| 4041 | break; |
| 4042 | } |
| 4043 | var angles = []; // use tangent lines to describe arcs |
| 4044 | var windFrom = []; |
| 4045 | var windTo = []; |
| 4046 | var opp = []; |
| 4047 | var minXY = Number.MAX_VALUE; |
| 4048 | var partial; |
| 4049 | focus_enabled = true; |
| 4050 | var someUnsortable = false; |
| 4051 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 4052 | var fragType = records[recordIndex]; |
| 4053 | var frags = records[recordIndex + 1]; |
| 4054 | var unsortable = (fragType == SORT_UNARY && frags[14]) || |
| 4055 | (fragType == SORT_BINARY && frags[16]); |
| 4056 | someUnsortable |= unsortable; |
| 4057 | switch (fragType) { |
| 4058 | case SORT_UNARY: |
| 4059 | case SORT_BINARY: |
| 4060 | partial = curvePartialByID(test, frags[0], frags[6], frags[8]); |
| 4061 | break; |
| 4062 | default: |
| 4063 | console.log("unknown REC_TYPE_SORT frag type: " + fragType); |
| 4064 | throw "stop execution"; |
| 4065 | } |
| 4066 | var dx = boundsWidth(partial); |
| 4067 | var dy = boundsHeight(partial); |
| 4068 | minXY = Math.min(minXY, dx * dx + dy * dy); |
| 4069 | if (collect_bounds) { |
| 4070 | continue; |
| 4071 | } |
| 4072 | angles.push(tangent(partial)); |
| 4073 | var from = frags[12]; |
| 4074 | var to = frags[12]; |
| 4075 | var sgn = frags[10]; |
| 4076 | if (sgn < 0) { |
| 4077 | from -= frags[11]; |
| 4078 | } else if (sgn > 0) { |
| 4079 | to -= frags[11]; |
| 4080 | } |
| 4081 | windFrom.push(from + (unsortable ? "!" : "")); |
| 4082 | windTo.push(to + (unsortable ? "!" : "")); |
| 4083 | opp.push(fragType == SORT_BINARY); |
| 4084 | if (draw_sort == 1) { |
| 4085 | drawOrder(partial, frags[12]); |
| 4086 | } else { |
| 4087 | drawOrder(partial, (recordIndex / 2) + 1); |
| 4088 | } |
| 4089 | } |
| 4090 | var radius = Math.sqrt(minXY) / 2 * scale; |
| 4091 | radius = Math.min(50, radius); |
| 4092 | var scaledRadius = radius / scale; |
| 4093 | var centerX = partial[0]; |
| 4094 | var centerY = partial[1]; |
| 4095 | if (collect_bounds) { |
| 4096 | if (focus_enabled) { |
| 4097 | focusXmin = Math.min(focusXmin, centerX - scaledRadius); |
| 4098 | focusYmin = Math.min(focusYmin, centerY - scaledRadius); |
| 4099 | focusXmax = Math.max(focusXmax, centerX + scaledRadius); |
| 4100 | focusYmax = Math.max(focusYmax, centerY + scaledRadius); |
| 4101 | } |
| 4102 | break; |
| 4103 | } |
| 4104 | break; |
| 4105 | default: |
| 4106 | break; |
| 4107 | } |
| 4108 | } |
| 4109 | if (collect_bounds) { |
| 4110 | return; |
| 4111 | } |
| 4112 | if (draw_log && logStart >= 0) { |
| 4113 | ctx.font = "normal 10px Arial"; |
| 4114 | ctx.textAlign = "left"; |
| 4115 | ctx.beginPath(); |
| 4116 | var top = screenHeight - 20 - (logRange + 2) * 10; |
| 4117 | ctx.rect(50, top, screenWidth - 100, (logRange + 2) * 10); |
| 4118 | ctx.fillStyle = "white"; |
| 4119 | ctx.fill(); |
| 4120 | ctx.fillStyle = "rgba(0,0,0, 0.5)"; |
| 4121 | if (logStart > 0) { |
| 4122 | ctx.fillText(lines[logStart - 1], 50, top + 8); |
| 4123 | } |
| 4124 | ctx.fillStyle = "black"; |
| 4125 | for (var idx = 0; idx < logRange; ++idx) { |
| 4126 | ctx.fillText(lines[logStart + idx], 50, top + 18 + 10 * idx); |
| 4127 | } |
| 4128 | ctx.fillStyle = "rgba(0,0,0, 0.5)"; |
| 4129 | if (logStart + logRange < lines.length) { |
| 4130 | ctx.fillText(lines[logStart + logRange], 50, top + 18 + 10 * logRange); |
| 4131 | } |
| 4132 | } |
| 4133 | if (draw_legend) { |
| 4134 | var pos = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 4135 | var drawSomething = draw_add | draw_active | draw_angle | draw_coincidence | draw_sort | draw_mark; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4136 | // drawBox(pos++, "yellow", "black", opLetter, true, ''); |
| 4137 | drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_intersection > 1 ? sectCount : sectMax2, draw_intersection, intersectionKey); |
| 4138 | drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_add ? addCount : addMax, draw_add, addKey); |
| 4139 | drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_active ? activeCount : activeMax, draw_active, activeKey); |
| 4140 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_angle ? angleCount : angleMax, draw_angle, angleKey); |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 4141 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_coincidence ? coinCount : coinMax, draw_coincidence, coincidenceKey); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4142 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_op ? opCount : opMax, draw_op, opKey); |
| 4143 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_sort ? sortCount : sortMax, draw_sort, sortKey); |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 4144 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_top ? topCount : topMax, draw_top, topKey); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4145 | drawBox(pos++, "rgba(127,0,127, 0.3)", "black", draw_mark ? markCount : markMax, draw_mark, markKey); |
| 4146 | drawBox(pos++, "black", "white", |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 4147 | (new Array('P', 'P1', 'P2', 'P', 'p', 'p1', 'p2'))[draw_path], draw_path != 0, pathKey); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4148 | drawBox(pos++, "rgba(0,63,0, 0.7)", "white", |
| 4149 | (new Array('Q', 'Q', 'C', 'QC', 'Qc', 'Cq'))[draw_computed], |
| 4150 | draw_computed != 0, computedKey); |
| 4151 | drawBox(pos++, "green", "black", step_limit, drawSomething, ''); |
| 4152 | drawBox(pos++, "green", "black", stepMax, drawSomething, ''); |
| 4153 | drawBox(pos++, "rgba(255,0,0, 0.6)", "black", lastIndex, drawSomething & draw_log, ''); |
| 4154 | drawBox(pos++, "rgba(255,0,0, 0.6)", "black", test.length - 1, drawSomething & draw_log, ''); |
| 4155 | if (curve_t) { |
| 4156 | drawCurveTControl(); |
| 4157 | } |
| 4158 | ctx.font = "normal 20px Arial"; |
| 4159 | ctx.fillStyle = "rgba(0,0,0, 0.3)"; |
| 4160 | ctx.textAlign = "right"; |
| 4161 | ctx.fillText(scale.toFixed(decimal_places) + 'x' , screenWidth - 10, screenHeight - 5); |
| 4162 | } |
| 4163 | if (draw_hints) { |
| 4164 | ctx.font = "normal 10px Arial"; |
| 4165 | ctx.fillStyle = "rgba(0,0,0, 0.5)"; |
| 4166 | ctx.textAlign = "right"; |
| 4167 | var y = 4; |
| 4168 | ctx.fillText("control lines : " + controlLinesKey, ctx.screenWidthwidth - 10, pos * 50 + y++ * 10); |
| 4169 | ctx.fillText("curve t : " + curveTKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4170 | ctx.fillText("deriviatives : " + deriviativesKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4171 | ctx.fillText("intersect t : " + intersectTKey, screenWidth - 10, pos * 50 + y++ * 10); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4172 | ctx.fillText("log : " + logKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4173 | ctx.fillText("log curve : " + logCurvesKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4174 | ctx.fillText("mid point : " + midpointKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4175 | ctx.fillText("points : " + ptsKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4176 | ctx.fillText("sequence : " + sequenceKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4177 | ctx.fillText("xy : " + xyKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4178 | } |
| 4179 | } |
| 4180 | |
| 4181 | function drawBox(y, backC, foreC, str, enable, label) { |
| 4182 | ctx.beginPath(); |
| 4183 | ctx.fillStyle = backC; |
| 4184 | ctx.rect(screenWidth - 40, y * 50 + 10, 40, 30); |
| 4185 | ctx.fill(); |
| 4186 | ctx.font = "normal 16px Arial"; |
| 4187 | ctx.fillStyle = foreC; |
| 4188 | ctx.textAlign = "center"; |
| 4189 | ctx.fillText(str, screenWidth - 20, y * 50 + 32); |
| 4190 | if (!enable) { |
| 4191 | ctx.fillStyle = "rgba(255,255,255, 0.5)"; |
| 4192 | ctx.fill(); |
| 4193 | } |
| 4194 | if (label != '') { |
| 4195 | ctx.font = "normal 9px Arial"; |
| 4196 | ctx.fillStyle = "black"; |
| 4197 | ctx.fillText(label, screenWidth - 47, y * 50 + 40); |
| 4198 | } |
| 4199 | } |
| 4200 | |
| 4201 | function drawCurveTControl() { |
| 4202 | ctx.lineWidth = 2; |
| 4203 | ctx.strokeStyle = "rgba(0,0,0, 0.3)"; |
| 4204 | ctx.beginPath(); |
| 4205 | ctx.rect(screenWidth - 80, 40, 28, screenHeight - 80); |
| 4206 | ctx.stroke(); |
| 4207 | var ty = 40 + curveT * (screenHeight - 80); |
| 4208 | ctx.beginPath(); |
| 4209 | ctx.moveTo(screenWidth - 80, ty); |
| 4210 | ctx.lineTo(screenWidth - 85, ty - 5); |
| 4211 | ctx.lineTo(screenWidth - 85, ty + 5); |
| 4212 | ctx.lineTo(screenWidth - 80, ty); |
| 4213 | ctx.fillStyle = "rgba(0,0,0, 0.6)"; |
| 4214 | ctx.fill(); |
| 4215 | var num = curveT.toFixed(decimal_places); |
| 4216 | ctx.font = "normal 10px Arial"; |
| 4217 | ctx.textAlign = "left"; |
| 4218 | ctx.fillText(num, screenWidth - 78, ty); |
| 4219 | } |
| 4220 | |
| 4221 | function ptInTControl() { |
| 4222 | var e = window.event; |
| 4223 | var tgt = e.target || e.srcElement; |
| 4224 | var left = tgt.offsetLeft; |
| 4225 | var top = tgt.offsetTop; |
| 4226 | var x = (e.clientX - left); |
| 4227 | var y = (e.clientY - top); |
| 4228 | if (x < screenWidth - 80 || x > screenWidth - 50) { |
| 4229 | return false; |
| 4230 | } |
| 4231 | if (y < 40 || y > screenHeight - 80) { |
| 4232 | return false; |
| 4233 | } |
| 4234 | curveT = (y - 40) / (screenHeight - 120); |
| 4235 | if (curveT < 0 || curveT > 1) { |
| 4236 | throw "stop execution"; |
| 4237 | } |
| 4238 | return true; |
| 4239 | } |
| 4240 | |
| 4241 | function drawTop() { |
| 4242 | if (tests[testIndex] == null) { |
| 4243 | var str = testDivs[testIndex].textContent; |
| 4244 | parse_all(str); |
| 4245 | var title = testDivs[testIndex].id.toString(); |
| 4246 | testTitles[testIndex] = title; |
| 4247 | } |
| 4248 | init(tests[testIndex]); |
| 4249 | redraw(); |
| 4250 | } |
| 4251 | |
| 4252 | function redraw() { |
| 4253 | if (focus_on_selection) { |
| 4254 | collect_bounds = true; |
| 4255 | draw(tests[testIndex], testLines[testIndex], testTitles[testIndex]); |
| 4256 | collect_bounds = false; |
| 4257 | if (focusXmin < focusXmax && focusYmin < focusYmax) { |
| 4258 | setScale(focusXmin, focusXmax, focusYmin, focusYmax); |
| 4259 | } |
| 4260 | } |
| 4261 | ctx.beginPath(); |
| 4262 | ctx.fillStyle = "white"; |
| 4263 | ctx.rect(0, 0, screenWidth, screenHeight); |
| 4264 | ctx.fill(); |
| 4265 | draw(tests[testIndex], testLines[testIndex], testTitles[testIndex]); |
| 4266 | } |
| 4267 | |
| 4268 | function dumpCurvePartial(test, id, t0, t1) { |
| 4269 | var curve = curveByID(test, id); |
| 4270 | var name = ["line", "quad", "cubic"][curve.length / 2 - 2]; |
| 4271 | console.log("id=" + id + " " + name + "=" + curveToString(curve) |
| 4272 | + " t0=" + t0 + " t1=" + t1 |
| 4273 | + " partial=" + curveToString(curvePartialByID(test, id, t0, t1))); |
| 4274 | } |
| 4275 | |
| 4276 | function dumpAngleTest(test, id, t0, t1) { |
| 4277 | var curve = curveByID(test, id); |
| 4278 | console.log(" { {" + curveToString(curve) + "}, " |
| 4279 | + curve.length / 2 + ", " + t0 + ", " + t1 + ", {} }, //"); |
| 4280 | } |
| 4281 | |
| 4282 | function dumpLogToConsole() { |
| 4283 | if (logStart < 0) { |
| 4284 | return; |
| 4285 | } |
| 4286 | var test = tests[testIndex]; |
| 4287 | var recType = REC_TYPE_UNKNOWN; |
| 4288 | var records; |
| 4289 | for (var index = 0; index < test.length; index += 3) { |
| 4290 | var lastLineNo = test[index + 1]; |
| 4291 | if (lastLineNo >= logStart && lastLineNo < logStart + logRange) { |
| 4292 | recType = test[index]; |
| 4293 | records = test[index + 2]; |
| 4294 | break; |
| 4295 | } |
| 4296 | } |
| 4297 | if (recType == REC_TYPE_UNKNOWN) { |
| 4298 | return; |
| 4299 | } |
| 4300 | var lines = testLines[testIndex]; |
| 4301 | for (var idx = 0; idx < logRange; ++idx) { |
| 4302 | var line = lines[logStart + idx]; |
| 4303 | console.log(line); |
| 4304 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 4305 | var fragType = records[recordIndex]; |
| 4306 | var frags = records[recordIndex + 1]; |
| 4307 | if (recType == REC_TYPE_ANGLE && fragType == ANGLE_AFTER) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4308 | dumpCurvePartial(test, frags[0], frags[4], frags[5]); |
| 4309 | dumpCurvePartial(test, frags[6], frags[10], frags[11]); |
| 4310 | dumpCurvePartial(test, frags[12], frags[16], frags[17]); |
| 4311 | console.log("\nstatic IntersectData intersectDataSet[] = { //"); |
| 4312 | dumpAngleTest(test, frags[0], frags[4], frags[5]); |
| 4313 | dumpAngleTest(test, frags[6], frags[10], frags[11]); |
| 4314 | dumpAngleTest(test, frags[12], frags[16], frags[17]); |
| 4315 | console.log("}; //"); |
| 4316 | } |
| 4317 | } |
| 4318 | } |
| 4319 | } |
| 4320 | |
| 4321 | var activeKey = 'a'; |
| 4322 | var pathKey = 'b'; |
| 4323 | var pathBackKey = 'B'; |
| 4324 | var centerKey = 'c'; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 4325 | var coincidenceKey = 'C'; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4326 | var addKey = 'd'; |
| 4327 | var deriviativesKey = 'f'; |
| 4328 | var angleKey = 'g'; |
| 4329 | var angleBackKey = 'G'; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4330 | var intersectionKey = 'i'; |
| 4331 | var intersectionBackKey = 'I'; |
| 4332 | var sequenceKey = 'j'; |
| 4333 | var midpointKey = 'k'; |
| 4334 | var logKey = 'l'; |
| 4335 | var logToConsoleKey = 'L'; |
| 4336 | var markKey = 'm'; |
| 4337 | var sortKey = 'o'; |
| 4338 | var opKey = 'p'; |
| 4339 | var opBackKey = 'P'; |
| 4340 | var computedKey = 'q'; |
| 4341 | var computedBackKey = 'Q'; |
| 4342 | var stepKey = 's'; |
| 4343 | var stepBackKey = 'S'; |
| 4344 | var intersectTKey = 't'; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 4345 | var topKey = 'T'; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4346 | var curveTKey = 'u'; |
| 4347 | var controlLinesBackKey = 'V'; |
| 4348 | var controlLinesKey = 'v'; |
| 4349 | var ptsKey = 'x'; |
| 4350 | var xyKey = 'y'; |
| 4351 | var logCurvesKey = 'z'; |
| 4352 | var focusKey = '`'; |
| 4353 | var idKey = '.'; |
| 4354 | var retinaKey = '\\'; |
| 4355 | |
| 4356 | function doKeyPress(evt) { |
| 4357 | var char = String.fromCharCode(evt.charCode); |
| 4358 | var focusWasOn = false; |
| 4359 | switch (char) { |
| 4360 | case '0': |
| 4361 | case '1': |
| 4362 | case '2': |
| 4363 | case '3': |
| 4364 | case '4': |
| 4365 | case '5': |
| 4366 | case '6': |
| 4367 | case '7': |
| 4368 | case '8': |
| 4369 | case '9': |
| 4370 | decimal_places = char - '0'; |
| 4371 | redraw(); |
| 4372 | break; |
| 4373 | case activeKey: |
| 4374 | draw_active ^= true; |
| 4375 | redraw(); |
| 4376 | break; |
| 4377 | case addKey: |
| 4378 | draw_add ^= true; |
| 4379 | redraw(); |
| 4380 | break; |
| 4381 | case angleKey: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 4382 | draw_angle = (draw_angle + 1) % 4; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4383 | redraw(); |
| 4384 | break; |
| 4385 | case angleBackKey: |
| 4386 | draw_angle = (draw_angle + 2) % 3; |
| 4387 | redraw(); |
| 4388 | break; |
| 4389 | case centerKey: |
| 4390 | setScale(xmin, xmax, ymin, ymax); |
| 4391 | redraw(); |
| 4392 | break; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 4393 | case coincidenceKey: |
| 4394 | draw_coincidence ^= true; |
| 4395 | redraw(); |
| 4396 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4397 | case controlLinesBackKey: |
| 4398 | control_lines = (control_lines + 3) % 4; |
| 4399 | redraw(); |
| 4400 | break; |
| 4401 | case controlLinesKey: |
| 4402 | control_lines = (control_lines + 1) % 4; |
| 4403 | redraw(); |
| 4404 | break; |
| 4405 | case computedBackKey: |
| 4406 | draw_computed = (draw_computed + 5) % 6; |
| 4407 | redraw(); |
| 4408 | break; |
| 4409 | case computedKey: |
| 4410 | draw_computed = (draw_computed + 1) % 6; |
| 4411 | redraw(); |
| 4412 | break; |
| 4413 | case curveTKey: |
| 4414 | curve_t ^= true; |
| 4415 | if (curve_t) { |
| 4416 | draw_legend = true; |
| 4417 | } |
| 4418 | redraw(); |
| 4419 | break; |
| 4420 | case deriviativesKey: |
| 4421 | draw_deriviatives = (draw_deriviatives + 1) % 3; |
| 4422 | redraw(); |
| 4423 | break; |
| 4424 | case focusKey: |
| 4425 | focus_on_selection ^= true; |
| 4426 | setScale(xmin, xmax, ymin, ymax); |
| 4427 | redraw(); |
| 4428 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4429 | case idKey: |
| 4430 | draw_id ^= true; |
| 4431 | redraw(); |
| 4432 | break; |
| 4433 | case intersectionBackKey: |
| 4434 | draw_intersection = (draw_intersection + 3) % 4; |
| 4435 | redraw(); |
| 4436 | break; |
| 4437 | case intersectionKey: |
| 4438 | draw_intersection = (draw_intersection + 1) % 4; |
| 4439 | redraw(); |
| 4440 | break; |
| 4441 | case intersectTKey: |
| 4442 | draw_intersectT ^= true; |
| 4443 | redraw(); |
| 4444 | break; |
| 4445 | case logCurvesKey: |
| 4446 | logCurves(tests[testIndex]); |
| 4447 | break; |
| 4448 | case logKey: |
| 4449 | draw_log ^= true; |
| 4450 | redraw(); |
| 4451 | break; |
| 4452 | case logToConsoleKey: |
| 4453 | if (draw_log) { |
| 4454 | dumpLogToConsole(); |
| 4455 | } |
| 4456 | break; |
| 4457 | case markKey: |
| 4458 | draw_mark ^= true; |
| 4459 | redraw(); |
| 4460 | break; |
| 4461 | case midpointKey: |
| 4462 | draw_midpoint ^= true; |
| 4463 | redraw(); |
| 4464 | break; |
| 4465 | case opKey: |
| 4466 | draw_op = (draw_op + 1) % 3; |
| 4467 | redraw(); |
| 4468 | break; |
| 4469 | case opBackKey: |
| 4470 | draw_op = (draw_op + 2) % 3; |
| 4471 | redraw(); |
| 4472 | break; |
| 4473 | case pathKey: |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 4474 | draw_path = (draw_path + 1) % (4 + (hasAlignedPath ? 3 : 0)); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4475 | redraw(); |
| 4476 | break; |
| 4477 | case pathBackKey: |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 4478 | draw_path = (draw_path + 3 + (hasAlignedPath ? 3 : 0)) % (4 + (hasAlignedPath ? 3 : 0)); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4479 | redraw(); |
| 4480 | break; |
| 4481 | case ptsKey: |
| 4482 | pt_labels = (pt_labels + 1) % 3; |
| 4483 | redraw(); |
| 4484 | break; |
| 4485 | case retinaKey: |
| 4486 | retina_scale ^= true; |
| 4487 | drawTop(); |
| 4488 | break; |
| 4489 | case sequenceKey: |
| 4490 | draw_sequence ^= true; |
| 4491 | redraw(); |
| 4492 | break; |
| 4493 | case sortKey: |
| 4494 | draw_sort = (draw_sort + 1) % 3; |
| 4495 | drawTop(); |
| 4496 | break; |
| 4497 | case stepKey: |
| 4498 | step_limit++; |
| 4499 | if (step_limit > stepMax) { |
| 4500 | step_limit = stepMax; |
| 4501 | } |
| 4502 | redraw(); |
| 4503 | break; |
| 4504 | case stepBackKey: |
| 4505 | step_limit--; |
| 4506 | if (step_limit < 0) { |
| 4507 | step_limit = 0; |
| 4508 | } |
| 4509 | redraw(); |
| 4510 | break; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 4511 | case topKey: |
| 4512 | draw_top ^= true; |
| 4513 | redraw(); |
| 4514 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4515 | case xyKey: |
| 4516 | debug_xy = (debug_xy + 1) % 3; |
| 4517 | redraw(); |
| 4518 | break; |
| 4519 | case '-': |
| 4520 | focusWasOn = focus_on_selection; |
| 4521 | if (focusWasOn) { |
| 4522 | focus_on_selection = false; |
| 4523 | scale /= 1.2; |
| 4524 | } else { |
| 4525 | scale /= 2; |
| 4526 | calcLeftTop(); |
| 4527 | } |
| 4528 | redraw(); |
| 4529 | focus_on_selection = focusWasOn; |
| 4530 | break; |
| 4531 | case '=': |
| 4532 | case '+': |
| 4533 | focusWasOn = focus_on_selection; |
| 4534 | if (focusWasOn) { |
| 4535 | focus_on_selection = false; |
| 4536 | scale *= 1.2; |
| 4537 | } else { |
| 4538 | scale *= 2; |
| 4539 | calcLeftTop(); |
| 4540 | } |
| 4541 | redraw(); |
| 4542 | focus_on_selection = focusWasOn; |
| 4543 | break; |
| 4544 | case '?': |
| 4545 | draw_hints ^= true; |
| 4546 | if (draw_hints && !draw_legend) { |
| 4547 | draw_legend = true; |
| 4548 | } |
| 4549 | redraw(); |
| 4550 | break; |
| 4551 | case '/': |
| 4552 | draw_legend ^= true; |
| 4553 | redraw(); |
| 4554 | break; |
| 4555 | } |
| 4556 | } |
| 4557 | |
| 4558 | function doKeyDown(evt) { |
| 4559 | var char = evt.keyCode; |
| 4560 | var preventDefault = false; |
| 4561 | switch (char) { |
| 4562 | case 37: // left arrow |
| 4563 | if (evt.shiftKey) { |
| 4564 | testIndex -= 9; |
| 4565 | } |
| 4566 | if (--testIndex < 0) |
| 4567 | testIndex = tests.length - 1; |
| 4568 | drawTop(); |
| 4569 | preventDefault = true; |
| 4570 | break; |
| 4571 | case 39: // right arrow |
| 4572 | if (evt.shiftKey) { |
| 4573 | testIndex += 9; |
| 4574 | } |
| 4575 | if (++testIndex >= tests.length) |
| 4576 | testIndex = 0; |
| 4577 | drawTop(); |
| 4578 | preventDefault = true; |
| 4579 | break; |
| 4580 | } |
| 4581 | if (preventDefault) { |
| 4582 | evt.preventDefault(); |
| 4583 | return false; |
| 4584 | } |
| 4585 | return true; |
| 4586 | } |
| 4587 | |
| 4588 | (function() { |
| 4589 | var hidden = "hidden"; |
| 4590 | |
| 4591 | // Standards: |
| 4592 | if (hidden in document) |
| 4593 | document.addEventListener("visibilitychange", onchange); |
| 4594 | else if ((hidden = "mozHidden") in document) |
| 4595 | document.addEventListener("mozvisibilitychange", onchange); |
| 4596 | else if ((hidden = "webkitHidden") in document) |
| 4597 | document.addEventListener("webkitvisibilitychange", onchange); |
| 4598 | else if ((hidden = "msHidden") in document) |
| 4599 | document.addEventListener("msvisibilitychange", onchange); |
| 4600 | // IE 9 and lower: |
| 4601 | else if ('onfocusin' in document) |
| 4602 | document.onfocusin = document.onfocusout = onchange; |
| 4603 | // All others: |
| 4604 | else |
| 4605 | window.onpageshow = window.onpagehide |
| 4606 | = window.onfocus = window.onblur = onchange; |
| 4607 | |
| 4608 | function onchange (evt) { |
| 4609 | var v = 'visible', h = 'hidden', |
| 4610 | evtMap = { |
| 4611 | focus:v, focusin:v, pageshow:v, blur:h, focusout:h, pagehide:h |
| 4612 | }; |
| 4613 | |
| 4614 | evt = evt || window.event; |
| 4615 | if (evt.type in evtMap) |
| 4616 | document.body.className = evtMap[evt.type]; |
| 4617 | else |
| 4618 | document.body.className = this[hidden] ? "hidden" : "visible"; |
| 4619 | } |
| 4620 | })(); |
| 4621 | |
| 4622 | function calcXY() { |
| 4623 | var e = window.event; |
| 4624 | var tgt = e.target || e.srcElement; |
| 4625 | var left = tgt.offsetLeft; |
| 4626 | var top = tgt.offsetTop; |
| 4627 | mouseX = (e.clientX - left) / scale + srcLeft; |
| 4628 | mouseY = (e.clientY - top) / scale + srcTop; |
| 4629 | } |
| 4630 | |
| 4631 | function calcLeftTop() { |
| 4632 | srcLeft = mouseX - screenWidth / 2 / scale; |
| 4633 | srcTop = mouseY - screenHeight / 2 / scale; |
| 4634 | } |
| 4635 | |
| 4636 | var disableClick = false; |
| 4637 | |
| 4638 | function handleMouseClick() { |
| 4639 | if (disableClick) { |
| 4640 | return; |
| 4641 | } |
| 4642 | if (!curve_t || !ptInTControl()) { |
| 4643 | calcXY(); |
| 4644 | calcLeftTop(); |
| 4645 | } |
| 4646 | redraw(); |
| 4647 | // if (!curve_t || !ptInTControl()) { |
| 4648 | // mouseX = screenWidth / 2 / scale + srcLeft; |
| 4649 | // mouseY = screenHeight / 2 / scale + srcTop; |
| 4650 | // } |
| 4651 | } |
| 4652 | |
| 4653 | function handleMouseOver() { |
| 4654 | calcXY(); |
| 4655 | if (debug_xy != 2) { |
| 4656 | return; |
| 4657 | } |
| 4658 | var num = mouseX.toFixed(decimal_places) + ", " + mouseY.toFixed(decimal_places); |
| 4659 | ctx.beginPath(); |
| 4660 | ctx.rect(300,100,num.length * 6,10); |
| 4661 | ctx.fillStyle="white"; |
| 4662 | ctx.fill(); |
| 4663 | ctx.font = "normal 10px Arial"; |
| 4664 | ctx.fillStyle="black"; |
| 4665 | ctx.textAlign = "left"; |
| 4666 | ctx.fillText(num, 300, 108); |
| 4667 | } |
| 4668 | |
| 4669 | function start() { |
| 4670 | for (var i = 0; i < testDivs.length; ++i) { |
| 4671 | tests[i] = null; |
| 4672 | } |
| 4673 | testIndex = 0; |
| 4674 | drawTop(); |
| 4675 | window.addEventListener('keypress', doKeyPress, true); |
| 4676 | window.addEventListener('keydown', doKeyDown, true); |
| 4677 | window.onresize = function() { |
| 4678 | drawTop(); |
| 4679 | } |
| 4680 | /* |
| 4681 | window.onpagehide = function() { |
| 4682 | disableClick = true; |
| 4683 | } |
| 4684 | */ |
| 4685 | window.onpageshow = function () { |
| 4686 | disableClick = false; |
| 4687 | } |
| 4688 | } |
| 4689 | |
| 4690 | </script> |
| 4691 | </head> |
| 4692 | |
| 4693 | <body onLoad="start();"> |
| 4694 | <canvas id="canvas" width="750" height="500" |
| 4695 | onmousemove="handleMouseOver()" |
| 4696 | onclick="handleMouseClick()" |
| 4697 | ></canvas > |
| 4698 | </body> |
| 4699 | </html> |