mirage2d 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MirageHttp.es.js +5268 -0
- package/dist/MirageHttp.es.js.map +1 -0
- package/dist/MirageHttp.umd.js +2 -0
- package/dist/MirageHttp.umd.js.map +1 -0
- package/dist/assets/js/basedecoder-fa2b8e8d.js +107 -0
- package/dist/assets/js/decoder-f19e05cf.js +6 -0
- package/dist/assets/js/deflate-adb9a67b.js +8 -0
- package/dist/{js/dist/_html2canvas@1.4.1@html2canvas.e8006fee.js → assets/js/html2canvas.esm-3dd231c5.js} +0 -0
- package/dist/assets/js/index-3263db85.js +1 -0
- package/dist/assets/js/index-a9db46a5.js +212968 -0
- package/dist/{js/lib/_canvg@3.0.10@canvg.bd557ac8.js → assets/js/index.es-38f73a27.js} +2179 -351
- package/dist/assets/js/jpeg-3bf23728.js +835 -0
- package/dist/{js/_lerc@3.0.0@lerc/_lerc@3.0.0@lerc.dc2ff398.js → assets/js/lerc-4c39f39b.js} +26 -1
- package/dist/assets/js/lzw-d0cad8af.js +123 -0
- package/dist/assets/js/packbits-d75b4cce.js +25 -0
- package/dist/{js/_pako@2.0.4@pako/_pako@2.0.4@pako.52d6b320.js → assets/js/pako.esm-49deb4d7.js} +0 -0
- package/dist/{js/dist/_dompurify@2.4.0@dompurify.e7ba523e.js → assets/js/purify.es-1915dfae.js} +0 -0
- package/dist/assets/js/raw-9656f9cc.js +7 -0
- package/dist/assets/js/webimage-edb7156c.js +27 -0
- package/package.json +1 -1
- package/dist/js/_@babel_runtime@7.18.9@@babel/_@babel_runtime@7.18.9@@babel.e0126ca2.js +0 -51
- package/dist/js/_@petamoriken_float16@3.6.6@@petamoriken/_@petamoriken_float16@3.6.6@@petamoriken.c5188241.js +0 -217
- package/dist/js/_@turf_along@6.5.0@@turf/_@turf_along@6.5.0@@turf.18dbc1a3.js +0 -31
- package/dist/js/_@turf_angle@6.5.0@@turf/_@turf_angle@6.5.0@@turf.554ac9bf.js +0 -1
- package/dist/js/_@turf_area@6.5.0@@turf/_@turf_area@6.5.0@@turf.6cbf0cc1.js +0 -74
- package/dist/js/_@turf_bbox-clip@6.5.0@@turf/_@turf_bbox-clip@6.5.0@@turf.e491cb90.js +0 -1
- package/dist/js/_@turf_bbox-polygon@6.5.0@@turf/_@turf_bbox-polygon@6.5.0@@turf.523f1c20.js +0 -19
- package/dist/js/_@turf_bbox@6.5.0@@turf/_@turf_bbox@6.5.0@@turf.4c59feee.js +0 -48
- package/dist/js/_@turf_bearing@6.5.0@@turf/_@turf_bearing@6.5.0@@turf.f2555a09.js +0 -25
- package/dist/js/_@turf_bezier-spline@6.5.0@@turf/_@turf_bezier-spline@6.5.0@@turf.fa7991dd.js +0 -137
- package/dist/js/_@turf_boolean-clockwise@6.5.0@@turf/_@turf_boolean-clockwise@6.5.0@@turf.4031f280.js +0 -1
- package/dist/js/_@turf_boolean-contains@6.5.0@@turf/_@turf_boolean-contains@6.5.0@@turf.836d55d8.js +0 -191
- package/dist/js/_@turf_boolean-crosses@6.5.0@@turf/_@turf_boolean-crosses@6.5.0@@turf.c5f65a28.js +0 -125
- package/dist/js/_@turf_boolean-disjoint@6.5.0@@turf/_@turf_boolean-disjoint@6.5.0@@turf.bbd60872.js +0 -122
- package/dist/js/_@turf_boolean-equal@6.5.0@@turf/_@turf_boolean-equal@6.5.0@@turf.341ffa01.js +0 -1
- package/dist/js/_@turf_boolean-intersects@6.5.0@@turf/_@turf_boolean-intersects@6.5.0@@turf.05fc28b3.js +0 -15
- package/dist/js/_@turf_boolean-overlap@6.5.0@@turf/_@turf_boolean-overlap@6.5.0@@turf.a519db25.js +0 -53
- package/dist/js/_@turf_boolean-parallel@6.5.0@@turf/_@turf_boolean-parallel@6.5.0@@turf.dbf2bc2d.js +0 -1
- package/dist/js/_@turf_boolean-point-in-polygon@6.5.0@@turf/_@turf_boolean-point-in-polygon@6.5.0@@turf.62a2d48a.js +0 -65
- package/dist/js/_@turf_boolean-point-on-line@6.5.0@@turf/_@turf_boolean-point-on-line@6.5.0@@turf.3cf3aaa1.js +0 -69
- package/dist/js/_@turf_boolean-within@6.5.0@@turf/_@turf_boolean-within@6.5.0@@turf.d70d6bfc.js +0 -172
- package/dist/js/_@turf_buffer@6.5.0@@turf/_@turf_buffer@6.5.0@@turf.88330dfe.js +0 -99
- package/dist/js/_@turf_center-mean@6.5.0@@turf/_@turf_center-mean@6.5.0@@turf.b3d7c917.js +0 -1
- package/dist/js/_@turf_center-median@6.5.0@@turf/_@turf_center-median@6.5.0@@turf.44c4669e.js +0 -1
- package/dist/js/_@turf_center-of-mass@6.5.0@@turf/_@turf_center-of-mass@6.5.0@@turf.63ce279e.js +0 -1
- package/dist/js/_@turf_center@6.5.0@@turf/_@turf_center@6.5.0@@turf.a45495b5.js +0 -12
- package/dist/js/_@turf_centroid@6.5.0@@turf/_@turf_centroid@6.5.0@@turf.0a5be869.js +0 -17
- package/dist/js/_@turf_circle@6.5.0@@turf/_@turf_circle@6.5.0@@turf.0166b8c2.js +0 -16
- package/dist/js/_@turf_clean-coords@6.5.0@@turf/_@turf_clean-coords@6.5.0@@turf.8c76bd63.js +0 -111
- package/dist/js/_@turf_clone@6.5.0@@turf/_@turf_clone@6.5.0@@turf.cd05b1f8.js +0 -100
- package/dist/js/_@turf_clusters-dbscan@6.5.0@@turf/_@turf_clusters-dbscan@6.5.0@@turf.6bbee7e9.js +0 -1
- package/dist/js/_@turf_clusters-kmeans@6.5.0@@turf/_@turf_clusters-kmeans@6.5.0@@turf.505415df.js +0 -1
- package/dist/js/_@turf_clusters@6.5.0@@turf/_@turf_clusters@6.5.0@@turf.84cb9680.js +0 -1
- package/dist/js/_@turf_collect@6.5.0@@turf/_@turf_collect@6.5.0@@turf.93e41b5f.js +0 -1
- package/dist/js/_@turf_combine@6.5.0@@turf/_@turf_combine@6.5.0@@turf.33ee6336.js +0 -1
- package/dist/js/_@turf_concave@6.5.0@@turf/_@turf_concave@6.5.0@@turf.6fb6a8be.js +0 -179
- package/dist/js/_@turf_convex@6.5.0@@turf/_@turf_convex@6.5.0@@turf.24600ac2.js +0 -1
- package/dist/js/_@turf_destination@6.5.0@@turf/_@turf_destination@6.5.0@@turf.2621651e.js +0 -18
- package/dist/js/_@turf_difference@6.5.0@@turf/_@turf_difference@6.5.0@@turf.70df5e79.js +0 -18
- package/dist/js/_@turf_dissolve@6.5.0@@turf/_@turf_dissolve@6.5.0@@turf.edb28fc1.js +0 -1
- package/dist/js/_@turf_distance-weight@6.5.0@@turf/_@turf_distance-weight@6.5.0@@turf.e168af7f.js +0 -1
- package/dist/js/_@turf_distance@6.5.0@@turf/_@turf_distance@6.5.0@@turf.0c7b8aea.js +0 -22
- package/dist/js/_@turf_ellipse@6.5.0@@turf/_@turf_ellipse@6.5.0@@turf.37986056.js +0 -1
- package/dist/js/_@turf_envelope@6.5.0@@turf/_@turf_envelope@6.5.0@@turf.599c5772.js +0 -1
- package/dist/js/_@turf_explode@6.5.0@@turf/_@turf_explode@6.5.0@@turf.5c768db5.js +0 -24
- package/dist/js/_@turf_flatten@6.5.0@@turf/_@turf_flatten@6.5.0@@turf.57e9114c.js +0 -1
- package/dist/js/_@turf_flip@6.5.0@@turf/_@turf_flip@6.5.0@@turf.1f02101f.js +0 -1
- package/dist/js/_@turf_great-circle@6.5.0@@turf/_@turf_great-circle@6.5.0@@turf.2ca021a8.js +0 -1
- package/dist/js/_@turf_helpers@6.5.0@@turf/_@turf_helpers@6.5.0@@turf.f1480aa1.js +0 -364
- package/dist/js/_@turf_hex-grid@6.5.0@@turf/_@turf_hex-grid@6.5.0@@turf.a6a45778.js +0 -99
- package/dist/js/_@turf_interpolate@6.5.0@@turf/_@turf_interpolate@6.5.0@@turf.4d39bd8c.js +0 -1
- package/dist/js/_@turf_intersect@6.5.0@@turf/_@turf_intersect@6.5.0@@turf.34082cdf.js +0 -17
- package/dist/js/_@turf_invariant@6.5.0@@turf/_@turf_invariant@6.5.0@@turf.0ef69f8c.js +0 -71
- package/dist/js/_@turf_isobands@6.5.0@@turf/_@turf_isobands@6.5.0@@turf.def019df.js +0 -3109
- package/dist/js/_@turf_isolines@6.5.0@@turf/_@turf_isolines@6.5.0@@turf.da623b25.js +0 -1
- package/dist/js/_@turf_kinks@6.5.0@@turf/_@turf_kinks@6.5.0@@turf.ee61685b.js +0 -87
- package/dist/js/_@turf_length@6.5.0@@turf/_@turf_length@6.5.0@@turf.f73f6c98.js +0 -12
- package/dist/js/_@turf_line-arc@6.5.0@@turf/_@turf_line-arc@6.5.0@@turf.3dc57055.js +0 -37
- package/dist/js/_@turf_line-chunk@6.5.0@@turf/_@turf_line-chunk@6.5.0@@turf.1867af48.js +0 -43
- package/dist/js/_@turf_line-intersect@6.5.0@@turf/_@turf_line-intersect@6.5.0@@turf.c4d81948.js +0 -73
- package/dist/js/_@turf_line-offset@6.5.0@@turf/_@turf_line-offset@6.5.0@@turf.e6846793.js +0 -116
- package/dist/js/_@turf_line-overlap@6.5.0@@turf/_@turf_line-overlap@6.5.0@@turf.addba9a5.js +0 -76
- package/dist/js/_@turf_line-segment@6.5.0@@turf/_@turf_line-segment@6.5.0@@turf.18ce3010.js +0 -55
- package/dist/js/_@turf_line-slice-along@6.5.0@@turf/_@turf_line-slice-along@6.5.0@@turf.2b802464.js +0 -57
- package/dist/js/_@turf_line-slice@6.5.0@@turf/_@turf_line-slice@6.5.0@@turf.6423a053.js +0 -23
- package/dist/js/_@turf_line-split@6.5.0@@turf/_@turf_line-split@6.5.0@@turf.2022f104.js +0 -125
- package/dist/js/_@turf_line-to-polygon@6.5.0@@turf/_@turf_line-to-polygon@6.5.0@@turf.83f5e69f.js +0 -1
- package/dist/js/_@turf_mask@6.5.0@@turf/_@turf_mask@6.5.0@@turf.96cd5a94.js +0 -1
- package/dist/js/_@turf_meta@6.5.0@@turf/_@turf_meta@6.5.0@@turf.1b9d5da5.js +0 -611
- package/dist/js/_@turf_midpoint@6.5.0@@turf/_@turf_midpoint@6.5.0@@turf.67c14f94.js +0 -1
- package/dist/js/_@turf_moran-index@6.5.0@@turf/_@turf_moran-index@6.5.0@@turf.2ad5365a.js +0 -1
- package/dist/js/_@turf_nearest-point-on-line@6.5.0@@turf/_@turf_nearest-point-on-line@6.5.0@@turf.095c8c0d.js +0 -57
- package/dist/js/_@turf_nearest-point-to-line@6.5.0@@turf/_@turf_nearest-point-to-line@6.5.0@@turf.68484097.js +0 -1
- package/dist/js/_@turf_nearest-point@6.5.0@@turf/_@turf_nearest-point@6.5.0@@turf.e0d2f509.js +0 -24
- package/dist/js/_@turf_planepoint@6.5.0@@turf/_@turf_planepoint@6.5.0@@turf.56fc70b3.js +0 -1
- package/dist/js/_@turf_point-grid@6.5.0@@turf/_@turf_point-grid@6.5.0@@turf.2d278644.js +0 -42
- package/dist/js/_@turf_point-on-feature@6.5.0@@turf/_@turf_point-on-feature@6.5.0@@turf.0c740874.js +0 -1
- package/dist/js/_@turf_point-to-line-distance@6.5.0@@turf/_@turf_point-to-line-distance@6.5.0@@turf.33105d82.js +0 -1
- package/dist/js/_@turf_points-within-polygon@6.5.0@@turf/_@turf_points-within-polygon@6.5.0@@turf.659cd335.js +0 -35
- package/dist/js/_@turf_polygon-smooth@6.5.0@@turf/_@turf_polygon-smooth@6.5.0@@turf.43a7c33e.js +0 -1
- package/dist/js/_@turf_polygon-tangents@6.5.0@@turf/_@turf_polygon-tangents@6.5.0@@turf.a2c3a7b6.js +0 -1
- package/dist/js/_@turf_polygon-to-line@6.5.0@@turf/_@turf_polygon-to-line@6.5.0@@turf.3177cfb1.js +0 -48
- package/dist/js/_@turf_polygonize@6.5.0@@turf/_@turf_polygonize@6.5.0@@turf.f7cc4910.js +0 -1
- package/dist/js/_@turf_projection@6.5.0@@turf/_@turf_projection@6.5.0@@turf.ffdd3321.js +0 -1
- package/dist/js/_@turf_random@6.5.0@@turf/_@turf_random@6.5.0@@turf.f65251e4.js +0 -130
- package/dist/js/_@turf_rectangle-grid@6.5.0@@turf/_@turf_rectangle-grid@6.5.0@@turf.7e8b1a1f.js +0 -49
- package/dist/js/_@turf_rewind@6.5.0@@turf/_@turf_rewind@6.5.0@@turf.5d137ee9.js +0 -1
- package/dist/js/_@turf_rhumb-bearing@6.5.0@@turf/_@turf_rhumb-bearing@6.5.0@@turf.fb8f6ade.js +0 -30
- package/dist/js/_@turf_rhumb-destination@6.5.0@@turf/_@turf_rhumb-destination@6.5.0@@turf.dc0e4753.js +0 -36
- package/dist/js/_@turf_rhumb-distance@6.5.0@@turf/_@turf_rhumb-distance@6.5.0@@turf.94e475b8.js +0 -30
- package/dist/js/_@turf_sample@6.5.0@@turf/_@turf_sample@6.5.0@@turf.7181d7a7.js +0 -1
- package/dist/js/_@turf_sector@6.5.0@@turf/_@turf_sector@6.5.0@@turf.04ffddfe.js +0 -39
- package/dist/js/_@turf_shortest-path@6.5.0@@turf/_@turf_shortest-path@6.5.0@@turf.0c1b62a8.js +0 -367
- package/dist/js/_@turf_simplify@6.5.0@@turf/_@turf_simplify@6.5.0@@turf.46703d2e.js +0 -1
- package/dist/js/_@turf_square-grid@6.5.0@@turf/_@turf_square-grid@6.5.0@@turf.38bd2eaa.js +0 -8
- package/dist/js/_@turf_square@6.5.0@@turf/_@turf_square@6.5.0@@turf.2705289a.js +0 -27
- package/dist/js/_@turf_standard-deviational-ellipse@6.5.0@@turf/_@turf_standard-deviational-ellipse@6.5.0@@turf.7094e432.js +0 -1
- package/dist/js/_@turf_tag@6.5.0@@turf/_@turf_tag@6.5.0@@turf.cb60b0c1.js +0 -1
- package/dist/js/_@turf_tesselate@6.5.0@@turf/_@turf_tesselate@6.5.0@@turf.330e4aae.js +0 -1
- package/dist/js/_@turf_tin@6.5.0@@turf/_@turf_tin@6.5.0@@turf.077204c4.js +0 -173
- package/dist/js/_@turf_transform-rotate@6.5.0@@turf/_@turf_transform-rotate@6.5.0@@turf.6d350d36.js +0 -1
- package/dist/js/_@turf_transform-scale@6.5.0@@turf/_@turf_transform-scale@6.5.0@@turf.d6f65671.js +0 -90
- package/dist/js/_@turf_transform-translate@6.5.0@@turf/_@turf_transform-translate@6.5.0@@turf.9296b81a.js +0 -1
- package/dist/js/_@turf_triangle-grid@6.5.0@@turf/_@turf_triangle-grid@6.5.0@@turf.939f94ab.js +0 -107
- package/dist/js/_@turf_truncate@6.5.0@@turf/_@turf_truncate@6.5.0@@turf.ed70ebcb.js +0 -33
- package/dist/js/_@turf_turf@6.4.0@@turf/_@turf_turf@6.4.0@@turf.34fde8ec.js +0 -1
- package/dist/js/_@turf_union@6.5.0@@turf/_@turf_union@6.5.0@@turf.386ee2eb.js +0 -1
- package/dist/js/_@turf_unkink-polygon@6.5.0@@turf/_@turf_unkink-polygon@6.5.0@@turf.cb446e47.js +0 -1
- package/dist/js/_@turf_voronoi@6.5.0@@turf/_@turf_voronoi@6.5.0@@turf.c30d929e.js +0 -30
- package/dist/js/_call-bind@1.0.2@call-bind/_call-bind@1.0.2@call-bind.3811d387.js +0 -53
- package/dist/js/_concaveman@1.2.1@concaveman/_concaveman@1.2.1@concaveman.e747f731.js +0 -1
- package/dist/js/_core-js@3.25.0@core-js/_core-js@3.25.0@core-js.003355ed.js +0 -5029
- package/dist/js/_crypto-js@4.1.1@crypto-js/_crypto-js@4.1.1@crypto-js.e2f7f158.js +0 -1823
- package/dist/js/_d3-array@1.2.4@d3-array/_d3-array@1.2.4@d3-array.d606df6b.js +0 -58
- package/dist/js/_d3-geo@1.7.1@d3-geo/_d3-geo@1.7.1@d3-geo.7d357be1.js +0 -1094
- package/dist/js/_d3-voronoi@1.1.2@d3-voronoi/_d3-voronoi@1.1.2@d3-voronoi.072f12a6.js +0 -816
- package/dist/js/_deep-equal@1.1.1@deep-equal/_deep-equal@1.1.1@deep-equal.98576c17.js +0 -108
- package/dist/js/_define-properties@1.1.4@define-properties/_define-properties@1.1.4@define-properties.647c3367.js +0 -40
- package/dist/js/_density-clustering@1.3.0@density-clustering/_density-clustering@1.3.0@density-clustering.a07fc6ae.js +0 -1
- package/dist/js/_earcut@2.2.4@earcut/_earcut@2.2.4@earcut.972ebfd3.js +0 -1
- package/dist/js/_echarts-gl@1.1.2@echarts-gl/_echarts-gl@1.1.2@echarts-gl.1e3964b9.js +0 -36533
- package/dist/js/_echarts@4.9.0@echarts/_echarts@4.9.0@echarts.7d74ba77.js +0 -44219
- package/dist/js/_fflate@0.4.8@fflate/_fflate@0.4.8@fflate.d8111196.js +0 -571
- package/dist/js/_function-bind@1.1.1@function-bind/_function-bind@1.1.1@function-bind.de3cf11d.js +0 -46
- package/dist/js/_functions-have-names@1.2.3@functions-have-names/_functions-have-names@1.2.3@functions-have-names.7def2408.js +0 -27
- package/dist/js/_geojson-equality@0.1.6@geojson-equality/_geojson-equality@0.1.6@geojson-equality.09ffa121.js +0 -133
- package/dist/js/_geojson-path-finder@1.5.3@geojson-path-finder/_geojson-path-finder@1.5.3@geojson-path-finder.7a10eb99.js +0 -348
- package/dist/js/_geojson-rbush@3.2.0@geojson-rbush/_geojson-rbush@3.2.0@geojson-rbush.2adaeedb.js +0 -93
- package/dist/js/_geotiff@2.0.4@geotiff/_geotiff@2.0.4@geotiff.5b08f79e.js +0 -3663
- package/dist/js/_get-intrinsic@1.1.2@get-intrinsic/_get-intrinsic@1.1.2@get-intrinsic.a633bd68.js +0 -291
- package/dist/js/_has-property-descriptors@1.0.0@has-property-descriptors/_has-property-descriptors@1.0.0@has-property-descriptors.6bd2d302.js +0 -26
- package/dist/js/_has-symbols@1.0.3@has-symbols/_has-symbols@1.0.3@has-symbols.70406077.js +0 -63
- package/dist/js/_has-tostringtag@1.0.0@has-tostringtag/_has-tostringtag@1.0.0@has-tostringtag.2d502422.js +0 -6
- package/dist/js/_has@1.0.3@has/_has@1.0.3@has.ddd2eb68.js +0 -4
- package/dist/js/_ieee754@1.2.1@ieee754/_ieee754@1.2.1@ieee754.56426503.js +0 -80
- package/dist/js/_is-arguments@1.1.1@is-arguments/_is-arguments@1.1.1@is-arguments.7d77e24a.js +0 -23
- package/dist/js/_is-date-object@1.0.5@is-date-object/_is-date-object@1.0.5@is-date-object.08cc2543.js +0 -20
- package/dist/js/_is-regex@1.1.4@is-regex/_is-regex@1.1.4@is-regex.6417e007.js +0 -47
- package/dist/js/_jspdf@2.5.1@jspdf/_jspdf@2.5.1@jspdf.e927dbd8.js +0 -8494
- package/dist/js/_kml-geojson@1.2.0@kml-geojson/_kml-geojson@1.2.0@kml-geojson.f1ae86e4.js +0 -7858
- package/dist/js/_lru-cache@6.0.0@lru-cache/_lru-cache@6.0.0@lru-cache.dd72cc1b.js +0 -263
- package/dist/js/_mgrs@1.0.0@mgrs/_mgrs@1.0.0@mgrs.12d1da3e.js +0 -432
- package/dist/js/_object-assign@4.1.1@object-assign/_object-assign@4.1.1@object-assign.e4009c1c.js +0 -69
- package/dist/js/_object-is@1.1.5@object-is/_object-is@1.1.5@object-is.e47f5d65.js +0 -45
- package/dist/js/_object-keys@1.1.1@object-keys/_object-keys@1.1.1@object-keys.4b1d0a99.js +0 -151
- package/dist/js/_ol-echarts@2.0.6@ol-echarts/_ol-echarts@2.0.6@ol-echarts.658aaf82.js +0 -841
- package/dist/js/_ol-ext@3.2.30@ol-ext/_ol-ext@3.2.30@ol-ext.b94220dd.js +0 -4614
- package/dist/js/_ol-mapbox-style@8.2.1@ol-mapbox-style/_ol-mapbox-style@8.2.1@ol-mapbox-style.795310f3.js +0 -1
- package/dist/js/_ol@6.15.1@ol/_ol@6.15.1@ol.8fd0cbb5.js +0 -31823
- package/dist/js/_pbf@3.2.1@pbf/_pbf@3.2.1@pbf.330acf55.js +0 -647
- package/dist/js/_performance-now@2.1.0@performance-now/_performance-now@2.1.0@performance-now.a51379c2.js +0 -34
- package/dist/js/_point-in-polygon@1.1.0@point-in-polygon/_point-in-polygon@1.1.0@point-in-polygon.2cc4306e.js +0 -1
- package/dist/js/_polygon-clipping@0.15.3@polygon-clipping/_polygon-clipping@0.15.3@polygon-clipping.c0e9ec57.js +0 -1363
- package/dist/js/_proj4@2.8.0@proj4/_proj4@2.8.0@proj4.1600352c.js +0 -4885
- package/dist/js/_quickselect@1.1.1@quickselect/_quickselect@1.1.1@quickselect.8afce154.js +0 -1
- package/dist/js/_quickselect@2.0.0@quickselect/_quickselect@2.0.0@quickselect.9f5c1e48.js +0 -51
- package/dist/js/_raf@3.4.1@raf/_raf@3.4.1@raf.ac0d6c66.js +0 -60
- package/dist/js/_rbush@2.0.2@rbush/_rbush@2.0.2@rbush.7149e620.js +0 -1
- package/dist/js/_rbush@3.0.1@rbush/_rbush@3.0.1@rbush.57d33d95.js +0 -402
- package/dist/js/_regexp.prototype.flags@1.4.3@regexp.prototype.flags/_regexp.prototype.flags@1.4.3@regexp.prototype.flags.8b6921c6.js +0 -102
- package/dist/js/_rgbcolor@1.0.1@rgbcolor/_rgbcolor@1.0.1@rgbcolor.dd87e013.js +0 -272
- package/dist/js/_robust-predicates@2.0.4@robust-predicates/_robust-predicates@2.0.4@robust-predicates.564bf2f8.js +0 -1
- package/dist/js/_skmeans@0.9.7@skmeans/_skmeans@0.9.7@skmeans.933c6a76.js +0 -1
- package/dist/js/_splaytree@3.1.1@splaytree/_splaytree@3.1.1@splaytree.6cb55ed3.js +0 -671
- package/dist/js/_stackblur-canvas@2.5.0@stackblur-canvas/_stackblur-canvas@2.5.0@stackblur-canvas.dd883d14.js +0 -214
- package/dist/js/_svg-pathdata@6.0.3@svg-pathdata/_svg-pathdata@6.0.3@svg-pathdata.7e858a5f.js +0 -441
- package/dist/js/_tinyqueue@2.0.3@tinyqueue/_tinyqueue@2.0.3@tinyqueue.78918532.js +0 -73
- package/dist/js/_topojson-client@3.1.0@topojson-client/_topojson-client@3.1.0@topojson-client.aef4e2d5.js +0 -238
- package/dist/js/_topojson-server@3.0.1@topojson-server/_topojson-server@3.0.1@topojson-server.b521a412.js +0 -662
- package/dist/js/_turf-jsts@1.2.3@turf-jsts/_turf-jsts@1.2.3@turf-jsts.6ef42696.js +0 -18934
- package/dist/js/_web-worker@1.2.0@web-worker/_web-worker@1.2.0@web-worker.43288df7.js +0 -2
- package/dist/js/_wkt-parser@1.3.2@wkt-parser/_wkt-parser@1.3.2@wkt-parser.0e1cf374.js +0 -461
- package/dist/js/_xml-utils@1.2.0@xml-utils/_xml-utils@1.2.0@xml-utils.2a8ae655.js +0 -126
- package/dist/js/_yallist@4.0.0@yallist/_yallist@4.0.0@yallist.8350aafe.js +0 -363
- package/dist/js/_zrender@4.3.2@zrender/_zrender@4.3.2@zrender.1feea14d.js +0 -12455
- package/dist/mirage2d.es.js +0 -15894
|
@@ -1,3109 +0,0 @@
|
|
|
1
|
-
import { b as bbox } from "../_@turf_bbox@6.5.0@@turf/_@turf_bbox@6.5.0@@turf.4c59feee.js";
|
|
2
|
-
import { a as area } from "../_@turf_area@6.5.0@@turf/_@turf_area@6.5.0@@turf.6cbf0cc1.js";
|
|
3
|
-
import { b as booleanPointInPolygon } from "../_@turf_boolean-point-in-polygon@6.5.0@@turf/_@turf_boolean-point-in-polygon@6.5.0@@turf.62a2d48a.js";
|
|
4
|
-
import { e as explode } from "../_@turf_explode@6.5.0@@turf/_@turf_explode@6.5.0@@turf.5c768db5.js";
|
|
5
|
-
import { d as collectionOf, b as getCoords } from "../_@turf_invariant@6.5.0@@turf/_@turf_invariant@6.5.0@@turf.0ef69f8c.js";
|
|
6
|
-
import { i as isObject, j as multiPolygon, f as featureCollection, a as polygon } from "../_@turf_helpers@6.5.0@@turf/_@turf_helpers@6.5.0@@turf.f1480aa1.js";
|
|
7
|
-
import { _ as _objectAssign_4_1_1_objectAssign } from "../_object-assign@4.1.1@object-assign/_object-assign@4.1.1@object-assign.e4009c1c.js";
|
|
8
|
-
import { a as featureEach } from "../_@turf_meta@6.5.0@@turf/_@turf_meta@6.5.0@@turf.1b9d5da5.js";
|
|
9
|
-
function gridToMatrix(grid, options) {
|
|
10
|
-
options = options || {};
|
|
11
|
-
if (!isObject(options))
|
|
12
|
-
throw new Error("options is invalid");
|
|
13
|
-
var zProperty = options.zProperty || "elevation";
|
|
14
|
-
var flip = options.flip;
|
|
15
|
-
var flags = options.flags;
|
|
16
|
-
collectionOf(grid, "Point", "input must contain Points");
|
|
17
|
-
var pointsMatrix = sortPointsByLatLng(grid, flip);
|
|
18
|
-
var matrix = [];
|
|
19
|
-
for (var r = 0; r < pointsMatrix.length; r++) {
|
|
20
|
-
var pointRow = pointsMatrix[r];
|
|
21
|
-
var row = [];
|
|
22
|
-
for (var c = 0; c < pointRow.length; c++) {
|
|
23
|
-
var point = pointRow[c];
|
|
24
|
-
if (point.properties[zProperty])
|
|
25
|
-
row.push(point.properties[zProperty]);
|
|
26
|
-
else
|
|
27
|
-
row.push(0);
|
|
28
|
-
if (flags === true)
|
|
29
|
-
point.properties.matrixPosition = [r, c];
|
|
30
|
-
}
|
|
31
|
-
matrix.push(row);
|
|
32
|
-
}
|
|
33
|
-
return matrix;
|
|
34
|
-
}
|
|
35
|
-
function sortPointsByLatLng(points, flip) {
|
|
36
|
-
var pointsByLatitude = {};
|
|
37
|
-
featureEach(points, function(point) {
|
|
38
|
-
var lat = getCoords(point)[1];
|
|
39
|
-
if (!pointsByLatitude[lat])
|
|
40
|
-
pointsByLatitude[lat] = [];
|
|
41
|
-
pointsByLatitude[lat].push(point);
|
|
42
|
-
});
|
|
43
|
-
var orderedRowsByLatitude = Object.keys(pointsByLatitude).map(function(lat) {
|
|
44
|
-
var row = pointsByLatitude[lat];
|
|
45
|
-
var rowOrderedByLongitude = row.sort(function(a, b) {
|
|
46
|
-
return getCoords(a)[0] - getCoords(b)[0];
|
|
47
|
-
});
|
|
48
|
-
return rowOrderedByLongitude;
|
|
49
|
-
});
|
|
50
|
-
var pointMatrix = orderedRowsByLatitude.sort(function(a, b) {
|
|
51
|
-
if (flip)
|
|
52
|
-
return getCoords(a[0])[1] - getCoords(b[0])[1];
|
|
53
|
-
else
|
|
54
|
-
return getCoords(b[0])[1] - getCoords(a[0])[1];
|
|
55
|
-
});
|
|
56
|
-
return pointMatrix;
|
|
57
|
-
}
|
|
58
|
-
/*!
|
|
59
|
-
* @license GNU Affero General Public License.
|
|
60
|
-
* Copyright (c) 2015, 2015 Ronny Lorenz <ronny@tbi.univie.ac.at>
|
|
61
|
-
* v. 1.2.0
|
|
62
|
-
* https://github.com/RaumZeit/MarchingSquares.js
|
|
63
|
-
*
|
|
64
|
-
* MarchingSquaresJS is free software: you can redistribute it and/or modify
|
|
65
|
-
* it under the terms of the GNU Affero General Public License as published by
|
|
66
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
67
|
-
* (at your option) any later version.
|
|
68
|
-
*
|
|
69
|
-
* MarchingSquaresJS is distributed in the hope that it will be useful,
|
|
70
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
71
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
72
|
-
* GNU Affero General Public License for more details.
|
|
73
|
-
*
|
|
74
|
-
* As additional permission under GNU Affero General Public License version 3
|
|
75
|
-
* section 7, third-party projects (personal or commercial) may distribute,
|
|
76
|
-
* include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the
|
|
77
|
-
* requirement that said third-party project for that reason alone becomes
|
|
78
|
-
* subject to any requirement of the GNU Affero General Public License version 3.
|
|
79
|
-
* Any modifications to MarchingSquaresJS, however, must be shared with the public
|
|
80
|
-
* and made available.
|
|
81
|
-
*
|
|
82
|
-
* In summary this:
|
|
83
|
-
* - allows you to use MarchingSquaresJS at no cost
|
|
84
|
-
* - allows you to use MarchingSquaresJS for both personal and commercial purposes
|
|
85
|
-
* - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any
|
|
86
|
-
* license as long as this license notice is included
|
|
87
|
-
* - enables you to keep the source code of your program that uses MarchingSquaresJS
|
|
88
|
-
* undisclosed
|
|
89
|
-
* - forces you to share any modifications you have made to MarchingSquaresJS,
|
|
90
|
-
* e.g. bug-fixes
|
|
91
|
-
*
|
|
92
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
93
|
-
* along with MarchingSquaresJS. If not, see <http://www.gnu.org/licenses/>.
|
|
94
|
-
*/
|
|
95
|
-
var defaultSettings = {
|
|
96
|
-
successCallback: null,
|
|
97
|
-
verbose: false,
|
|
98
|
-
polygons: false
|
|
99
|
-
};
|
|
100
|
-
var settings = {};
|
|
101
|
-
function isoBands(data, minV, bandwidth, options) {
|
|
102
|
-
options = options ? options : {};
|
|
103
|
-
var optionKeys = Object.keys(defaultSettings);
|
|
104
|
-
for (var i = 0; i < optionKeys.length; i++) {
|
|
105
|
-
var key = optionKeys[i];
|
|
106
|
-
var val = options[key];
|
|
107
|
-
val = typeof val !== "undefined" && val !== null ? val : defaultSettings[key];
|
|
108
|
-
settings[key] = val;
|
|
109
|
-
}
|
|
110
|
-
if (settings.verbose)
|
|
111
|
-
console.log(
|
|
112
|
-
"MarchingSquaresJS-isoBands: computing isobands for [" + minV + ":" + (minV + bandwidth) + "]"
|
|
113
|
-
);
|
|
114
|
-
var grid = computeBandGrid(data, minV, bandwidth);
|
|
115
|
-
var ret;
|
|
116
|
-
if (settings.polygons) {
|
|
117
|
-
if (settings.verbose)
|
|
118
|
-
console.log(
|
|
119
|
-
"MarchingSquaresJS-isoBands: returning single polygons for each grid cell"
|
|
120
|
-
);
|
|
121
|
-
ret = BandGrid2Areas(grid);
|
|
122
|
-
} else {
|
|
123
|
-
if (settings.verbose)
|
|
124
|
-
console.log(
|
|
125
|
-
"MarchingSquaresJS-isoBands: returning polygon paths for entire data grid"
|
|
126
|
-
);
|
|
127
|
-
ret = BandGrid2AreaPaths(grid);
|
|
128
|
-
}
|
|
129
|
-
if (typeof settings.successCallback === "function")
|
|
130
|
-
settings.successCallback(ret);
|
|
131
|
-
return ret;
|
|
132
|
-
}
|
|
133
|
-
var Node0 = 64, Node1 = 16, Node2 = 4, Node3 = 1;
|
|
134
|
-
var isoBandNextXTL = [];
|
|
135
|
-
var isoBandNextYTL = [];
|
|
136
|
-
var isoBandNextOTL = [];
|
|
137
|
-
var isoBandNextXTR = [];
|
|
138
|
-
var isoBandNextYTR = [];
|
|
139
|
-
var isoBandNextOTR = [];
|
|
140
|
-
var isoBandNextXRT = [];
|
|
141
|
-
var isoBandNextYRT = [];
|
|
142
|
-
var isoBandNextORT = [];
|
|
143
|
-
var isoBandNextXRB = [];
|
|
144
|
-
var isoBandNextYRB = [];
|
|
145
|
-
var isoBandNextORB = [];
|
|
146
|
-
var isoBandNextXBL = [];
|
|
147
|
-
var isoBandNextYBL = [];
|
|
148
|
-
var isoBandNextOBL = [];
|
|
149
|
-
var isoBandNextXBR = [];
|
|
150
|
-
var isoBandNextYBR = [];
|
|
151
|
-
var isoBandNextOBR = [];
|
|
152
|
-
var isoBandNextXLT = [];
|
|
153
|
-
var isoBandNextYLT = [];
|
|
154
|
-
var isoBandNextOLT = [];
|
|
155
|
-
var isoBandNextXLB = [];
|
|
156
|
-
var isoBandNextYLB = [];
|
|
157
|
-
var isoBandNextOLB = [];
|
|
158
|
-
isoBandNextXRT[85] = isoBandNextXRB[85] = -1;
|
|
159
|
-
isoBandNextYRT[85] = isoBandNextYRB[85] = 0;
|
|
160
|
-
isoBandNextORT[85] = isoBandNextORB[85] = 1;
|
|
161
|
-
isoBandNextXLT[85] = isoBandNextXLB[85] = 1;
|
|
162
|
-
isoBandNextYLT[85] = isoBandNextYLB[85] = 0;
|
|
163
|
-
isoBandNextOLT[85] = isoBandNextOLB[85] = 1;
|
|
164
|
-
isoBandNextXTL[85] = isoBandNextXTR[85] = 0;
|
|
165
|
-
isoBandNextYTL[85] = isoBandNextYTR[85] = -1;
|
|
166
|
-
isoBandNextOTL[85] = isoBandNextOBL[85] = 0;
|
|
167
|
-
isoBandNextXBR[85] = isoBandNextXBL[85] = 0;
|
|
168
|
-
isoBandNextYBR[85] = isoBandNextYBL[85] = 1;
|
|
169
|
-
isoBandNextOTR[85] = isoBandNextOBR[85] = 1;
|
|
170
|
-
isoBandNextXLB[1] = isoBandNextXLB[169] = 0;
|
|
171
|
-
isoBandNextYLB[1] = isoBandNextYLB[169] = -1;
|
|
172
|
-
isoBandNextOLB[1] = isoBandNextOLB[169] = 0;
|
|
173
|
-
isoBandNextXBL[1] = isoBandNextXBL[169] = -1;
|
|
174
|
-
isoBandNextYBL[1] = isoBandNextYBL[169] = 0;
|
|
175
|
-
isoBandNextOBL[1] = isoBandNextOBL[169] = 0;
|
|
176
|
-
isoBandNextXRB[4] = isoBandNextXRB[166] = 0;
|
|
177
|
-
isoBandNextYRB[4] = isoBandNextYRB[166] = -1;
|
|
178
|
-
isoBandNextORB[4] = isoBandNextORB[166] = 1;
|
|
179
|
-
isoBandNextXBR[4] = isoBandNextXBR[166] = 1;
|
|
180
|
-
isoBandNextYBR[4] = isoBandNextYBR[166] = 0;
|
|
181
|
-
isoBandNextOBR[4] = isoBandNextOBR[166] = 0;
|
|
182
|
-
isoBandNextXRT[16] = isoBandNextXRT[154] = 0;
|
|
183
|
-
isoBandNextYRT[16] = isoBandNextYRT[154] = 1;
|
|
184
|
-
isoBandNextORT[16] = isoBandNextORT[154] = 1;
|
|
185
|
-
isoBandNextXTR[16] = isoBandNextXTR[154] = 1;
|
|
186
|
-
isoBandNextYTR[16] = isoBandNextYTR[154] = 0;
|
|
187
|
-
isoBandNextOTR[16] = isoBandNextOTR[154] = 1;
|
|
188
|
-
isoBandNextXLT[64] = isoBandNextXLT[106] = 0;
|
|
189
|
-
isoBandNextYLT[64] = isoBandNextYLT[106] = 1;
|
|
190
|
-
isoBandNextOLT[64] = isoBandNextOLT[106] = 0;
|
|
191
|
-
isoBandNextXTL[64] = isoBandNextXTL[106] = -1;
|
|
192
|
-
isoBandNextYTL[64] = isoBandNextYTL[106] = 0;
|
|
193
|
-
isoBandNextOTL[64] = isoBandNextOTL[106] = 1;
|
|
194
|
-
isoBandNextXLT[2] = isoBandNextXLT[168] = 0;
|
|
195
|
-
isoBandNextYLT[2] = isoBandNextYLT[168] = -1;
|
|
196
|
-
isoBandNextOLT[2] = isoBandNextOLT[168] = 1;
|
|
197
|
-
isoBandNextXLB[2] = isoBandNextXLB[168] = 0;
|
|
198
|
-
isoBandNextYLB[2] = isoBandNextYLB[168] = -1;
|
|
199
|
-
isoBandNextOLB[2] = isoBandNextOLB[168] = 0;
|
|
200
|
-
isoBandNextXBL[2] = isoBandNextXBL[168] = -1;
|
|
201
|
-
isoBandNextYBL[2] = isoBandNextYBL[168] = 0;
|
|
202
|
-
isoBandNextOBL[2] = isoBandNextOBL[168] = 0;
|
|
203
|
-
isoBandNextXBR[2] = isoBandNextXBR[168] = -1;
|
|
204
|
-
isoBandNextYBR[2] = isoBandNextYBR[168] = 0;
|
|
205
|
-
isoBandNextOBR[2] = isoBandNextOBR[168] = 1;
|
|
206
|
-
isoBandNextXRT[8] = isoBandNextXRT[162] = 0;
|
|
207
|
-
isoBandNextYRT[8] = isoBandNextYRT[162] = -1;
|
|
208
|
-
isoBandNextORT[8] = isoBandNextORT[162] = 0;
|
|
209
|
-
isoBandNextXRB[8] = isoBandNextXRB[162] = 0;
|
|
210
|
-
isoBandNextYRB[8] = isoBandNextYRB[162] = -1;
|
|
211
|
-
isoBandNextORB[8] = isoBandNextORB[162] = 1;
|
|
212
|
-
isoBandNextXBL[8] = isoBandNextXBL[162] = 1;
|
|
213
|
-
isoBandNextYBL[8] = isoBandNextYBL[162] = 0;
|
|
214
|
-
isoBandNextOBL[8] = isoBandNextOBL[162] = 1;
|
|
215
|
-
isoBandNextXBR[8] = isoBandNextXBR[162] = 1;
|
|
216
|
-
isoBandNextYBR[8] = isoBandNextYBR[162] = 0;
|
|
217
|
-
isoBandNextOBR[8] = isoBandNextOBR[162] = 0;
|
|
218
|
-
isoBandNextXRT[32] = isoBandNextXRT[138] = 0;
|
|
219
|
-
isoBandNextYRT[32] = isoBandNextYRT[138] = 1;
|
|
220
|
-
isoBandNextORT[32] = isoBandNextORT[138] = 1;
|
|
221
|
-
isoBandNextXRB[32] = isoBandNextXRB[138] = 0;
|
|
222
|
-
isoBandNextYRB[32] = isoBandNextYRB[138] = 1;
|
|
223
|
-
isoBandNextORB[32] = isoBandNextORB[138] = 0;
|
|
224
|
-
isoBandNextXTL[32] = isoBandNextXTL[138] = 1;
|
|
225
|
-
isoBandNextYTL[32] = isoBandNextYTL[138] = 0;
|
|
226
|
-
isoBandNextOTL[32] = isoBandNextOTL[138] = 0;
|
|
227
|
-
isoBandNextXTR[32] = isoBandNextXTR[138] = 1;
|
|
228
|
-
isoBandNextYTR[32] = isoBandNextYTR[138] = 0;
|
|
229
|
-
isoBandNextOTR[32] = isoBandNextOTR[138] = 1;
|
|
230
|
-
isoBandNextXLB[128] = isoBandNextXLB[42] = 0;
|
|
231
|
-
isoBandNextYLB[128] = isoBandNextYLB[42] = 1;
|
|
232
|
-
isoBandNextOLB[128] = isoBandNextOLB[42] = 1;
|
|
233
|
-
isoBandNextXLT[128] = isoBandNextXLT[42] = 0;
|
|
234
|
-
isoBandNextYLT[128] = isoBandNextYLT[42] = 1;
|
|
235
|
-
isoBandNextOLT[128] = isoBandNextOLT[42] = 0;
|
|
236
|
-
isoBandNextXTL[128] = isoBandNextXTL[42] = -1;
|
|
237
|
-
isoBandNextYTL[128] = isoBandNextYTL[42] = 0;
|
|
238
|
-
isoBandNextOTL[128] = isoBandNextOTL[42] = 1;
|
|
239
|
-
isoBandNextXTR[128] = isoBandNextXTR[42] = -1;
|
|
240
|
-
isoBandNextYTR[128] = isoBandNextYTR[42] = 0;
|
|
241
|
-
isoBandNextOTR[128] = isoBandNextOTR[42] = 0;
|
|
242
|
-
isoBandNextXRB[5] = isoBandNextXRB[165] = -1;
|
|
243
|
-
isoBandNextYRB[5] = isoBandNextYRB[165] = 0;
|
|
244
|
-
isoBandNextORB[5] = isoBandNextORB[165] = 0;
|
|
245
|
-
isoBandNextXLB[5] = isoBandNextXLB[165] = 1;
|
|
246
|
-
isoBandNextYLB[5] = isoBandNextYLB[165] = 0;
|
|
247
|
-
isoBandNextOLB[5] = isoBandNextOLB[165] = 0;
|
|
248
|
-
isoBandNextXBR[20] = isoBandNextXBR[150] = 0;
|
|
249
|
-
isoBandNextYBR[20] = isoBandNextYBR[150] = 1;
|
|
250
|
-
isoBandNextOBR[20] = isoBandNextOBR[150] = 1;
|
|
251
|
-
isoBandNextXTR[20] = isoBandNextXTR[150] = 0;
|
|
252
|
-
isoBandNextYTR[20] = isoBandNextYTR[150] = -1;
|
|
253
|
-
isoBandNextOTR[20] = isoBandNextOTR[150] = 1;
|
|
254
|
-
isoBandNextXRT[80] = isoBandNextXRT[90] = -1;
|
|
255
|
-
isoBandNextYRT[80] = isoBandNextYRT[90] = 0;
|
|
256
|
-
isoBandNextORT[80] = isoBandNextORT[90] = 1;
|
|
257
|
-
isoBandNextXLT[80] = isoBandNextXLT[90] = 1;
|
|
258
|
-
isoBandNextYLT[80] = isoBandNextYLT[90] = 0;
|
|
259
|
-
isoBandNextOLT[80] = isoBandNextOLT[90] = 1;
|
|
260
|
-
isoBandNextXBL[65] = isoBandNextXBL[105] = 0;
|
|
261
|
-
isoBandNextYBL[65] = isoBandNextYBL[105] = 1;
|
|
262
|
-
isoBandNextOBL[65] = isoBandNextOBL[105] = 0;
|
|
263
|
-
isoBandNextXTL[65] = isoBandNextXTL[105] = 0;
|
|
264
|
-
isoBandNextYTL[65] = isoBandNextYTL[105] = -1;
|
|
265
|
-
isoBandNextOTL[65] = isoBandNextOTL[105] = 0;
|
|
266
|
-
isoBandNextXRT[160] = isoBandNextXRT[10] = -1;
|
|
267
|
-
isoBandNextYRT[160] = isoBandNextYRT[10] = 0;
|
|
268
|
-
isoBandNextORT[160] = isoBandNextORT[10] = 1;
|
|
269
|
-
isoBandNextXRB[160] = isoBandNextXRB[10] = -1;
|
|
270
|
-
isoBandNextYRB[160] = isoBandNextYRB[10] = 0;
|
|
271
|
-
isoBandNextORB[160] = isoBandNextORB[10] = 0;
|
|
272
|
-
isoBandNextXLB[160] = isoBandNextXLB[10] = 1;
|
|
273
|
-
isoBandNextYLB[160] = isoBandNextYLB[10] = 0;
|
|
274
|
-
isoBandNextOLB[160] = isoBandNextOLB[10] = 0;
|
|
275
|
-
isoBandNextXLT[160] = isoBandNextXLT[10] = 1;
|
|
276
|
-
isoBandNextYLT[160] = isoBandNextYLT[10] = 0;
|
|
277
|
-
isoBandNextOLT[160] = isoBandNextOLT[10] = 1;
|
|
278
|
-
isoBandNextXBR[130] = isoBandNextXBR[40] = 0;
|
|
279
|
-
isoBandNextYBR[130] = isoBandNextYBR[40] = 1;
|
|
280
|
-
isoBandNextOBR[130] = isoBandNextOBR[40] = 1;
|
|
281
|
-
isoBandNextXBL[130] = isoBandNextXBL[40] = 0;
|
|
282
|
-
isoBandNextYBL[130] = isoBandNextYBL[40] = 1;
|
|
283
|
-
isoBandNextOBL[130] = isoBandNextOBL[40] = 0;
|
|
284
|
-
isoBandNextXTL[130] = isoBandNextXTL[40] = 0;
|
|
285
|
-
isoBandNextYTL[130] = isoBandNextYTL[40] = -1;
|
|
286
|
-
isoBandNextOTL[130] = isoBandNextOTL[40] = 0;
|
|
287
|
-
isoBandNextXTR[130] = isoBandNextXTR[40] = 0;
|
|
288
|
-
isoBandNextYTR[130] = isoBandNextYTR[40] = -1;
|
|
289
|
-
isoBandNextOTR[130] = isoBandNextOTR[40] = 1;
|
|
290
|
-
isoBandNextXRB[37] = isoBandNextXRB[133] = 0;
|
|
291
|
-
isoBandNextYRB[37] = isoBandNextYRB[133] = 1;
|
|
292
|
-
isoBandNextORB[37] = isoBandNextORB[133] = 1;
|
|
293
|
-
isoBandNextXLB[37] = isoBandNextXLB[133] = 0;
|
|
294
|
-
isoBandNextYLB[37] = isoBandNextYLB[133] = 1;
|
|
295
|
-
isoBandNextOLB[37] = isoBandNextOLB[133] = 0;
|
|
296
|
-
isoBandNextXTL[37] = isoBandNextXTL[133] = -1;
|
|
297
|
-
isoBandNextYTL[37] = isoBandNextYTL[133] = 0;
|
|
298
|
-
isoBandNextOTL[37] = isoBandNextOTL[133] = 0;
|
|
299
|
-
isoBandNextXTR[37] = isoBandNextXTR[133] = 1;
|
|
300
|
-
isoBandNextYTR[37] = isoBandNextYTR[133] = 0;
|
|
301
|
-
isoBandNextOTR[37] = isoBandNextOTR[133] = 0;
|
|
302
|
-
isoBandNextXBR[148] = isoBandNextXBR[22] = -1;
|
|
303
|
-
isoBandNextYBR[148] = isoBandNextYBR[22] = 0;
|
|
304
|
-
isoBandNextOBR[148] = isoBandNextOBR[22] = 0;
|
|
305
|
-
isoBandNextXLB[148] = isoBandNextXLB[22] = 0;
|
|
306
|
-
isoBandNextYLB[148] = isoBandNextYLB[22] = -1;
|
|
307
|
-
isoBandNextOLB[148] = isoBandNextOLB[22] = 1;
|
|
308
|
-
isoBandNextXLT[148] = isoBandNextXLT[22] = 0;
|
|
309
|
-
isoBandNextYLT[148] = isoBandNextYLT[22] = 1;
|
|
310
|
-
isoBandNextOLT[148] = isoBandNextOLT[22] = 1;
|
|
311
|
-
isoBandNextXTR[148] = isoBandNextXTR[22] = -1;
|
|
312
|
-
isoBandNextYTR[148] = isoBandNextYTR[22] = 0;
|
|
313
|
-
isoBandNextOTR[148] = isoBandNextOTR[22] = 1;
|
|
314
|
-
isoBandNextXRT[82] = isoBandNextXRT[88] = 0;
|
|
315
|
-
isoBandNextYRT[82] = isoBandNextYRT[88] = -1;
|
|
316
|
-
isoBandNextORT[82] = isoBandNextORT[88] = 1;
|
|
317
|
-
isoBandNextXBR[82] = isoBandNextXBR[88] = 1;
|
|
318
|
-
isoBandNextYBR[82] = isoBandNextYBR[88] = 0;
|
|
319
|
-
isoBandNextOBR[82] = isoBandNextOBR[88] = 1;
|
|
320
|
-
isoBandNextXBL[82] = isoBandNextXBL[88] = -1;
|
|
321
|
-
isoBandNextYBL[82] = isoBandNextYBL[88] = 0;
|
|
322
|
-
isoBandNextOBL[82] = isoBandNextOBL[88] = 1;
|
|
323
|
-
isoBandNextXLT[82] = isoBandNextXLT[88] = 0;
|
|
324
|
-
isoBandNextYLT[82] = isoBandNextYLT[88] = -1;
|
|
325
|
-
isoBandNextOLT[82] = isoBandNextOLT[88] = 0;
|
|
326
|
-
isoBandNextXRT[73] = isoBandNextXRT[97] = 0;
|
|
327
|
-
isoBandNextYRT[73] = isoBandNextYRT[97] = 1;
|
|
328
|
-
isoBandNextORT[73] = isoBandNextORT[97] = 0;
|
|
329
|
-
isoBandNextXRB[73] = isoBandNextXRB[97] = 0;
|
|
330
|
-
isoBandNextYRB[73] = isoBandNextYRB[97] = -1;
|
|
331
|
-
isoBandNextORB[73] = isoBandNextORB[97] = 0;
|
|
332
|
-
isoBandNextXBL[73] = isoBandNextXBL[97] = 1;
|
|
333
|
-
isoBandNextYBL[73] = isoBandNextYBL[97] = 0;
|
|
334
|
-
isoBandNextOBL[73] = isoBandNextOBL[97] = 0;
|
|
335
|
-
isoBandNextXTL[73] = isoBandNextXTL[97] = 1;
|
|
336
|
-
isoBandNextYTL[73] = isoBandNextYTL[97] = 0;
|
|
337
|
-
isoBandNextOTL[73] = isoBandNextOTL[97] = 1;
|
|
338
|
-
isoBandNextXRT[145] = isoBandNextXRT[25] = 0;
|
|
339
|
-
isoBandNextYRT[145] = isoBandNextYRT[25] = -1;
|
|
340
|
-
isoBandNextORT[145] = isoBandNextORT[25] = 0;
|
|
341
|
-
isoBandNextXBL[145] = isoBandNextXBL[25] = 1;
|
|
342
|
-
isoBandNextYBL[145] = isoBandNextYBL[25] = 0;
|
|
343
|
-
isoBandNextOBL[145] = isoBandNextOBL[25] = 1;
|
|
344
|
-
isoBandNextXLB[145] = isoBandNextXLB[25] = 0;
|
|
345
|
-
isoBandNextYLB[145] = isoBandNextYLB[25] = 1;
|
|
346
|
-
isoBandNextOLB[145] = isoBandNextOLB[25] = 1;
|
|
347
|
-
isoBandNextXTR[145] = isoBandNextXTR[25] = -1;
|
|
348
|
-
isoBandNextYTR[145] = isoBandNextYTR[25] = 0;
|
|
349
|
-
isoBandNextOTR[145] = isoBandNextOTR[25] = 0;
|
|
350
|
-
isoBandNextXRB[70] = isoBandNextXRB[100] = 0;
|
|
351
|
-
isoBandNextYRB[70] = isoBandNextYRB[100] = 1;
|
|
352
|
-
isoBandNextORB[70] = isoBandNextORB[100] = 0;
|
|
353
|
-
isoBandNextXBR[70] = isoBandNextXBR[100] = -1;
|
|
354
|
-
isoBandNextYBR[70] = isoBandNextYBR[100] = 0;
|
|
355
|
-
isoBandNextOBR[70] = isoBandNextOBR[100] = 1;
|
|
356
|
-
isoBandNextXLT[70] = isoBandNextXLT[100] = 0;
|
|
357
|
-
isoBandNextYLT[70] = isoBandNextYLT[100] = -1;
|
|
358
|
-
isoBandNextOLT[70] = isoBandNextOLT[100] = 1;
|
|
359
|
-
isoBandNextXTL[70] = isoBandNextXTL[100] = 1;
|
|
360
|
-
isoBandNextYTL[70] = isoBandNextYTL[100] = 0;
|
|
361
|
-
isoBandNextOTL[70] = isoBandNextOTL[100] = 0;
|
|
362
|
-
isoBandNextXRB[101] = isoBandNextXRB[69] = 0;
|
|
363
|
-
isoBandNextYRB[101] = isoBandNextYRB[69] = 1;
|
|
364
|
-
isoBandNextORB[101] = isoBandNextORB[69] = 0;
|
|
365
|
-
isoBandNextXTL[101] = isoBandNextXTL[69] = 1;
|
|
366
|
-
isoBandNextYTL[101] = isoBandNextYTL[69] = 0;
|
|
367
|
-
isoBandNextOTL[101] = isoBandNextOTL[69] = 0;
|
|
368
|
-
isoBandNextXLB[149] = isoBandNextXLB[21] = 0;
|
|
369
|
-
isoBandNextYLB[149] = isoBandNextYLB[21] = 1;
|
|
370
|
-
isoBandNextOLB[149] = isoBandNextOLB[21] = 1;
|
|
371
|
-
isoBandNextXTR[149] = isoBandNextXTR[21] = -1;
|
|
372
|
-
isoBandNextYTR[149] = isoBandNextYTR[21] = 0;
|
|
373
|
-
isoBandNextOTR[149] = isoBandNextOTR[21] = 0;
|
|
374
|
-
isoBandNextXBR[86] = isoBandNextXBR[84] = -1;
|
|
375
|
-
isoBandNextYBR[86] = isoBandNextYBR[84] = 0;
|
|
376
|
-
isoBandNextOBR[86] = isoBandNextOBR[84] = 1;
|
|
377
|
-
isoBandNextXLT[86] = isoBandNextXLT[84] = 0;
|
|
378
|
-
isoBandNextYLT[86] = isoBandNextYLT[84] = -1;
|
|
379
|
-
isoBandNextOLT[86] = isoBandNextOLT[84] = 1;
|
|
380
|
-
isoBandNextXRT[89] = isoBandNextXRT[81] = 0;
|
|
381
|
-
isoBandNextYRT[89] = isoBandNextYRT[81] = -1;
|
|
382
|
-
isoBandNextORT[89] = isoBandNextORT[81] = 0;
|
|
383
|
-
isoBandNextXBL[89] = isoBandNextXBL[81] = 1;
|
|
384
|
-
isoBandNextYBL[89] = isoBandNextYBL[81] = 0;
|
|
385
|
-
isoBandNextOBL[89] = isoBandNextOBL[81] = 1;
|
|
386
|
-
isoBandNextXRT[96] = isoBandNextXRT[74] = 0;
|
|
387
|
-
isoBandNextYRT[96] = isoBandNextYRT[74] = 1;
|
|
388
|
-
isoBandNextORT[96] = isoBandNextORT[74] = 0;
|
|
389
|
-
isoBandNextXRB[96] = isoBandNextXRB[74] = -1;
|
|
390
|
-
isoBandNextYRB[96] = isoBandNextYRB[74] = 0;
|
|
391
|
-
isoBandNextORB[96] = isoBandNextORB[74] = 1;
|
|
392
|
-
isoBandNextXLT[96] = isoBandNextXLT[74] = 1;
|
|
393
|
-
isoBandNextYLT[96] = isoBandNextYLT[74] = 0;
|
|
394
|
-
isoBandNextOLT[96] = isoBandNextOLT[74] = 0;
|
|
395
|
-
isoBandNextXTL[96] = isoBandNextXTL[74] = 1;
|
|
396
|
-
isoBandNextYTL[96] = isoBandNextYTL[74] = 0;
|
|
397
|
-
isoBandNextOTL[96] = isoBandNextOTL[74] = 1;
|
|
398
|
-
isoBandNextXRT[24] = isoBandNextXRT[146] = 0;
|
|
399
|
-
isoBandNextYRT[24] = isoBandNextYRT[146] = -1;
|
|
400
|
-
isoBandNextORT[24] = isoBandNextORT[146] = 1;
|
|
401
|
-
isoBandNextXBR[24] = isoBandNextXBR[146] = 1;
|
|
402
|
-
isoBandNextYBR[24] = isoBandNextYBR[146] = 0;
|
|
403
|
-
isoBandNextOBR[24] = isoBandNextOBR[146] = 1;
|
|
404
|
-
isoBandNextXBL[24] = isoBandNextXBL[146] = 0;
|
|
405
|
-
isoBandNextYBL[24] = isoBandNextYBL[146] = 1;
|
|
406
|
-
isoBandNextOBL[24] = isoBandNextOBL[146] = 1;
|
|
407
|
-
isoBandNextXTR[24] = isoBandNextXTR[146] = 0;
|
|
408
|
-
isoBandNextYTR[24] = isoBandNextYTR[146] = -1;
|
|
409
|
-
isoBandNextOTR[24] = isoBandNextOTR[146] = 0;
|
|
410
|
-
isoBandNextXRB[6] = isoBandNextXRB[164] = -1;
|
|
411
|
-
isoBandNextYRB[6] = isoBandNextYRB[164] = 0;
|
|
412
|
-
isoBandNextORB[6] = isoBandNextORB[164] = 1;
|
|
413
|
-
isoBandNextXBR[6] = isoBandNextXBR[164] = -1;
|
|
414
|
-
isoBandNextYBR[6] = isoBandNextYBR[164] = 0;
|
|
415
|
-
isoBandNextOBR[6] = isoBandNextOBR[164] = 0;
|
|
416
|
-
isoBandNextXLB[6] = isoBandNextXLB[164] = 0;
|
|
417
|
-
isoBandNextYLB[6] = isoBandNextYLB[164] = -1;
|
|
418
|
-
isoBandNextOLB[6] = isoBandNextOLB[164] = 1;
|
|
419
|
-
isoBandNextXLT[6] = isoBandNextXLT[164] = 1;
|
|
420
|
-
isoBandNextYLT[6] = isoBandNextYLT[164] = 0;
|
|
421
|
-
isoBandNextOLT[6] = isoBandNextOLT[164] = 0;
|
|
422
|
-
isoBandNextXBL[129] = isoBandNextXBL[41] = 0;
|
|
423
|
-
isoBandNextYBL[129] = isoBandNextYBL[41] = 1;
|
|
424
|
-
isoBandNextOBL[129] = isoBandNextOBL[41] = 1;
|
|
425
|
-
isoBandNextXLB[129] = isoBandNextXLB[41] = 0;
|
|
426
|
-
isoBandNextYLB[129] = isoBandNextYLB[41] = 1;
|
|
427
|
-
isoBandNextOLB[129] = isoBandNextOLB[41] = 0;
|
|
428
|
-
isoBandNextXTL[129] = isoBandNextXTL[41] = -1;
|
|
429
|
-
isoBandNextYTL[129] = isoBandNextYTL[41] = 0;
|
|
430
|
-
isoBandNextOTL[129] = isoBandNextOTL[41] = 0;
|
|
431
|
-
isoBandNextXTR[129] = isoBandNextXTR[41] = 0;
|
|
432
|
-
isoBandNextYTR[129] = isoBandNextYTR[41] = -1;
|
|
433
|
-
isoBandNextOTR[129] = isoBandNextOTR[41] = 0;
|
|
434
|
-
isoBandNextXBR[66] = isoBandNextXBR[104] = 0;
|
|
435
|
-
isoBandNextYBR[66] = isoBandNextYBR[104] = 1;
|
|
436
|
-
isoBandNextOBR[66] = isoBandNextOBR[104] = 0;
|
|
437
|
-
isoBandNextXBL[66] = isoBandNextXBL[104] = -1;
|
|
438
|
-
isoBandNextYBL[66] = isoBandNextYBL[104] = 0;
|
|
439
|
-
isoBandNextOBL[66] = isoBandNextOBL[104] = 1;
|
|
440
|
-
isoBandNextXLT[66] = isoBandNextXLT[104] = 0;
|
|
441
|
-
isoBandNextYLT[66] = isoBandNextYLT[104] = -1;
|
|
442
|
-
isoBandNextOLT[66] = isoBandNextOLT[104] = 0;
|
|
443
|
-
isoBandNextXTL[66] = isoBandNextXTL[104] = 0;
|
|
444
|
-
isoBandNextYTL[66] = isoBandNextYTL[104] = -1;
|
|
445
|
-
isoBandNextOTL[66] = isoBandNextOTL[104] = 1;
|
|
446
|
-
isoBandNextXRT[144] = isoBandNextXRT[26] = -1;
|
|
447
|
-
isoBandNextYRT[144] = isoBandNextYRT[26] = 0;
|
|
448
|
-
isoBandNextORT[144] = isoBandNextORT[26] = 0;
|
|
449
|
-
isoBandNextXLB[144] = isoBandNextXLB[26] = 1;
|
|
450
|
-
isoBandNextYLB[144] = isoBandNextYLB[26] = 0;
|
|
451
|
-
isoBandNextOLB[144] = isoBandNextOLB[26] = 1;
|
|
452
|
-
isoBandNextXLT[144] = isoBandNextXLT[26] = 0;
|
|
453
|
-
isoBandNextYLT[144] = isoBandNextYLT[26] = 1;
|
|
454
|
-
isoBandNextOLT[144] = isoBandNextOLT[26] = 1;
|
|
455
|
-
isoBandNextXTR[144] = isoBandNextXTR[26] = -1;
|
|
456
|
-
isoBandNextYTR[144] = isoBandNextYTR[26] = 0;
|
|
457
|
-
isoBandNextOTR[144] = isoBandNextOTR[26] = 1;
|
|
458
|
-
isoBandNextXRB[36] = isoBandNextXRB[134] = 0;
|
|
459
|
-
isoBandNextYRB[36] = isoBandNextYRB[134] = 1;
|
|
460
|
-
isoBandNextORB[36] = isoBandNextORB[134] = 1;
|
|
461
|
-
isoBandNextXBR[36] = isoBandNextXBR[134] = 0;
|
|
462
|
-
isoBandNextYBR[36] = isoBandNextYBR[134] = 1;
|
|
463
|
-
isoBandNextOBR[36] = isoBandNextOBR[134] = 0;
|
|
464
|
-
isoBandNextXTL[36] = isoBandNextXTL[134] = 0;
|
|
465
|
-
isoBandNextYTL[36] = isoBandNextYTL[134] = -1;
|
|
466
|
-
isoBandNextOTL[36] = isoBandNextOTL[134] = 1;
|
|
467
|
-
isoBandNextXTR[36] = isoBandNextXTR[134] = 1;
|
|
468
|
-
isoBandNextYTR[36] = isoBandNextYTR[134] = 0;
|
|
469
|
-
isoBandNextOTR[36] = isoBandNextOTR[134] = 0;
|
|
470
|
-
isoBandNextXRT[9] = isoBandNextXRT[161] = -1;
|
|
471
|
-
isoBandNextYRT[9] = isoBandNextYRT[161] = 0;
|
|
472
|
-
isoBandNextORT[9] = isoBandNextORT[161] = 0;
|
|
473
|
-
isoBandNextXRB[9] = isoBandNextXRB[161] = 0;
|
|
474
|
-
isoBandNextYRB[9] = isoBandNextYRB[161] = -1;
|
|
475
|
-
isoBandNextORB[9] = isoBandNextORB[161] = 0;
|
|
476
|
-
isoBandNextXBL[9] = isoBandNextXBL[161] = 1;
|
|
477
|
-
isoBandNextYBL[9] = isoBandNextYBL[161] = 0;
|
|
478
|
-
isoBandNextOBL[9] = isoBandNextOBL[161] = 0;
|
|
479
|
-
isoBandNextXLB[9] = isoBandNextXLB[161] = 1;
|
|
480
|
-
isoBandNextYLB[9] = isoBandNextYLB[161] = 0;
|
|
481
|
-
isoBandNextOLB[9] = isoBandNextOLB[161] = 1;
|
|
482
|
-
isoBandNextXRT[136] = 0;
|
|
483
|
-
isoBandNextYRT[136] = 1;
|
|
484
|
-
isoBandNextORT[136] = 1;
|
|
485
|
-
isoBandNextXRB[136] = 0;
|
|
486
|
-
isoBandNextYRB[136] = 1;
|
|
487
|
-
isoBandNextORB[136] = 0;
|
|
488
|
-
isoBandNextXBR[136] = -1;
|
|
489
|
-
isoBandNextYBR[136] = 0;
|
|
490
|
-
isoBandNextOBR[136] = 1;
|
|
491
|
-
isoBandNextXBL[136] = -1;
|
|
492
|
-
isoBandNextYBL[136] = 0;
|
|
493
|
-
isoBandNextOBL[136] = 0;
|
|
494
|
-
isoBandNextXLB[136] = 0;
|
|
495
|
-
isoBandNextYLB[136] = -1;
|
|
496
|
-
isoBandNextOLB[136] = 0;
|
|
497
|
-
isoBandNextXLT[136] = 0;
|
|
498
|
-
isoBandNextYLT[136] = -1;
|
|
499
|
-
isoBandNextOLT[136] = 1;
|
|
500
|
-
isoBandNextXTL[136] = 1;
|
|
501
|
-
isoBandNextYTL[136] = 0;
|
|
502
|
-
isoBandNextOTL[136] = 0;
|
|
503
|
-
isoBandNextXTR[136] = 1;
|
|
504
|
-
isoBandNextYTR[136] = 0;
|
|
505
|
-
isoBandNextOTR[136] = 1;
|
|
506
|
-
isoBandNextXRT[34] = 0;
|
|
507
|
-
isoBandNextYRT[34] = -1;
|
|
508
|
-
isoBandNextORT[34] = 0;
|
|
509
|
-
isoBandNextXRB[34] = 0;
|
|
510
|
-
isoBandNextYRB[34] = -1;
|
|
511
|
-
isoBandNextORB[34] = 1;
|
|
512
|
-
isoBandNextXBR[34] = 1;
|
|
513
|
-
isoBandNextYBR[34] = 0;
|
|
514
|
-
isoBandNextOBR[34] = 0;
|
|
515
|
-
isoBandNextXBL[34] = 1;
|
|
516
|
-
isoBandNextYBL[34] = 0;
|
|
517
|
-
isoBandNextOBL[34] = 1;
|
|
518
|
-
isoBandNextXLB[34] = 0;
|
|
519
|
-
isoBandNextYLB[34] = 1;
|
|
520
|
-
isoBandNextOLB[34] = 1;
|
|
521
|
-
isoBandNextXLT[34] = 0;
|
|
522
|
-
isoBandNextYLT[34] = 1;
|
|
523
|
-
isoBandNextOLT[34] = 0;
|
|
524
|
-
isoBandNextXTL[34] = -1;
|
|
525
|
-
isoBandNextYTL[34] = 0;
|
|
526
|
-
isoBandNextOTL[34] = 1;
|
|
527
|
-
isoBandNextXTR[34] = -1;
|
|
528
|
-
isoBandNextYTR[34] = 0;
|
|
529
|
-
isoBandNextOTR[34] = 0;
|
|
530
|
-
isoBandNextXRT[35] = 0;
|
|
531
|
-
isoBandNextYRT[35] = 1;
|
|
532
|
-
isoBandNextORT[35] = 1;
|
|
533
|
-
isoBandNextXRB[35] = 0;
|
|
534
|
-
isoBandNextYRB[35] = -1;
|
|
535
|
-
isoBandNextORB[35] = 1;
|
|
536
|
-
isoBandNextXBR[35] = 1;
|
|
537
|
-
isoBandNextYBR[35] = 0;
|
|
538
|
-
isoBandNextOBR[35] = 0;
|
|
539
|
-
isoBandNextXBL[35] = -1;
|
|
540
|
-
isoBandNextYBL[35] = 0;
|
|
541
|
-
isoBandNextOBL[35] = 0;
|
|
542
|
-
isoBandNextXLB[35] = 0;
|
|
543
|
-
isoBandNextYLB[35] = -1;
|
|
544
|
-
isoBandNextOLB[35] = 0;
|
|
545
|
-
isoBandNextXLT[35] = 0;
|
|
546
|
-
isoBandNextYLT[35] = 1;
|
|
547
|
-
isoBandNextOLT[35] = 0;
|
|
548
|
-
isoBandNextXTL[35] = -1;
|
|
549
|
-
isoBandNextYTL[35] = 0;
|
|
550
|
-
isoBandNextOTL[35] = 1;
|
|
551
|
-
isoBandNextXTR[35] = 1;
|
|
552
|
-
isoBandNextYTR[35] = 0;
|
|
553
|
-
isoBandNextOTR[35] = 1;
|
|
554
|
-
isoBandNextXRT[153] = 0;
|
|
555
|
-
isoBandNextYRT[153] = 1;
|
|
556
|
-
isoBandNextORT[153] = 1;
|
|
557
|
-
isoBandNextXBL[153] = -1;
|
|
558
|
-
isoBandNextYBL[153] = 0;
|
|
559
|
-
isoBandNextOBL[153] = 0;
|
|
560
|
-
isoBandNextXLB[153] = 0;
|
|
561
|
-
isoBandNextYLB[153] = -1;
|
|
562
|
-
isoBandNextOLB[153] = 0;
|
|
563
|
-
isoBandNextXTR[153] = 1;
|
|
564
|
-
isoBandNextYTR[153] = 0;
|
|
565
|
-
isoBandNextOTR[153] = 1;
|
|
566
|
-
isoBandNextXRB[102] = 0;
|
|
567
|
-
isoBandNextYRB[102] = -1;
|
|
568
|
-
isoBandNextORB[102] = 1;
|
|
569
|
-
isoBandNextXBR[102] = 1;
|
|
570
|
-
isoBandNextYBR[102] = 0;
|
|
571
|
-
isoBandNextOBR[102] = 0;
|
|
572
|
-
isoBandNextXLT[102] = 0;
|
|
573
|
-
isoBandNextYLT[102] = 1;
|
|
574
|
-
isoBandNextOLT[102] = 0;
|
|
575
|
-
isoBandNextXTL[102] = -1;
|
|
576
|
-
isoBandNextYTL[102] = 0;
|
|
577
|
-
isoBandNextOTL[102] = 1;
|
|
578
|
-
isoBandNextXRT[155] = 0;
|
|
579
|
-
isoBandNextYRT[155] = -1;
|
|
580
|
-
isoBandNextORT[155] = 0;
|
|
581
|
-
isoBandNextXBL[155] = 1;
|
|
582
|
-
isoBandNextYBL[155] = 0;
|
|
583
|
-
isoBandNextOBL[155] = 1;
|
|
584
|
-
isoBandNextXLB[155] = 0;
|
|
585
|
-
isoBandNextYLB[155] = 1;
|
|
586
|
-
isoBandNextOLB[155] = 1;
|
|
587
|
-
isoBandNextXTR[155] = -1;
|
|
588
|
-
isoBandNextYTR[155] = 0;
|
|
589
|
-
isoBandNextOTR[155] = 0;
|
|
590
|
-
isoBandNextXRB[103] = 0;
|
|
591
|
-
isoBandNextYRB[103] = 1;
|
|
592
|
-
isoBandNextORB[103] = 0;
|
|
593
|
-
isoBandNextXBR[103] = -1;
|
|
594
|
-
isoBandNextYBR[103] = 0;
|
|
595
|
-
isoBandNextOBR[103] = 1;
|
|
596
|
-
isoBandNextXLT[103] = 0;
|
|
597
|
-
isoBandNextYLT[103] = -1;
|
|
598
|
-
isoBandNextOLT[103] = 1;
|
|
599
|
-
isoBandNextXTL[103] = 1;
|
|
600
|
-
isoBandNextYTL[103] = 0;
|
|
601
|
-
isoBandNextOTL[103] = 0;
|
|
602
|
-
isoBandNextXRT[152] = 0;
|
|
603
|
-
isoBandNextYRT[152] = 1;
|
|
604
|
-
isoBandNextORT[152] = 1;
|
|
605
|
-
isoBandNextXBR[152] = -1;
|
|
606
|
-
isoBandNextYBR[152] = 0;
|
|
607
|
-
isoBandNextOBR[152] = 1;
|
|
608
|
-
isoBandNextXBL[152] = -1;
|
|
609
|
-
isoBandNextYBL[152] = 0;
|
|
610
|
-
isoBandNextOBL[152] = 0;
|
|
611
|
-
isoBandNextXLB[152] = 0;
|
|
612
|
-
isoBandNextYLB[152] = -1;
|
|
613
|
-
isoBandNextOLB[152] = 0;
|
|
614
|
-
isoBandNextXLT[152] = 0;
|
|
615
|
-
isoBandNextYLT[152] = -1;
|
|
616
|
-
isoBandNextOLT[152] = 1;
|
|
617
|
-
isoBandNextXTR[152] = 1;
|
|
618
|
-
isoBandNextYTR[152] = 0;
|
|
619
|
-
isoBandNextOTR[152] = 1;
|
|
620
|
-
isoBandNextXRT[156] = 0;
|
|
621
|
-
isoBandNextYRT[156] = -1;
|
|
622
|
-
isoBandNextORT[156] = 1;
|
|
623
|
-
isoBandNextXBR[156] = 1;
|
|
624
|
-
isoBandNextYBR[156] = 0;
|
|
625
|
-
isoBandNextOBR[156] = 1;
|
|
626
|
-
isoBandNextXBL[156] = -1;
|
|
627
|
-
isoBandNextYBL[156] = 0;
|
|
628
|
-
isoBandNextOBL[156] = 0;
|
|
629
|
-
isoBandNextXLB[156] = 0;
|
|
630
|
-
isoBandNextYLB[156] = -1;
|
|
631
|
-
isoBandNextOLB[156] = 0;
|
|
632
|
-
isoBandNextXLT[156] = 0;
|
|
633
|
-
isoBandNextYLT[156] = 1;
|
|
634
|
-
isoBandNextOLT[156] = 1;
|
|
635
|
-
isoBandNextXTR[156] = -1;
|
|
636
|
-
isoBandNextYTR[156] = 0;
|
|
637
|
-
isoBandNextOTR[156] = 1;
|
|
638
|
-
isoBandNextXRT[137] = 0;
|
|
639
|
-
isoBandNextYRT[137] = 1;
|
|
640
|
-
isoBandNextORT[137] = 1;
|
|
641
|
-
isoBandNextXRB[137] = 0;
|
|
642
|
-
isoBandNextYRB[137] = 1;
|
|
643
|
-
isoBandNextORB[137] = 0;
|
|
644
|
-
isoBandNextXBL[137] = -1;
|
|
645
|
-
isoBandNextYBL[137] = 0;
|
|
646
|
-
isoBandNextOBL[137] = 0;
|
|
647
|
-
isoBandNextXLB[137] = 0;
|
|
648
|
-
isoBandNextYLB[137] = -1;
|
|
649
|
-
isoBandNextOLB[137] = 0;
|
|
650
|
-
isoBandNextXTL[137] = 1;
|
|
651
|
-
isoBandNextYTL[137] = 0;
|
|
652
|
-
isoBandNextOTL[137] = 0;
|
|
653
|
-
isoBandNextXTR[137] = 1;
|
|
654
|
-
isoBandNextYTR[137] = 0;
|
|
655
|
-
isoBandNextOTR[137] = 1;
|
|
656
|
-
isoBandNextXRT[139] = 0;
|
|
657
|
-
isoBandNextYRT[139] = 1;
|
|
658
|
-
isoBandNextORT[139] = 1;
|
|
659
|
-
isoBandNextXRB[139] = 0;
|
|
660
|
-
isoBandNextYRB[139] = -1;
|
|
661
|
-
isoBandNextORB[139] = 0;
|
|
662
|
-
isoBandNextXBL[139] = 1;
|
|
663
|
-
isoBandNextYBL[139] = 0;
|
|
664
|
-
isoBandNextOBL[139] = 0;
|
|
665
|
-
isoBandNextXLB[139] = 0;
|
|
666
|
-
isoBandNextYLB[139] = 1;
|
|
667
|
-
isoBandNextOLB[139] = 0;
|
|
668
|
-
isoBandNextXTL[139] = -1;
|
|
669
|
-
isoBandNextYTL[139] = 0;
|
|
670
|
-
isoBandNextOTL[139] = 0;
|
|
671
|
-
isoBandNextXTR[139] = 1;
|
|
672
|
-
isoBandNextYTR[139] = 0;
|
|
673
|
-
isoBandNextOTR[139] = 1;
|
|
674
|
-
isoBandNextXRT[98] = 0;
|
|
675
|
-
isoBandNextYRT[98] = -1;
|
|
676
|
-
isoBandNextORT[98] = 0;
|
|
677
|
-
isoBandNextXRB[98] = 0;
|
|
678
|
-
isoBandNextYRB[98] = -1;
|
|
679
|
-
isoBandNextORB[98] = 1;
|
|
680
|
-
isoBandNextXBR[98] = 1;
|
|
681
|
-
isoBandNextYBR[98] = 0;
|
|
682
|
-
isoBandNextOBR[98] = 0;
|
|
683
|
-
isoBandNextXBL[98] = 1;
|
|
684
|
-
isoBandNextYBL[98] = 0;
|
|
685
|
-
isoBandNextOBL[98] = 1;
|
|
686
|
-
isoBandNextXLT[98] = 0;
|
|
687
|
-
isoBandNextYLT[98] = 1;
|
|
688
|
-
isoBandNextOLT[98] = 0;
|
|
689
|
-
isoBandNextXTL[98] = -1;
|
|
690
|
-
isoBandNextYTL[98] = 0;
|
|
691
|
-
isoBandNextOTL[98] = 1;
|
|
692
|
-
isoBandNextXRT[99] = 0;
|
|
693
|
-
isoBandNextYRT[99] = 1;
|
|
694
|
-
isoBandNextORT[99] = 0;
|
|
695
|
-
isoBandNextXRB[99] = 0;
|
|
696
|
-
isoBandNextYRB[99] = -1;
|
|
697
|
-
isoBandNextORB[99] = 1;
|
|
698
|
-
isoBandNextXBR[99] = 1;
|
|
699
|
-
isoBandNextYBR[99] = 0;
|
|
700
|
-
isoBandNextOBR[99] = 0;
|
|
701
|
-
isoBandNextXBL[99] = -1;
|
|
702
|
-
isoBandNextYBL[99] = 0;
|
|
703
|
-
isoBandNextOBL[99] = 1;
|
|
704
|
-
isoBandNextXLT[99] = 0;
|
|
705
|
-
isoBandNextYLT[99] = -1;
|
|
706
|
-
isoBandNextOLT[99] = 0;
|
|
707
|
-
isoBandNextXTL[99] = 1;
|
|
708
|
-
isoBandNextYTL[99] = 0;
|
|
709
|
-
isoBandNextOTL[99] = 1;
|
|
710
|
-
isoBandNextXRB[38] = 0;
|
|
711
|
-
isoBandNextYRB[38] = -1;
|
|
712
|
-
isoBandNextORB[38] = 1;
|
|
713
|
-
isoBandNextXBR[38] = 1;
|
|
714
|
-
isoBandNextYBR[38] = 0;
|
|
715
|
-
isoBandNextOBR[38] = 0;
|
|
716
|
-
isoBandNextXLB[38] = 0;
|
|
717
|
-
isoBandNextYLB[38] = 1;
|
|
718
|
-
isoBandNextOLB[38] = 1;
|
|
719
|
-
isoBandNextXLT[38] = 0;
|
|
720
|
-
isoBandNextYLT[38] = 1;
|
|
721
|
-
isoBandNextOLT[38] = 0;
|
|
722
|
-
isoBandNextXTL[38] = -1;
|
|
723
|
-
isoBandNextYTL[38] = 0;
|
|
724
|
-
isoBandNextOTL[38] = 1;
|
|
725
|
-
isoBandNextXTR[38] = -1;
|
|
726
|
-
isoBandNextYTR[38] = 0;
|
|
727
|
-
isoBandNextOTR[38] = 0;
|
|
728
|
-
isoBandNextXRB[39] = 0;
|
|
729
|
-
isoBandNextYRB[39] = 1;
|
|
730
|
-
isoBandNextORB[39] = 1;
|
|
731
|
-
isoBandNextXBR[39] = -1;
|
|
732
|
-
isoBandNextYBR[39] = 0;
|
|
733
|
-
isoBandNextOBR[39] = 0;
|
|
734
|
-
isoBandNextXLB[39] = 0;
|
|
735
|
-
isoBandNextYLB[39] = -1;
|
|
736
|
-
isoBandNextOLB[39] = 1;
|
|
737
|
-
isoBandNextXLT[39] = 0;
|
|
738
|
-
isoBandNextYLT[39] = 1;
|
|
739
|
-
isoBandNextOLT[39] = 0;
|
|
740
|
-
isoBandNextXTL[39] = -1;
|
|
741
|
-
isoBandNextYTL[39] = 0;
|
|
742
|
-
isoBandNextOTL[39] = 1;
|
|
743
|
-
isoBandNextXTR[39] = 1;
|
|
744
|
-
isoBandNextYTR[39] = 0;
|
|
745
|
-
isoBandNextOTR[39] = 0;
|
|
746
|
-
var p00 = function(cell) {
|
|
747
|
-
return [
|
|
748
|
-
[cell.bottomleft, 0],
|
|
749
|
-
[0, 0],
|
|
750
|
-
[0, cell.leftbottom]
|
|
751
|
-
];
|
|
752
|
-
};
|
|
753
|
-
var p01 = function(cell) {
|
|
754
|
-
return [
|
|
755
|
-
[1, cell.rightbottom],
|
|
756
|
-
[1, 0],
|
|
757
|
-
[cell.bottomright, 0]
|
|
758
|
-
];
|
|
759
|
-
};
|
|
760
|
-
var p02 = function(cell) {
|
|
761
|
-
return [
|
|
762
|
-
[cell.topright, 1],
|
|
763
|
-
[1, 1],
|
|
764
|
-
[1, cell.righttop]
|
|
765
|
-
];
|
|
766
|
-
};
|
|
767
|
-
var p03 = function(cell) {
|
|
768
|
-
return [
|
|
769
|
-
[0, cell.lefttop],
|
|
770
|
-
[0, 1],
|
|
771
|
-
[cell.topleft, 1]
|
|
772
|
-
];
|
|
773
|
-
};
|
|
774
|
-
var p04 = function(cell) {
|
|
775
|
-
return [
|
|
776
|
-
[cell.bottomright, 0],
|
|
777
|
-
[cell.bottomleft, 0],
|
|
778
|
-
[0, cell.leftbottom],
|
|
779
|
-
[0, cell.lefttop]
|
|
780
|
-
];
|
|
781
|
-
};
|
|
782
|
-
var p05 = function(cell) {
|
|
783
|
-
return [
|
|
784
|
-
[cell.bottomright, 0],
|
|
785
|
-
[cell.bottomleft, 0],
|
|
786
|
-
[1, cell.righttop],
|
|
787
|
-
[1, cell.rightbottom]
|
|
788
|
-
];
|
|
789
|
-
};
|
|
790
|
-
var p06 = function(cell) {
|
|
791
|
-
return [
|
|
792
|
-
[1, cell.righttop],
|
|
793
|
-
[1, cell.rightbottom],
|
|
794
|
-
[cell.topleft, 1],
|
|
795
|
-
[cell.topright, 1]
|
|
796
|
-
];
|
|
797
|
-
};
|
|
798
|
-
var p07 = function(cell) {
|
|
799
|
-
return [
|
|
800
|
-
[0, cell.leftbottom],
|
|
801
|
-
[0, cell.lefttop],
|
|
802
|
-
[cell.topleft, 1],
|
|
803
|
-
[cell.topright, 1]
|
|
804
|
-
];
|
|
805
|
-
};
|
|
806
|
-
var p08 = function(cell) {
|
|
807
|
-
return [
|
|
808
|
-
[0, 0],
|
|
809
|
-
[0, cell.leftbottom],
|
|
810
|
-
[1, cell.rightbottom],
|
|
811
|
-
[1, 0]
|
|
812
|
-
];
|
|
813
|
-
};
|
|
814
|
-
var p09 = function(cell) {
|
|
815
|
-
return [
|
|
816
|
-
[1, 0],
|
|
817
|
-
[cell.bottomright, 0],
|
|
818
|
-
[cell.topright, 1],
|
|
819
|
-
[1, 1]
|
|
820
|
-
];
|
|
821
|
-
};
|
|
822
|
-
var p10 = function(cell) {
|
|
823
|
-
return [
|
|
824
|
-
[1, 1],
|
|
825
|
-
[1, cell.righttop],
|
|
826
|
-
[0, cell.lefttop],
|
|
827
|
-
[0, 1]
|
|
828
|
-
];
|
|
829
|
-
};
|
|
830
|
-
var p11 = function(cell) {
|
|
831
|
-
return [
|
|
832
|
-
[cell.bottomleft, 0],
|
|
833
|
-
[0, 0],
|
|
834
|
-
[0, 1],
|
|
835
|
-
[cell.topleft, 1]
|
|
836
|
-
];
|
|
837
|
-
};
|
|
838
|
-
var p12 = function(cell) {
|
|
839
|
-
return [
|
|
840
|
-
[1, cell.righttop],
|
|
841
|
-
[1, cell.rightbottom],
|
|
842
|
-
[0, cell.leftbottom],
|
|
843
|
-
[0, cell.lefttop]
|
|
844
|
-
];
|
|
845
|
-
};
|
|
846
|
-
var p13 = function(cell) {
|
|
847
|
-
return [
|
|
848
|
-
[cell.topleft, 1],
|
|
849
|
-
[cell.topright, 1],
|
|
850
|
-
[cell.bottomright, 0],
|
|
851
|
-
[cell.bottomleft, 0]
|
|
852
|
-
];
|
|
853
|
-
};
|
|
854
|
-
var p14 = function() {
|
|
855
|
-
return [
|
|
856
|
-
[0, 0],
|
|
857
|
-
[0, 1],
|
|
858
|
-
[1, 1],
|
|
859
|
-
[1, 0]
|
|
860
|
-
];
|
|
861
|
-
};
|
|
862
|
-
var p15 = function(cell) {
|
|
863
|
-
return [
|
|
864
|
-
[1, cell.rightbottom],
|
|
865
|
-
[1, 0],
|
|
866
|
-
[0, 0],
|
|
867
|
-
[0, 1],
|
|
868
|
-
[cell.topleft, 1]
|
|
869
|
-
];
|
|
870
|
-
};
|
|
871
|
-
var p16 = function(cell) {
|
|
872
|
-
return [
|
|
873
|
-
[cell.topright, 1],
|
|
874
|
-
[1, 1],
|
|
875
|
-
[1, 0],
|
|
876
|
-
[0, 0],
|
|
877
|
-
[0, cell.leftbottom]
|
|
878
|
-
];
|
|
879
|
-
};
|
|
880
|
-
var p17 = function(cell) {
|
|
881
|
-
return [
|
|
882
|
-
[1, 0],
|
|
883
|
-
[cell.bottomright, 0],
|
|
884
|
-
[0, cell.lefttop],
|
|
885
|
-
[0, 1],
|
|
886
|
-
[1, 1]
|
|
887
|
-
];
|
|
888
|
-
};
|
|
889
|
-
var p18 = function(cell) {
|
|
890
|
-
return [
|
|
891
|
-
[1, 1],
|
|
892
|
-
[1, cell.righttop],
|
|
893
|
-
[cell.bottomleft, 0],
|
|
894
|
-
[0, 0],
|
|
895
|
-
[0, 1]
|
|
896
|
-
];
|
|
897
|
-
};
|
|
898
|
-
var p19 = function(cell) {
|
|
899
|
-
return [
|
|
900
|
-
[1, cell.righttop],
|
|
901
|
-
[1, cell.rightbottom],
|
|
902
|
-
[0, cell.lefttop],
|
|
903
|
-
[0, 1],
|
|
904
|
-
[cell.topleft, 1]
|
|
905
|
-
];
|
|
906
|
-
};
|
|
907
|
-
var p20 = function(cell) {
|
|
908
|
-
return [
|
|
909
|
-
[1, 1],
|
|
910
|
-
[1, cell.righttop],
|
|
911
|
-
[cell.bottomright, 0],
|
|
912
|
-
[cell.bottomleft, 0],
|
|
913
|
-
[cell.topright, 1]
|
|
914
|
-
];
|
|
915
|
-
};
|
|
916
|
-
var p21 = function(cell) {
|
|
917
|
-
return [
|
|
918
|
-
[1, cell.rightbottom],
|
|
919
|
-
[1, 0],
|
|
920
|
-
[cell.bottomright, 0],
|
|
921
|
-
[0, cell.leftbottom],
|
|
922
|
-
[0, cell.lefttop]
|
|
923
|
-
];
|
|
924
|
-
};
|
|
925
|
-
var p22 = function(cell) {
|
|
926
|
-
return [
|
|
927
|
-
[cell.topright, 1],
|
|
928
|
-
[cell.bottomleft, 0],
|
|
929
|
-
[0, 0],
|
|
930
|
-
[0, cell.leftbottom],
|
|
931
|
-
[cell.topleft, 1]
|
|
932
|
-
];
|
|
933
|
-
};
|
|
934
|
-
var p23 = function(cell) {
|
|
935
|
-
return [
|
|
936
|
-
[cell.bottomright, 0],
|
|
937
|
-
[cell.bottomleft, 0],
|
|
938
|
-
[0, cell.lefttop],
|
|
939
|
-
[0, 1],
|
|
940
|
-
[cell.topleft, 1]
|
|
941
|
-
];
|
|
942
|
-
};
|
|
943
|
-
var p24 = function(cell) {
|
|
944
|
-
return [
|
|
945
|
-
[1, 1],
|
|
946
|
-
[1, cell.righttop],
|
|
947
|
-
[0, cell.leftbottom],
|
|
948
|
-
[0, cell.lefttop],
|
|
949
|
-
[cell.topright, 1]
|
|
950
|
-
];
|
|
951
|
-
};
|
|
952
|
-
var p25 = function(cell) {
|
|
953
|
-
return [
|
|
954
|
-
[1, cell.rightbottom],
|
|
955
|
-
[1, 0],
|
|
956
|
-
[cell.bottomright, 0],
|
|
957
|
-
[cell.topleft, 1],
|
|
958
|
-
[cell.topright, 1]
|
|
959
|
-
];
|
|
960
|
-
};
|
|
961
|
-
var p26 = function(cell) {
|
|
962
|
-
return [
|
|
963
|
-
[1, cell.righttop],
|
|
964
|
-
[1, cell.rightbottom],
|
|
965
|
-
[cell.bottomleft, 0],
|
|
966
|
-
[0, 0],
|
|
967
|
-
[0, cell.leftbottom]
|
|
968
|
-
];
|
|
969
|
-
};
|
|
970
|
-
var p27 = function(cell) {
|
|
971
|
-
return [
|
|
972
|
-
[1, cell.rightbottom],
|
|
973
|
-
[1, 0],
|
|
974
|
-
[0, 0],
|
|
975
|
-
[0, cell.leftbottom],
|
|
976
|
-
[cell.topleft, 1],
|
|
977
|
-
[cell.topright, 1]
|
|
978
|
-
];
|
|
979
|
-
};
|
|
980
|
-
var p28 = function(cell) {
|
|
981
|
-
return [
|
|
982
|
-
[1, 1],
|
|
983
|
-
[1, 0],
|
|
984
|
-
[cell.bottomright, 0],
|
|
985
|
-
[0, cell.leftbottom],
|
|
986
|
-
[0, cell.lefttop],
|
|
987
|
-
[cell.topright, 1]
|
|
988
|
-
];
|
|
989
|
-
};
|
|
990
|
-
var p29 = function(cell) {
|
|
991
|
-
return [
|
|
992
|
-
[1, 1],
|
|
993
|
-
[1, cell.righttop],
|
|
994
|
-
[cell.bottomright, 0],
|
|
995
|
-
[cell.bottomleft, 0],
|
|
996
|
-
[0, cell.lefttop],
|
|
997
|
-
[0, 1]
|
|
998
|
-
];
|
|
999
|
-
};
|
|
1000
|
-
var p30 = function(cell) {
|
|
1001
|
-
return [
|
|
1002
|
-
[1, cell.righttop],
|
|
1003
|
-
[1, cell.rightbottom],
|
|
1004
|
-
[cell.bottomleft, 0],
|
|
1005
|
-
[0, 0],
|
|
1006
|
-
[0, 1],
|
|
1007
|
-
[cell.topleft, 1]
|
|
1008
|
-
];
|
|
1009
|
-
};
|
|
1010
|
-
var p31 = function(cell) {
|
|
1011
|
-
return [
|
|
1012
|
-
[1, 1],
|
|
1013
|
-
[1, cell.righttop],
|
|
1014
|
-
[cell.bottomleft, 0],
|
|
1015
|
-
[0, 0],
|
|
1016
|
-
[0, cell.leftbottom],
|
|
1017
|
-
[cell.topright, 1]
|
|
1018
|
-
];
|
|
1019
|
-
};
|
|
1020
|
-
var p32 = function(cell) {
|
|
1021
|
-
return [
|
|
1022
|
-
[1, cell.rightbottom],
|
|
1023
|
-
[1, 0],
|
|
1024
|
-
[cell.bottomright, 0],
|
|
1025
|
-
[0, cell.lefttop],
|
|
1026
|
-
[0, 1],
|
|
1027
|
-
[cell.topleft, 1]
|
|
1028
|
-
];
|
|
1029
|
-
};
|
|
1030
|
-
var p33 = function(cell) {
|
|
1031
|
-
return [
|
|
1032
|
-
[1, cell.righttop],
|
|
1033
|
-
[1, cell.rightbottom],
|
|
1034
|
-
[cell.bottomright, 0],
|
|
1035
|
-
[cell.bottomleft, 0],
|
|
1036
|
-
[0, cell.leftbottom],
|
|
1037
|
-
[0, cell.lefttop],
|
|
1038
|
-
[cell.topleft, 1],
|
|
1039
|
-
[cell.topright, 1]
|
|
1040
|
-
];
|
|
1041
|
-
};
|
|
1042
|
-
var p34 = function(cell) {
|
|
1043
|
-
return [
|
|
1044
|
-
[1, 1],
|
|
1045
|
-
[1, cell.righttop],
|
|
1046
|
-
[cell.bottomleft, 0],
|
|
1047
|
-
[0, 0],
|
|
1048
|
-
[0, cell.leftbottom],
|
|
1049
|
-
[cell.topright, 1]
|
|
1050
|
-
];
|
|
1051
|
-
};
|
|
1052
|
-
var p35 = function(cell) {
|
|
1053
|
-
return [
|
|
1054
|
-
[1, cell.rightbottom],
|
|
1055
|
-
[1, 0],
|
|
1056
|
-
[cell.bottomright, 0],
|
|
1057
|
-
[0, cell.lefttop],
|
|
1058
|
-
[0, 1],
|
|
1059
|
-
[cell.topleft, 1]
|
|
1060
|
-
];
|
|
1061
|
-
};
|
|
1062
|
-
var p36 = function(cell) {
|
|
1063
|
-
return [
|
|
1064
|
-
[1, 1],
|
|
1065
|
-
[1, cell.righttop],
|
|
1066
|
-
[cell.bottomright, 0],
|
|
1067
|
-
[cell.bottomleft, 0],
|
|
1068
|
-
[0, cell.leftbottom],
|
|
1069
|
-
[0, cell.lefttop],
|
|
1070
|
-
[cell.topright, 1]
|
|
1071
|
-
];
|
|
1072
|
-
};
|
|
1073
|
-
var p37 = function(cell) {
|
|
1074
|
-
return [
|
|
1075
|
-
[1, cell.righttop],
|
|
1076
|
-
[1, cell.rightbottom],
|
|
1077
|
-
[cell.bottomleft, 0],
|
|
1078
|
-
[0, 0],
|
|
1079
|
-
[0, cell.leftbottom],
|
|
1080
|
-
[cell.topleft, 1],
|
|
1081
|
-
[cell.topright, 1]
|
|
1082
|
-
];
|
|
1083
|
-
};
|
|
1084
|
-
var p38 = function(cell) {
|
|
1085
|
-
return [
|
|
1086
|
-
[1, cell.righttop],
|
|
1087
|
-
[1, cell.rightbottom],
|
|
1088
|
-
[cell.bottomright, 0],
|
|
1089
|
-
[cell.bottomleft, 0],
|
|
1090
|
-
[0, cell.lefttop],
|
|
1091
|
-
[0, 1],
|
|
1092
|
-
[cell.topleft, 1]
|
|
1093
|
-
];
|
|
1094
|
-
};
|
|
1095
|
-
var p39 = function(cell) {
|
|
1096
|
-
return [
|
|
1097
|
-
[1, cell.rightbottom],
|
|
1098
|
-
[1, 0],
|
|
1099
|
-
[cell.bottomright, 0],
|
|
1100
|
-
[0, cell.leftbottom],
|
|
1101
|
-
[0, cell.lefttop],
|
|
1102
|
-
[cell.topleft, 1],
|
|
1103
|
-
[cell.topright, 1]
|
|
1104
|
-
];
|
|
1105
|
-
};
|
|
1106
|
-
var isoBandEdgeRT = [];
|
|
1107
|
-
var isoBandEdgeRB = [];
|
|
1108
|
-
var isoBandEdgeBR = [];
|
|
1109
|
-
var isoBandEdgeBL = [];
|
|
1110
|
-
var isoBandEdgeLB = [];
|
|
1111
|
-
var isoBandEdgeLT = [];
|
|
1112
|
-
var isoBandEdgeTL = [];
|
|
1113
|
-
var isoBandEdgeTR = [];
|
|
1114
|
-
isoBandEdgeBL[1] = isoBandEdgeLB[1] = 18;
|
|
1115
|
-
isoBandEdgeBL[169] = isoBandEdgeLB[169] = 18;
|
|
1116
|
-
isoBandEdgeBR[4] = isoBandEdgeRB[4] = 12;
|
|
1117
|
-
isoBandEdgeBR[166] = isoBandEdgeRB[166] = 12;
|
|
1118
|
-
isoBandEdgeRT[16] = isoBandEdgeTR[16] = 4;
|
|
1119
|
-
isoBandEdgeRT[154] = isoBandEdgeTR[154] = 4;
|
|
1120
|
-
isoBandEdgeLT[64] = isoBandEdgeTL[64] = 22;
|
|
1121
|
-
isoBandEdgeLT[106] = isoBandEdgeTL[106] = 22;
|
|
1122
|
-
isoBandEdgeBR[2] = isoBandEdgeLT[2] = 17;
|
|
1123
|
-
isoBandEdgeBL[2] = isoBandEdgeLB[2] = 18;
|
|
1124
|
-
isoBandEdgeBR[168] = isoBandEdgeLT[168] = 17;
|
|
1125
|
-
isoBandEdgeBL[168] = isoBandEdgeLB[168] = 18;
|
|
1126
|
-
isoBandEdgeRT[8] = isoBandEdgeBL[8] = 9;
|
|
1127
|
-
isoBandEdgeRB[8] = isoBandEdgeBR[8] = 12;
|
|
1128
|
-
isoBandEdgeRT[162] = isoBandEdgeBL[162] = 9;
|
|
1129
|
-
isoBandEdgeRB[162] = isoBandEdgeBR[162] = 12;
|
|
1130
|
-
isoBandEdgeRT[32] = isoBandEdgeTR[32] = 4;
|
|
1131
|
-
isoBandEdgeRB[32] = isoBandEdgeTL[32] = 1;
|
|
1132
|
-
isoBandEdgeRT[138] = isoBandEdgeTR[138] = 4;
|
|
1133
|
-
isoBandEdgeRB[138] = isoBandEdgeTL[138] = 1;
|
|
1134
|
-
isoBandEdgeLB[128] = isoBandEdgeTR[128] = 21;
|
|
1135
|
-
isoBandEdgeLT[128] = isoBandEdgeTL[128] = 22;
|
|
1136
|
-
isoBandEdgeLB[42] = isoBandEdgeTR[42] = 21;
|
|
1137
|
-
isoBandEdgeLT[42] = isoBandEdgeTL[42] = 22;
|
|
1138
|
-
isoBandEdgeRB[5] = isoBandEdgeLB[5] = 14;
|
|
1139
|
-
isoBandEdgeRB[165] = isoBandEdgeLB[165] = 14;
|
|
1140
|
-
isoBandEdgeBR[20] = isoBandEdgeTR[20] = 6;
|
|
1141
|
-
isoBandEdgeBR[150] = isoBandEdgeTR[150] = 6;
|
|
1142
|
-
isoBandEdgeRT[80] = isoBandEdgeLT[80] = 11;
|
|
1143
|
-
isoBandEdgeRT[90] = isoBandEdgeLT[90] = 11;
|
|
1144
|
-
isoBandEdgeBL[65] = isoBandEdgeTL[65] = 3;
|
|
1145
|
-
isoBandEdgeBL[105] = isoBandEdgeTL[105] = 3;
|
|
1146
|
-
isoBandEdgeRT[160] = isoBandEdgeLT[160] = 11;
|
|
1147
|
-
isoBandEdgeRB[160] = isoBandEdgeLB[160] = 14;
|
|
1148
|
-
isoBandEdgeRT[10] = isoBandEdgeLT[10] = 11;
|
|
1149
|
-
isoBandEdgeRB[10] = isoBandEdgeLB[10] = 14;
|
|
1150
|
-
isoBandEdgeBR[130] = isoBandEdgeTR[130] = 6;
|
|
1151
|
-
isoBandEdgeBL[130] = isoBandEdgeTL[130] = 3;
|
|
1152
|
-
isoBandEdgeBR[40] = isoBandEdgeTR[40] = 6;
|
|
1153
|
-
isoBandEdgeBL[40] = isoBandEdgeTL[40] = 3;
|
|
1154
|
-
isoBandEdgeRB[101] = isoBandEdgeTL[101] = 1;
|
|
1155
|
-
isoBandEdgeRB[69] = isoBandEdgeTL[69] = 1;
|
|
1156
|
-
isoBandEdgeLB[149] = isoBandEdgeTR[149] = 21;
|
|
1157
|
-
isoBandEdgeLB[21] = isoBandEdgeTR[21] = 21;
|
|
1158
|
-
isoBandEdgeBR[86] = isoBandEdgeLT[86] = 17;
|
|
1159
|
-
isoBandEdgeBR[84] = isoBandEdgeLT[84] = 17;
|
|
1160
|
-
isoBandEdgeRT[89] = isoBandEdgeBL[89] = 9;
|
|
1161
|
-
isoBandEdgeRT[81] = isoBandEdgeBL[81] = 9;
|
|
1162
|
-
isoBandEdgeRT[96] = isoBandEdgeTL[96] = 0;
|
|
1163
|
-
isoBandEdgeRB[96] = isoBandEdgeLT[96] = 15;
|
|
1164
|
-
isoBandEdgeRT[74] = isoBandEdgeTL[74] = 0;
|
|
1165
|
-
isoBandEdgeRB[74] = isoBandEdgeLT[74] = 15;
|
|
1166
|
-
isoBandEdgeRT[24] = isoBandEdgeBR[24] = 8;
|
|
1167
|
-
isoBandEdgeBL[24] = isoBandEdgeTR[24] = 7;
|
|
1168
|
-
isoBandEdgeRT[146] = isoBandEdgeBR[146] = 8;
|
|
1169
|
-
isoBandEdgeBL[146] = isoBandEdgeTR[146] = 7;
|
|
1170
|
-
isoBandEdgeRB[6] = isoBandEdgeLT[6] = 15;
|
|
1171
|
-
isoBandEdgeBR[6] = isoBandEdgeLB[6] = 16;
|
|
1172
|
-
isoBandEdgeRB[164] = isoBandEdgeLT[164] = 15;
|
|
1173
|
-
isoBandEdgeBR[164] = isoBandEdgeLB[164] = 16;
|
|
1174
|
-
isoBandEdgeBL[129] = isoBandEdgeTR[129] = 7;
|
|
1175
|
-
isoBandEdgeLB[129] = isoBandEdgeTL[129] = 20;
|
|
1176
|
-
isoBandEdgeBL[41] = isoBandEdgeTR[41] = 7;
|
|
1177
|
-
isoBandEdgeLB[41] = isoBandEdgeTL[41] = 20;
|
|
1178
|
-
isoBandEdgeBR[66] = isoBandEdgeTL[66] = 2;
|
|
1179
|
-
isoBandEdgeBL[66] = isoBandEdgeLT[66] = 19;
|
|
1180
|
-
isoBandEdgeBR[104] = isoBandEdgeTL[104] = 2;
|
|
1181
|
-
isoBandEdgeBL[104] = isoBandEdgeLT[104] = 19;
|
|
1182
|
-
isoBandEdgeRT[144] = isoBandEdgeLB[144] = 10;
|
|
1183
|
-
isoBandEdgeLT[144] = isoBandEdgeTR[144] = 23;
|
|
1184
|
-
isoBandEdgeRT[26] = isoBandEdgeLB[26] = 10;
|
|
1185
|
-
isoBandEdgeLT[26] = isoBandEdgeTR[26] = 23;
|
|
1186
|
-
isoBandEdgeRB[36] = isoBandEdgeTR[36] = 5;
|
|
1187
|
-
isoBandEdgeBR[36] = isoBandEdgeTL[36] = 2;
|
|
1188
|
-
isoBandEdgeRB[134] = isoBandEdgeTR[134] = 5;
|
|
1189
|
-
isoBandEdgeBR[134] = isoBandEdgeTL[134] = 2;
|
|
1190
|
-
isoBandEdgeRT[9] = isoBandEdgeLB[9] = 10;
|
|
1191
|
-
isoBandEdgeRB[9] = isoBandEdgeBL[9] = 13;
|
|
1192
|
-
isoBandEdgeRT[161] = isoBandEdgeLB[161] = 10;
|
|
1193
|
-
isoBandEdgeRB[161] = isoBandEdgeBL[161] = 13;
|
|
1194
|
-
isoBandEdgeRB[37] = isoBandEdgeTR[37] = 5;
|
|
1195
|
-
isoBandEdgeLB[37] = isoBandEdgeTL[37] = 20;
|
|
1196
|
-
isoBandEdgeRB[133] = isoBandEdgeTR[133] = 5;
|
|
1197
|
-
isoBandEdgeLB[133] = isoBandEdgeTL[133] = 20;
|
|
1198
|
-
isoBandEdgeBR[148] = isoBandEdgeLB[148] = 16;
|
|
1199
|
-
isoBandEdgeLT[148] = isoBandEdgeTR[148] = 23;
|
|
1200
|
-
isoBandEdgeBR[22] = isoBandEdgeLB[22] = 16;
|
|
1201
|
-
isoBandEdgeLT[22] = isoBandEdgeTR[22] = 23;
|
|
1202
|
-
isoBandEdgeRT[82] = isoBandEdgeBR[82] = 8;
|
|
1203
|
-
isoBandEdgeBL[82] = isoBandEdgeLT[82] = 19;
|
|
1204
|
-
isoBandEdgeRT[88] = isoBandEdgeBR[88] = 8;
|
|
1205
|
-
isoBandEdgeBL[88] = isoBandEdgeLT[88] = 19;
|
|
1206
|
-
isoBandEdgeRT[73] = isoBandEdgeTL[73] = 0;
|
|
1207
|
-
isoBandEdgeRB[73] = isoBandEdgeBL[73] = 13;
|
|
1208
|
-
isoBandEdgeRT[97] = isoBandEdgeTL[97] = 0;
|
|
1209
|
-
isoBandEdgeRB[97] = isoBandEdgeBL[97] = 13;
|
|
1210
|
-
isoBandEdgeRT[145] = isoBandEdgeBL[145] = 9;
|
|
1211
|
-
isoBandEdgeLB[145] = isoBandEdgeTR[145] = 21;
|
|
1212
|
-
isoBandEdgeRT[25] = isoBandEdgeBL[25] = 9;
|
|
1213
|
-
isoBandEdgeLB[25] = isoBandEdgeTR[25] = 21;
|
|
1214
|
-
isoBandEdgeRB[70] = isoBandEdgeTL[70] = 1;
|
|
1215
|
-
isoBandEdgeBR[70] = isoBandEdgeLT[70] = 17;
|
|
1216
|
-
isoBandEdgeRB[100] = isoBandEdgeTL[100] = 1;
|
|
1217
|
-
isoBandEdgeBR[100] = isoBandEdgeLT[100] = 17;
|
|
1218
|
-
isoBandEdgeRT[34] = isoBandEdgeBL[34] = 9;
|
|
1219
|
-
isoBandEdgeRB[34] = isoBandEdgeBR[34] = 12;
|
|
1220
|
-
isoBandEdgeLB[34] = isoBandEdgeTR[34] = 21;
|
|
1221
|
-
isoBandEdgeLT[34] = isoBandEdgeTL[34] = 22;
|
|
1222
|
-
isoBandEdgeRT[136] = isoBandEdgeTR[136] = 4;
|
|
1223
|
-
isoBandEdgeRB[136] = isoBandEdgeTL[136] = 1;
|
|
1224
|
-
isoBandEdgeBR[136] = isoBandEdgeLT[136] = 17;
|
|
1225
|
-
isoBandEdgeBL[136] = isoBandEdgeLB[136] = 18;
|
|
1226
|
-
isoBandEdgeRT[35] = isoBandEdgeTR[35] = 4;
|
|
1227
|
-
isoBandEdgeRB[35] = isoBandEdgeBR[35] = 12;
|
|
1228
|
-
isoBandEdgeBL[35] = isoBandEdgeLB[35] = 18;
|
|
1229
|
-
isoBandEdgeLT[35] = isoBandEdgeTL[35] = 22;
|
|
1230
|
-
isoBandEdgeRT[153] = isoBandEdgeTR[153] = 4;
|
|
1231
|
-
isoBandEdgeBL[153] = isoBandEdgeLB[153] = 18;
|
|
1232
|
-
isoBandEdgeRB[102] = isoBandEdgeBR[102] = 12;
|
|
1233
|
-
isoBandEdgeLT[102] = isoBandEdgeTL[102] = 22;
|
|
1234
|
-
isoBandEdgeRT[155] = isoBandEdgeBL[155] = 9;
|
|
1235
|
-
isoBandEdgeLB[155] = isoBandEdgeTR[155] = 23;
|
|
1236
|
-
isoBandEdgeRB[103] = isoBandEdgeTL[103] = 1;
|
|
1237
|
-
isoBandEdgeBR[103] = isoBandEdgeLT[103] = 17;
|
|
1238
|
-
isoBandEdgeRT[152] = isoBandEdgeTR[152] = 4;
|
|
1239
|
-
isoBandEdgeBR[152] = isoBandEdgeLT[152] = 17;
|
|
1240
|
-
isoBandEdgeBL[152] = isoBandEdgeLB[152] = 18;
|
|
1241
|
-
isoBandEdgeRT[156] = isoBandEdgeBR[156] = 8;
|
|
1242
|
-
isoBandEdgeBL[156] = isoBandEdgeLB[156] = 18;
|
|
1243
|
-
isoBandEdgeLT[156] = isoBandEdgeTR[156] = 23;
|
|
1244
|
-
isoBandEdgeRT[137] = isoBandEdgeTR[137] = 4;
|
|
1245
|
-
isoBandEdgeRB[137] = isoBandEdgeTL[137] = 1;
|
|
1246
|
-
isoBandEdgeBL[137] = isoBandEdgeLB[137] = 18;
|
|
1247
|
-
isoBandEdgeRT[139] = isoBandEdgeTR[139] = 4;
|
|
1248
|
-
isoBandEdgeRB[139] = isoBandEdgeBL[139] = 13;
|
|
1249
|
-
isoBandEdgeLB[139] = isoBandEdgeTL[139] = 20;
|
|
1250
|
-
isoBandEdgeRT[98] = isoBandEdgeBL[98] = 9;
|
|
1251
|
-
isoBandEdgeRB[98] = isoBandEdgeBR[98] = 12;
|
|
1252
|
-
isoBandEdgeLT[98] = isoBandEdgeTL[98] = 22;
|
|
1253
|
-
isoBandEdgeRT[99] = isoBandEdgeTL[99] = 0;
|
|
1254
|
-
isoBandEdgeRB[99] = isoBandEdgeBR[99] = 12;
|
|
1255
|
-
isoBandEdgeBL[99] = isoBandEdgeLT[99] = 19;
|
|
1256
|
-
isoBandEdgeRB[38] = isoBandEdgeBR[38] = 12;
|
|
1257
|
-
isoBandEdgeLB[38] = isoBandEdgeTR[38] = 21;
|
|
1258
|
-
isoBandEdgeLT[38] = isoBandEdgeTL[38] = 22;
|
|
1259
|
-
isoBandEdgeRB[39] = isoBandEdgeTR[39] = 5;
|
|
1260
|
-
isoBandEdgeBR[39] = isoBandEdgeLB[39] = 16;
|
|
1261
|
-
isoBandEdgeLT[39] = isoBandEdgeTL[39] = 22;
|
|
1262
|
-
var polygon_table = [];
|
|
1263
|
-
polygon_table[1] = polygon_table[169] = p00;
|
|
1264
|
-
polygon_table[4] = polygon_table[166] = p01;
|
|
1265
|
-
polygon_table[16] = polygon_table[154] = p02;
|
|
1266
|
-
polygon_table[64] = polygon_table[106] = p03;
|
|
1267
|
-
polygon_table[168] = polygon_table[2] = p04;
|
|
1268
|
-
polygon_table[162] = polygon_table[8] = p05;
|
|
1269
|
-
polygon_table[138] = polygon_table[32] = p06;
|
|
1270
|
-
polygon_table[42] = polygon_table[128] = p07;
|
|
1271
|
-
polygon_table[5] = polygon_table[165] = p08;
|
|
1272
|
-
polygon_table[20] = polygon_table[150] = p09;
|
|
1273
|
-
polygon_table[80] = polygon_table[90] = p10;
|
|
1274
|
-
polygon_table[65] = polygon_table[105] = p11;
|
|
1275
|
-
polygon_table[160] = polygon_table[10] = p12;
|
|
1276
|
-
polygon_table[130] = polygon_table[40] = p13;
|
|
1277
|
-
polygon_table[85] = p14;
|
|
1278
|
-
polygon_table[101] = polygon_table[69] = p15;
|
|
1279
|
-
polygon_table[149] = polygon_table[21] = p16;
|
|
1280
|
-
polygon_table[86] = polygon_table[84] = p17;
|
|
1281
|
-
polygon_table[89] = polygon_table[81] = p18;
|
|
1282
|
-
polygon_table[96] = polygon_table[74] = p19;
|
|
1283
|
-
polygon_table[24] = polygon_table[146] = p20;
|
|
1284
|
-
polygon_table[6] = polygon_table[164] = p21;
|
|
1285
|
-
polygon_table[129] = polygon_table[41] = p22;
|
|
1286
|
-
polygon_table[66] = polygon_table[104] = p23;
|
|
1287
|
-
polygon_table[144] = polygon_table[26] = p24;
|
|
1288
|
-
polygon_table[36] = polygon_table[134] = p25;
|
|
1289
|
-
polygon_table[9] = polygon_table[161] = p26;
|
|
1290
|
-
polygon_table[37] = polygon_table[133] = p27;
|
|
1291
|
-
polygon_table[148] = polygon_table[22] = p28;
|
|
1292
|
-
polygon_table[82] = polygon_table[88] = p29;
|
|
1293
|
-
polygon_table[73] = polygon_table[97] = p30;
|
|
1294
|
-
polygon_table[145] = polygon_table[25] = p31;
|
|
1295
|
-
polygon_table[70] = polygon_table[100] = p32;
|
|
1296
|
-
polygon_table[34] = function(c) {
|
|
1297
|
-
return [p07(c), p05(c)];
|
|
1298
|
-
};
|
|
1299
|
-
polygon_table[35] = p33;
|
|
1300
|
-
polygon_table[136] = function(c) {
|
|
1301
|
-
return [p06(c), p04(c)];
|
|
1302
|
-
};
|
|
1303
|
-
polygon_table[153] = function(c) {
|
|
1304
|
-
return [p02(c), p00(c)];
|
|
1305
|
-
};
|
|
1306
|
-
polygon_table[102] = function(c) {
|
|
1307
|
-
return [p01(c), p03(c)];
|
|
1308
|
-
};
|
|
1309
|
-
polygon_table[155] = p34;
|
|
1310
|
-
polygon_table[103] = p35;
|
|
1311
|
-
polygon_table[152] = function(c) {
|
|
1312
|
-
return [p02(c), p04(c)];
|
|
1313
|
-
};
|
|
1314
|
-
polygon_table[156] = p36;
|
|
1315
|
-
polygon_table[137] = function(c) {
|
|
1316
|
-
return [p06(c), p00(c)];
|
|
1317
|
-
};
|
|
1318
|
-
polygon_table[139] = p37;
|
|
1319
|
-
polygon_table[98] = function(c) {
|
|
1320
|
-
return [p05(c), p03(c)];
|
|
1321
|
-
};
|
|
1322
|
-
polygon_table[99] = p38;
|
|
1323
|
-
polygon_table[38] = function(c) {
|
|
1324
|
-
return [p01(c), p07(c)];
|
|
1325
|
-
};
|
|
1326
|
-
polygon_table[39] = p39;
|
|
1327
|
-
function interpolateX(y, y0, y1) {
|
|
1328
|
-
return (y - y0) / (y1 - y0);
|
|
1329
|
-
}
|
|
1330
|
-
function isArray(myArray) {
|
|
1331
|
-
return myArray.constructor.toString().indexOf("Array") > -1;
|
|
1332
|
-
}
|
|
1333
|
-
function computeBandGrid(data, minV, bandwidth) {
|
|
1334
|
-
var rows = data.length - 1;
|
|
1335
|
-
var cols = data[0].length - 1;
|
|
1336
|
-
var BandGrid = { rows, cols, cells: [] };
|
|
1337
|
-
var maxV = minV + Math.abs(bandwidth);
|
|
1338
|
-
for (var j = 0; j < rows; ++j) {
|
|
1339
|
-
BandGrid.cells[j] = [];
|
|
1340
|
-
for (var i = 0; i < cols; ++i) {
|
|
1341
|
-
var cval = 0;
|
|
1342
|
-
var tl = data[j + 1][i];
|
|
1343
|
-
var tr = data[j + 1][i + 1];
|
|
1344
|
-
var br = data[j][i + 1];
|
|
1345
|
-
var bl = data[j][i];
|
|
1346
|
-
if (isNaN(tl) || isNaN(tr) || isNaN(br) || isNaN(bl)) {
|
|
1347
|
-
continue;
|
|
1348
|
-
}
|
|
1349
|
-
cval |= tl < minV ? 0 : tl > maxV ? 128 : 64;
|
|
1350
|
-
cval |= tr < minV ? 0 : tr > maxV ? 32 : 16;
|
|
1351
|
-
cval |= br < minV ? 0 : br > maxV ? 8 : 4;
|
|
1352
|
-
cval |= bl < minV ? 0 : bl > maxV ? 2 : 1;
|
|
1353
|
-
var cval_real = +cval;
|
|
1354
|
-
var flipped = 0;
|
|
1355
|
-
if (cval === 17 || cval === 18 || cval === 33 || cval === 34 || cval === 38 || cval === 68 || cval === 72 || cval === 98 || cval === 102 || cval === 132 || cval === 136 || cval === 137 || cval === 152 || cval === 153) {
|
|
1356
|
-
var average = (tl + tr + br + bl) / 4;
|
|
1357
|
-
flipped = average > maxV ? 2 : average < minV ? 0 : 1;
|
|
1358
|
-
if (cval === 34) {
|
|
1359
|
-
if (flipped === 1) {
|
|
1360
|
-
cval = 35;
|
|
1361
|
-
} else if (flipped === 0) {
|
|
1362
|
-
cval = 136;
|
|
1363
|
-
}
|
|
1364
|
-
} else if (cval === 136) {
|
|
1365
|
-
if (flipped === 1) {
|
|
1366
|
-
cval = 35;
|
|
1367
|
-
flipped = 4;
|
|
1368
|
-
} else if (flipped === 0) {
|
|
1369
|
-
cval = 34;
|
|
1370
|
-
}
|
|
1371
|
-
} else if (cval === 17) {
|
|
1372
|
-
if (flipped === 1) {
|
|
1373
|
-
cval = 155;
|
|
1374
|
-
flipped = 4;
|
|
1375
|
-
} else if (flipped === 0) {
|
|
1376
|
-
cval = 153;
|
|
1377
|
-
}
|
|
1378
|
-
} else if (cval === 68) {
|
|
1379
|
-
if (flipped === 1) {
|
|
1380
|
-
cval = 103;
|
|
1381
|
-
flipped = 4;
|
|
1382
|
-
} else if (flipped === 0) {
|
|
1383
|
-
cval = 102;
|
|
1384
|
-
}
|
|
1385
|
-
} else if (cval === 153) {
|
|
1386
|
-
if (flipped === 1)
|
|
1387
|
-
cval = 155;
|
|
1388
|
-
} else if (cval === 102) {
|
|
1389
|
-
if (flipped === 1)
|
|
1390
|
-
cval = 103;
|
|
1391
|
-
} else if (cval === 152) {
|
|
1392
|
-
if (flipped < 2) {
|
|
1393
|
-
cval = 156;
|
|
1394
|
-
flipped = 1;
|
|
1395
|
-
}
|
|
1396
|
-
} else if (cval === 137) {
|
|
1397
|
-
if (flipped < 2) {
|
|
1398
|
-
cval = 139;
|
|
1399
|
-
flipped = 1;
|
|
1400
|
-
}
|
|
1401
|
-
} else if (cval === 98) {
|
|
1402
|
-
if (flipped < 2) {
|
|
1403
|
-
cval = 99;
|
|
1404
|
-
flipped = 1;
|
|
1405
|
-
}
|
|
1406
|
-
} else if (cval === 38) {
|
|
1407
|
-
if (flipped < 2) {
|
|
1408
|
-
cval = 39;
|
|
1409
|
-
flipped = 1;
|
|
1410
|
-
}
|
|
1411
|
-
} else if (cval === 18) {
|
|
1412
|
-
if (flipped > 0) {
|
|
1413
|
-
cval = 156;
|
|
1414
|
-
flipped = 4;
|
|
1415
|
-
} else {
|
|
1416
|
-
cval = 152;
|
|
1417
|
-
}
|
|
1418
|
-
} else if (cval === 33) {
|
|
1419
|
-
if (flipped > 0) {
|
|
1420
|
-
cval = 139;
|
|
1421
|
-
flipped = 4;
|
|
1422
|
-
} else {
|
|
1423
|
-
cval = 137;
|
|
1424
|
-
}
|
|
1425
|
-
} else if (cval === 72) {
|
|
1426
|
-
if (flipped > 0) {
|
|
1427
|
-
cval = 99;
|
|
1428
|
-
flipped = 4;
|
|
1429
|
-
} else {
|
|
1430
|
-
cval = 98;
|
|
1431
|
-
}
|
|
1432
|
-
} else if (cval === 132) {
|
|
1433
|
-
if (flipped > 0) {
|
|
1434
|
-
cval = 39;
|
|
1435
|
-
flipped = 4;
|
|
1436
|
-
} else {
|
|
1437
|
-
cval = 38;
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
if (cval != 0 && cval != 170) {
|
|
1442
|
-
var topleft, topright, bottomleft, bottomright, righttop, rightbottom, lefttop, leftbottom;
|
|
1443
|
-
topleft = topright = bottomleft = bottomright = righttop = rightbottom = lefttop = leftbottom = 0.5;
|
|
1444
|
-
var edges = [];
|
|
1445
|
-
if (cval === 1) {
|
|
1446
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1447
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1448
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1449
|
-
} else if (cval === 169) {
|
|
1450
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
1451
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
1452
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1453
|
-
} else if (cval === 4) {
|
|
1454
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1455
|
-
bottomright = interpolateX(minV, bl, br);
|
|
1456
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1457
|
-
} else if (cval === 166) {
|
|
1458
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
1459
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1460
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1461
|
-
} else if (cval === 16) {
|
|
1462
|
-
righttop = interpolateX(minV, br, tr);
|
|
1463
|
-
topright = interpolateX(minV, tl, tr);
|
|
1464
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1465
|
-
} else if (cval === 154) {
|
|
1466
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1467
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1468
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1469
|
-
} else if (cval === 64) {
|
|
1470
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
1471
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1472
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1473
|
-
} else if (cval === 106) {
|
|
1474
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1475
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
1476
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1477
|
-
} else if (cval === 168) {
|
|
1478
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1479
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1480
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1481
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1482
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1483
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1484
|
-
} else if (cval === 2) {
|
|
1485
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1486
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1487
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1488
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1489
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1490
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1491
|
-
} else if (cval === 162) {
|
|
1492
|
-
righttop = interpolateX(maxV, br, tr);
|
|
1493
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
1494
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1495
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1496
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1497
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1498
|
-
} else if (cval === 8) {
|
|
1499
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
1500
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1501
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1502
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1503
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1504
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1505
|
-
} else if (cval === 138) {
|
|
1506
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
1507
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1508
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1509
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
1510
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1511
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1512
|
-
} else if (cval === 32) {
|
|
1513
|
-
righttop = interpolateX(maxV, br, tr);
|
|
1514
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
1515
|
-
topleft = interpolateX(minV, tl, tr);
|
|
1516
|
-
topright = interpolateX(maxV, tl, tr);
|
|
1517
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1518
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1519
|
-
} else if (cval === 42) {
|
|
1520
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1521
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1522
|
-
topleft = interpolateX(minV, tl, tr);
|
|
1523
|
-
topright = interpolateX(maxV, tl, tr);
|
|
1524
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1525
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1526
|
-
} else if (cval === 128) {
|
|
1527
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1528
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1529
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1530
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
1531
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1532
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1533
|
-
}
|
|
1534
|
-
if (cval === 5) {
|
|
1535
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1536
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1537
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1538
|
-
} else if (cval === 165) {
|
|
1539
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
1540
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
1541
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1542
|
-
} else if (cval === 20) {
|
|
1543
|
-
bottomright = interpolateX(minV, bl, br);
|
|
1544
|
-
topright = interpolateX(minV, tl, tr);
|
|
1545
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1546
|
-
} else if (cval === 150) {
|
|
1547
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1548
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1549
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1550
|
-
} else if (cval === 80) {
|
|
1551
|
-
righttop = interpolateX(minV, br, tr);
|
|
1552
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
1553
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1554
|
-
} else if (cval === 90) {
|
|
1555
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1556
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1557
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1558
|
-
} else if (cval === 65) {
|
|
1559
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1560
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1561
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1562
|
-
} else if (cval === 105) {
|
|
1563
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
1564
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
1565
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1566
|
-
} else if (cval === 160) {
|
|
1567
|
-
righttop = interpolateX(maxV, br, tr);
|
|
1568
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
1569
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1570
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1571
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1572
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1573
|
-
} else if (cval === 10) {
|
|
1574
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
1575
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1576
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1577
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1578
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1579
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1580
|
-
} else if (cval === 130) {
|
|
1581
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1582
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1583
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1584
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
1585
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1586
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1587
|
-
} else if (cval === 40) {
|
|
1588
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1589
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1590
|
-
topleft = interpolateX(minV, tl, tr);
|
|
1591
|
-
topright = interpolateX(maxV, tl, tr);
|
|
1592
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1593
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1594
|
-
} else if (cval === 101) {
|
|
1595
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
1596
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
1597
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1598
|
-
} else if (cval === 69) {
|
|
1599
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1600
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1601
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1602
|
-
} else if (cval === 149) {
|
|
1603
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
1604
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1605
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1606
|
-
} else if (cval === 21) {
|
|
1607
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1608
|
-
topright = interpolateX(minV, tl, tr);
|
|
1609
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1610
|
-
} else if (cval === 86) {
|
|
1611
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1612
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1613
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1614
|
-
} else if (cval === 84) {
|
|
1615
|
-
bottomright = interpolateX(minV, bl, br);
|
|
1616
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
1617
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1618
|
-
} else if (cval === 89) {
|
|
1619
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1620
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
1621
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1622
|
-
} else if (cval === 81) {
|
|
1623
|
-
righttop = interpolateX(minV, br, tr);
|
|
1624
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1625
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1626
|
-
} else if (cval === 96) {
|
|
1627
|
-
righttop = interpolateX(maxV, br, tr);
|
|
1628
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
1629
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
1630
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
1631
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1632
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1633
|
-
} else if (cval === 74) {
|
|
1634
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
1635
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1636
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1637
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1638
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1639
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1640
|
-
} else if (cval === 24) {
|
|
1641
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1642
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1643
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1644
|
-
topright = interpolateX(minV, tl, tr);
|
|
1645
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1646
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1647
|
-
} else if (cval === 146) {
|
|
1648
|
-
righttop = interpolateX(minV, br, tr);
|
|
1649
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1650
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1651
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1652
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1653
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1654
|
-
} else if (cval === 6) {
|
|
1655
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1656
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1657
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1658
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1659
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1660
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1661
|
-
} else if (cval === 164) {
|
|
1662
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
1663
|
-
bottomright = interpolateX(minV, bl, br);
|
|
1664
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1665
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1666
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1667
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1668
|
-
} else if (cval === 129) {
|
|
1669
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1670
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
1671
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1672
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
1673
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1674
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1675
|
-
} else if (cval === 41) {
|
|
1676
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
1677
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1678
|
-
topleft = interpolateX(minV, tl, tr);
|
|
1679
|
-
topright = interpolateX(maxV, tl, tr);
|
|
1680
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1681
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1682
|
-
} else if (cval === 66) {
|
|
1683
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1684
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1685
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1686
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1687
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1688
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1689
|
-
} else if (cval === 104) {
|
|
1690
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1691
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1692
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
1693
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
1694
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1695
|
-
edges.push(isoBandEdgeTL[cval]);
|
|
1696
|
-
} else if (cval === 144) {
|
|
1697
|
-
righttop = interpolateX(minV, br, tr);
|
|
1698
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1699
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1700
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1701
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1702
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1703
|
-
} else if (cval === 26) {
|
|
1704
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1705
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1706
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1707
|
-
topright = interpolateX(minV, tl, tr);
|
|
1708
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1709
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1710
|
-
} else if (cval === 36) {
|
|
1711
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
1712
|
-
bottomright = interpolateX(minV, bl, br);
|
|
1713
|
-
topleft = interpolateX(minV, tl, tr);
|
|
1714
|
-
topright = interpolateX(maxV, tl, tr);
|
|
1715
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1716
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1717
|
-
} else if (cval === 134) {
|
|
1718
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1719
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1720
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1721
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
1722
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1723
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1724
|
-
} else if (cval === 9) {
|
|
1725
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
1726
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1727
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
1728
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1729
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1730
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1731
|
-
} else if (cval === 161) {
|
|
1732
|
-
righttop = interpolateX(maxV, br, tr);
|
|
1733
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
1734
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1735
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
1736
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1737
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1738
|
-
} else if (cval === 37) {
|
|
1739
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
1740
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1741
|
-
topleft = interpolateX(minV, tl, tr);
|
|
1742
|
-
topright = interpolateX(maxV, tl, tr);
|
|
1743
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1744
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1745
|
-
} else if (cval === 133) {
|
|
1746
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1747
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
1748
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1749
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
1750
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1751
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1752
|
-
} else if (cval === 148) {
|
|
1753
|
-
bottomright = interpolateX(minV, bl, br);
|
|
1754
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1755
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1756
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1757
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1758
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1759
|
-
} else if (cval === 22) {
|
|
1760
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1761
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1762
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1763
|
-
topright = interpolateX(minV, tl, tr);
|
|
1764
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1765
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1766
|
-
} else if (cval === 82) {
|
|
1767
|
-
righttop = interpolateX(minV, br, tr);
|
|
1768
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1769
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1770
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1771
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1772
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1773
|
-
} else if (cval === 88) {
|
|
1774
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1775
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1776
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1777
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
1778
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1779
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1780
|
-
} else if (cval === 73) {
|
|
1781
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
1782
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1783
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
1784
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1785
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1786
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1787
|
-
} else if (cval === 97) {
|
|
1788
|
-
righttop = interpolateX(maxV, br, tr);
|
|
1789
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
1790
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1791
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
1792
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1793
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1794
|
-
} else if (cval === 145) {
|
|
1795
|
-
righttop = interpolateX(minV, br, tr);
|
|
1796
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1797
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
1798
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1799
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1800
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1801
|
-
} else if (cval === 25) {
|
|
1802
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1803
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
1804
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1805
|
-
topright = interpolateX(minV, tl, tr);
|
|
1806
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1807
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1808
|
-
} else if (cval === 70) {
|
|
1809
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1810
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1811
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1812
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1813
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1814
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1815
|
-
} else if (cval === 100) {
|
|
1816
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
1817
|
-
bottomright = interpolateX(minV, bl, br);
|
|
1818
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
1819
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
1820
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1821
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1822
|
-
} else if (cval === 34) {
|
|
1823
|
-
if (flipped === 0) {
|
|
1824
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
1825
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1826
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1827
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1828
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1829
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1830
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1831
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
1832
|
-
} else {
|
|
1833
|
-
righttop = interpolateX(maxV, br, tr);
|
|
1834
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
1835
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1836
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1837
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1838
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1839
|
-
topleft = interpolateX(minV, tl, tr);
|
|
1840
|
-
topright = interpolateX(maxV, tl, tr);
|
|
1841
|
-
}
|
|
1842
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1843
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1844
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1845
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1846
|
-
} else if (cval === 35) {
|
|
1847
|
-
if (flipped === 4) {
|
|
1848
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
1849
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1850
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1851
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1852
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1853
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1854
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1855
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
1856
|
-
} else {
|
|
1857
|
-
righttop = interpolateX(maxV, br, tr);
|
|
1858
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
1859
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1860
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1861
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1862
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1863
|
-
topleft = interpolateX(minV, tl, tr);
|
|
1864
|
-
topright = interpolateX(maxV, tl, tr);
|
|
1865
|
-
}
|
|
1866
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1867
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1868
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1869
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1870
|
-
} else if (cval === 136) {
|
|
1871
|
-
if (flipped === 0) {
|
|
1872
|
-
righttop = interpolateX(maxV, br, tr);
|
|
1873
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
1874
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1875
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1876
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1877
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1878
|
-
topleft = interpolateX(minV, tl, tr);
|
|
1879
|
-
topright = interpolateX(maxV, tl, tr);
|
|
1880
|
-
} else {
|
|
1881
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
1882
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1883
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1884
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1885
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1886
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1887
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
1888
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
1889
|
-
}
|
|
1890
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1891
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1892
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1893
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1894
|
-
} else if (cval === 153) {
|
|
1895
|
-
if (flipped === 0) {
|
|
1896
|
-
righttop = interpolateX(minV, br, tr);
|
|
1897
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1898
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1899
|
-
topright = interpolateX(minV, tl, tr);
|
|
1900
|
-
} else {
|
|
1901
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1902
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
1903
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
1904
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1905
|
-
}
|
|
1906
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1907
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1908
|
-
} else if (cval === 102) {
|
|
1909
|
-
if (flipped === 0) {
|
|
1910
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1911
|
-
bottomright = interpolateX(minV, bl, br);
|
|
1912
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
1913
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1914
|
-
} else {
|
|
1915
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
1916
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1917
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1918
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
1919
|
-
}
|
|
1920
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1921
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1922
|
-
} else if (cval === 155) {
|
|
1923
|
-
if (flipped === 4) {
|
|
1924
|
-
righttop = interpolateX(minV, br, tr);
|
|
1925
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1926
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1927
|
-
topright = interpolateX(minV, tl, tr);
|
|
1928
|
-
} else {
|
|
1929
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1930
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
1931
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
1932
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1933
|
-
}
|
|
1934
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1935
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
1936
|
-
} else if (cval === 103) {
|
|
1937
|
-
if (flipped === 4) {
|
|
1938
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
1939
|
-
bottomright = interpolateX(minV, bl, br);
|
|
1940
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
1941
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
1942
|
-
} else {
|
|
1943
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
1944
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
1945
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
1946
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
1947
|
-
}
|
|
1948
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
1949
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1950
|
-
} else if (cval === 152) {
|
|
1951
|
-
if (flipped === 0) {
|
|
1952
|
-
righttop = interpolateX(minV, br, tr);
|
|
1953
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1954
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1955
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1956
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1957
|
-
topright = interpolateX(minV, tl, tr);
|
|
1958
|
-
} else {
|
|
1959
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1960
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1961
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1962
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1963
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1964
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1965
|
-
}
|
|
1966
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1967
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
1968
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1969
|
-
} else if (cval === 156) {
|
|
1970
|
-
if (flipped === 4) {
|
|
1971
|
-
righttop = interpolateX(minV, br, tr);
|
|
1972
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
1973
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
1974
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
1975
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
1976
|
-
topright = interpolateX(minV, tl, tr);
|
|
1977
|
-
} else {
|
|
1978
|
-
righttop = 1 - interpolateX(maxV, tr, br);
|
|
1979
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
1980
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
1981
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
1982
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
1983
|
-
topright = 1 - interpolateX(maxV, tr, tl);
|
|
1984
|
-
}
|
|
1985
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
1986
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
1987
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
1988
|
-
} else if (cval === 137) {
|
|
1989
|
-
if (flipped === 0) {
|
|
1990
|
-
righttop = interpolateX(maxV, br, tr);
|
|
1991
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
1992
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
1993
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
1994
|
-
topleft = interpolateX(minV, tl, tr);
|
|
1995
|
-
topright = interpolateX(maxV, tl, tr);
|
|
1996
|
-
} else {
|
|
1997
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
1998
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
1999
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
2000
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
2001
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2002
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
2003
|
-
}
|
|
2004
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
2005
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
2006
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
2007
|
-
} else if (cval === 139) {
|
|
2008
|
-
if (flipped === 4) {
|
|
2009
|
-
righttop = interpolateX(maxV, br, tr);
|
|
2010
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
2011
|
-
bottomleft = 1 - interpolateX(minV, br, bl);
|
|
2012
|
-
leftbottom = 1 - interpolateX(minV, tl, bl);
|
|
2013
|
-
topleft = interpolateX(minV, tl, tr);
|
|
2014
|
-
topright = interpolateX(maxV, tl, tr);
|
|
2015
|
-
} else {
|
|
2016
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
2017
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2018
|
-
bottomleft = interpolateX(maxV, bl, br);
|
|
2019
|
-
leftbottom = interpolateX(maxV, bl, tl);
|
|
2020
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2021
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
2022
|
-
}
|
|
2023
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
2024
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
2025
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
2026
|
-
} else if (cval === 98) {
|
|
2027
|
-
if (flipped === 0) {
|
|
2028
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
2029
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2030
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
2031
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
2032
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
2033
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
2034
|
-
} else {
|
|
2035
|
-
righttop = interpolateX(maxV, br, tr);
|
|
2036
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
2037
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2038
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2039
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
2040
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
2041
|
-
}
|
|
2042
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
2043
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
2044
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
2045
|
-
} else if (cval === 99) {
|
|
2046
|
-
if (flipped === 4) {
|
|
2047
|
-
righttop = 1 - interpolateX(minV, tr, br);
|
|
2048
|
-
rightbottom = 1 - interpolateX(maxV, tr, br);
|
|
2049
|
-
bottomright = interpolateX(maxV, bl, br);
|
|
2050
|
-
bottomleft = interpolateX(minV, bl, br);
|
|
2051
|
-
lefttop = interpolateX(minV, bl, tl);
|
|
2052
|
-
topleft = 1 - interpolateX(minV, tr, tl);
|
|
2053
|
-
} else {
|
|
2054
|
-
righttop = interpolateX(maxV, br, tr);
|
|
2055
|
-
rightbottom = interpolateX(minV, br, tr);
|
|
2056
|
-
bottomright = 1 - interpolateX(minV, br, bl);
|
|
2057
|
-
bottomleft = 1 - interpolateX(maxV, br, bl);
|
|
2058
|
-
lefttop = 1 - interpolateX(maxV, tl, bl);
|
|
2059
|
-
topleft = interpolateX(maxV, tl, tr);
|
|
2060
|
-
}
|
|
2061
|
-
edges.push(isoBandEdgeRT[cval]);
|
|
2062
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
2063
|
-
edges.push(isoBandEdgeBL[cval]);
|
|
2064
|
-
} else if (cval === 38) {
|
|
2065
|
-
if (flipped === 0) {
|
|
2066
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
2067
|
-
bottomright = interpolateX(minV, bl, br);
|
|
2068
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
2069
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
2070
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2071
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
2072
|
-
} else {
|
|
2073
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
2074
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
2075
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2076
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2077
|
-
topleft = interpolateX(minV, tl, tr);
|
|
2078
|
-
topright = interpolateX(maxV, tl, tr);
|
|
2079
|
-
}
|
|
2080
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
2081
|
-
edges.push(isoBandEdgeLB[cval]);
|
|
2082
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
2083
|
-
} else if (cval === 39) {
|
|
2084
|
-
if (flipped === 4) {
|
|
2085
|
-
rightbottom = 1 - interpolateX(minV, tr, br);
|
|
2086
|
-
bottomright = interpolateX(minV, bl, br);
|
|
2087
|
-
leftbottom = interpolateX(minV, bl, tl);
|
|
2088
|
-
lefttop = interpolateX(maxV, bl, tl);
|
|
2089
|
-
topleft = 1 - interpolateX(maxV, tr, tl);
|
|
2090
|
-
topright = 1 - interpolateX(minV, tr, tl);
|
|
2091
|
-
} else {
|
|
2092
|
-
rightbottom = interpolateX(maxV, br, tr);
|
|
2093
|
-
bottomright = 1 - interpolateX(maxV, br, bl);
|
|
2094
|
-
leftbottom = 1 - interpolateX(maxV, tl, bl);
|
|
2095
|
-
lefttop = 1 - interpolateX(minV, tl, bl);
|
|
2096
|
-
topleft = interpolateX(minV, tl, tr);
|
|
2097
|
-
topright = interpolateX(maxV, tl, tr);
|
|
2098
|
-
}
|
|
2099
|
-
edges.push(isoBandEdgeRB[cval]);
|
|
2100
|
-
edges.push(isoBandEdgeBR[cval]);
|
|
2101
|
-
edges.push(isoBandEdgeLT[cval]);
|
|
2102
|
-
} else if (cval === 85) {
|
|
2103
|
-
righttop = 1;
|
|
2104
|
-
rightbottom = 0;
|
|
2105
|
-
bottomright = 1;
|
|
2106
|
-
bottomleft = 0;
|
|
2107
|
-
leftbottom = 0;
|
|
2108
|
-
lefttop = 1;
|
|
2109
|
-
topleft = 0;
|
|
2110
|
-
topright = 1;
|
|
2111
|
-
}
|
|
2112
|
-
if (topleft < 0 || topleft > 1 || topright < 0 || topright > 1 || righttop < 0 || righttop > 1 || bottomright < 0 || bottomright > 1 || leftbottom < 0 || leftbottom > 1 || lefttop < 0 || lefttop > 1) {
|
|
2113
|
-
console.log(
|
|
2114
|
-
"MarchingSquaresJS-isoBands: " + cval + " " + cval_real + " " + tl + "," + tr + "," + br + "," + bl + " " + flipped + " " + topleft + " " + topright + " " + righttop + " " + rightbottom + " " + bottomright + " " + bottomleft + " " + leftbottom + " " + lefttop
|
|
2115
|
-
);
|
|
2116
|
-
}
|
|
2117
|
-
BandGrid.cells[j][i] = {
|
|
2118
|
-
cval,
|
|
2119
|
-
cval_real,
|
|
2120
|
-
flipped,
|
|
2121
|
-
topleft,
|
|
2122
|
-
topright,
|
|
2123
|
-
righttop,
|
|
2124
|
-
rightbottom,
|
|
2125
|
-
bottomright,
|
|
2126
|
-
bottomleft,
|
|
2127
|
-
leftbottom,
|
|
2128
|
-
lefttop,
|
|
2129
|
-
edges
|
|
2130
|
-
};
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
}
|
|
2134
|
-
return BandGrid;
|
|
2135
|
-
}
|
|
2136
|
-
function BandGrid2AreaPaths(grid) {
|
|
2137
|
-
var areas = [];
|
|
2138
|
-
var rows = grid.rows;
|
|
2139
|
-
var cols = grid.cols;
|
|
2140
|
-
var currentPolygon = [];
|
|
2141
|
-
for (var j = 0; j < rows; j++) {
|
|
2142
|
-
for (var i = 0; i < cols; i++) {
|
|
2143
|
-
if (typeof grid.cells[j][i] !== "undefined" && grid.cells[j][i].edges.length > 0) {
|
|
2144
|
-
var cell = grid.cells[j][i];
|
|
2145
|
-
var prev = getStartXY(cell), next = null, p = i, q = j;
|
|
2146
|
-
if (prev !== null) {
|
|
2147
|
-
currentPolygon.push([prev.p[0] + p, prev.p[1] + q]);
|
|
2148
|
-
}
|
|
2149
|
-
do {
|
|
2150
|
-
next = getExitXY(grid.cells[q][p], prev.x, prev.y, prev.o);
|
|
2151
|
-
if (next !== null) {
|
|
2152
|
-
currentPolygon.push([next.p[0] + p, next.p[1] + q]);
|
|
2153
|
-
p += next.x;
|
|
2154
|
-
q += next.y;
|
|
2155
|
-
prev = next;
|
|
2156
|
-
} else {
|
|
2157
|
-
break;
|
|
2158
|
-
}
|
|
2159
|
-
if (q < 0 || q >= rows || p < 0 || p >= cols || typeof grid.cells[q][p] === "undefined") {
|
|
2160
|
-
p -= next.x;
|
|
2161
|
-
q -= next.y;
|
|
2162
|
-
var missing = traceOutOfGridPath(
|
|
2163
|
-
grid,
|
|
2164
|
-
p,
|
|
2165
|
-
q,
|
|
2166
|
-
next.x,
|
|
2167
|
-
next.y,
|
|
2168
|
-
next.o
|
|
2169
|
-
);
|
|
2170
|
-
if (missing !== null) {
|
|
2171
|
-
missing.path.forEach(function(pp) {
|
|
2172
|
-
currentPolygon.push(pp);
|
|
2173
|
-
});
|
|
2174
|
-
p = missing.i;
|
|
2175
|
-
q = missing.j;
|
|
2176
|
-
prev = missing;
|
|
2177
|
-
} else {
|
|
2178
|
-
break;
|
|
2179
|
-
}
|
|
2180
|
-
}
|
|
2181
|
-
} while (typeof grid.cells[q][p] !== "undefined" && grid.cells[q][p].edges.length > 0);
|
|
2182
|
-
areas.push(currentPolygon);
|
|
2183
|
-
currentPolygon = [];
|
|
2184
|
-
if (grid.cells[j][i].edges.length > 0)
|
|
2185
|
-
i--;
|
|
2186
|
-
}
|
|
2187
|
-
}
|
|
2188
|
-
}
|
|
2189
|
-
return areas;
|
|
2190
|
-
}
|
|
2191
|
-
function traceOutOfGridPath(grid, i, j, d_x, d_y, d_o) {
|
|
2192
|
-
var cell = grid.cells[j][i];
|
|
2193
|
-
var cval = cell.cval_real;
|
|
2194
|
-
var p = i + d_x, q = j + d_y;
|
|
2195
|
-
var path = [];
|
|
2196
|
-
var closed = false;
|
|
2197
|
-
while (!closed) {
|
|
2198
|
-
if (typeof grid.cells[q] === "undefined" || typeof grid.cells[q][p] === "undefined") {
|
|
2199
|
-
q -= d_y;
|
|
2200
|
-
p -= d_x;
|
|
2201
|
-
cell = grid.cells[q][p];
|
|
2202
|
-
cval = cell.cval_real;
|
|
2203
|
-
if (d_y === -1) {
|
|
2204
|
-
if (d_o === 0) {
|
|
2205
|
-
if (cval & Node3) {
|
|
2206
|
-
path.push([p, q]);
|
|
2207
|
-
d_x = -1;
|
|
2208
|
-
d_y = 0;
|
|
2209
|
-
d_o = 0;
|
|
2210
|
-
} else if (cval & Node2) {
|
|
2211
|
-
path.push([p + 1, q]);
|
|
2212
|
-
d_x = 1;
|
|
2213
|
-
d_y = 0;
|
|
2214
|
-
d_o = 0;
|
|
2215
|
-
} else {
|
|
2216
|
-
path.push([p + cell.bottomright, q]);
|
|
2217
|
-
d_x = 0;
|
|
2218
|
-
d_y = 1;
|
|
2219
|
-
d_o = 1;
|
|
2220
|
-
closed = true;
|
|
2221
|
-
break;
|
|
2222
|
-
}
|
|
2223
|
-
} else if (cval & Node3) {
|
|
2224
|
-
path.push([p, q]);
|
|
2225
|
-
d_x = -1;
|
|
2226
|
-
d_y = 0;
|
|
2227
|
-
d_o = 0;
|
|
2228
|
-
} else if (cval & Node2) {
|
|
2229
|
-
path.push([p + cell.bottomright, q]);
|
|
2230
|
-
d_x = 0;
|
|
2231
|
-
d_y = 1;
|
|
2232
|
-
d_o = 1;
|
|
2233
|
-
closed = true;
|
|
2234
|
-
break;
|
|
2235
|
-
} else {
|
|
2236
|
-
path.push([p + cell.bottomleft, q]);
|
|
2237
|
-
d_x = 0;
|
|
2238
|
-
d_y = 1;
|
|
2239
|
-
d_o = 0;
|
|
2240
|
-
closed = true;
|
|
2241
|
-
break;
|
|
2242
|
-
}
|
|
2243
|
-
} else if (d_y === 1) {
|
|
2244
|
-
if (d_o === 0) {
|
|
2245
|
-
if (cval & Node1) {
|
|
2246
|
-
path.push([p + 1, q + 1]);
|
|
2247
|
-
d_x = 1;
|
|
2248
|
-
d_y = 0;
|
|
2249
|
-
d_o = 1;
|
|
2250
|
-
} else if (!(cval & Node0)) {
|
|
2251
|
-
path.push([p + cell.topright, q + 1]);
|
|
2252
|
-
d_x = 0;
|
|
2253
|
-
d_y = -1;
|
|
2254
|
-
d_o = 1;
|
|
2255
|
-
closed = true;
|
|
2256
|
-
break;
|
|
2257
|
-
} else {
|
|
2258
|
-
path.push([p + cell.topleft, q + 1]);
|
|
2259
|
-
d_x = 0;
|
|
2260
|
-
d_y = -1;
|
|
2261
|
-
d_o = 0;
|
|
2262
|
-
closed = true;
|
|
2263
|
-
break;
|
|
2264
|
-
}
|
|
2265
|
-
} else if (cval & Node1) {
|
|
2266
|
-
path.push([p + 1, q + 1]);
|
|
2267
|
-
d_x = 1;
|
|
2268
|
-
d_y = 0;
|
|
2269
|
-
d_o = 1;
|
|
2270
|
-
} else {
|
|
2271
|
-
path.push([p + 1, q + 1]);
|
|
2272
|
-
d_x = 1;
|
|
2273
|
-
d_y = 0;
|
|
2274
|
-
d_o = 1;
|
|
2275
|
-
}
|
|
2276
|
-
} else if (d_x === -1) {
|
|
2277
|
-
if (d_o === 0) {
|
|
2278
|
-
if (cval & Node0) {
|
|
2279
|
-
path.push([p, q + 1]);
|
|
2280
|
-
d_x = 0;
|
|
2281
|
-
d_y = 1;
|
|
2282
|
-
d_o = 0;
|
|
2283
|
-
} else if (!(cval & Node3)) {
|
|
2284
|
-
path.push([p, q + cell.lefttop]);
|
|
2285
|
-
d_x = 1;
|
|
2286
|
-
d_y = 0;
|
|
2287
|
-
d_o = 1;
|
|
2288
|
-
closed = true;
|
|
2289
|
-
break;
|
|
2290
|
-
} else {
|
|
2291
|
-
path.push([p, q + cell.leftbottom]);
|
|
2292
|
-
d_x = 1;
|
|
2293
|
-
d_y = 0;
|
|
2294
|
-
d_o = 0;
|
|
2295
|
-
closed = true;
|
|
2296
|
-
break;
|
|
2297
|
-
}
|
|
2298
|
-
} else {
|
|
2299
|
-
if (cval & Node0) {
|
|
2300
|
-
path.push([p, q + 1]);
|
|
2301
|
-
d_x = 0;
|
|
2302
|
-
d_y = 1;
|
|
2303
|
-
d_o = 0;
|
|
2304
|
-
} else {
|
|
2305
|
-
console.log("MarchingSquaresJS-isoBands: wtf");
|
|
2306
|
-
break;
|
|
2307
|
-
}
|
|
2308
|
-
}
|
|
2309
|
-
} else if (d_x === 1) {
|
|
2310
|
-
if (d_o === 0) {
|
|
2311
|
-
if (cval & Node2) {
|
|
2312
|
-
path.push([p + 1, q]);
|
|
2313
|
-
d_x = 0;
|
|
2314
|
-
d_y = -1;
|
|
2315
|
-
d_o = 1;
|
|
2316
|
-
} else {
|
|
2317
|
-
path.push([p + 1, q + cell.rightbottom]);
|
|
2318
|
-
d_x = -1;
|
|
2319
|
-
d_y = 0;
|
|
2320
|
-
d_o = 0;
|
|
2321
|
-
closed = true;
|
|
2322
|
-
break;
|
|
2323
|
-
}
|
|
2324
|
-
} else {
|
|
2325
|
-
if (cval & Node2) {
|
|
2326
|
-
path.push([p + 1, q]);
|
|
2327
|
-
d_x = 0;
|
|
2328
|
-
d_y = -1;
|
|
2329
|
-
d_o = 1;
|
|
2330
|
-
} else if (!(cval & Node1)) {
|
|
2331
|
-
path.push([p + 1, q + cell.rightbottom]);
|
|
2332
|
-
d_x = -1;
|
|
2333
|
-
d_y = 0;
|
|
2334
|
-
d_o = 0;
|
|
2335
|
-
closed = true;
|
|
2336
|
-
break;
|
|
2337
|
-
} else {
|
|
2338
|
-
path.push([p + 1, q + cell.righttop]);
|
|
2339
|
-
d_x = -1;
|
|
2340
|
-
d_y = 0;
|
|
2341
|
-
d_o = 1;
|
|
2342
|
-
break;
|
|
2343
|
-
}
|
|
2344
|
-
}
|
|
2345
|
-
} else {
|
|
2346
|
-
console.log("MarchingSquaresJS-isoBands: we came from nowhere!");
|
|
2347
|
-
break;
|
|
2348
|
-
}
|
|
2349
|
-
} else {
|
|
2350
|
-
cell = grid.cells[q][p];
|
|
2351
|
-
cval = cell.cval_real;
|
|
2352
|
-
if (d_x === -1) {
|
|
2353
|
-
if (d_o === 0) {
|
|
2354
|
-
if (typeof grid.cells[q - 1] !== "undefined" && typeof grid.cells[q - 1][p] !== "undefined") {
|
|
2355
|
-
d_x = 0;
|
|
2356
|
-
d_y = -1;
|
|
2357
|
-
d_o = 1;
|
|
2358
|
-
} else if (cval & Node3) {
|
|
2359
|
-
path.push([p, q]);
|
|
2360
|
-
} else {
|
|
2361
|
-
path.push([p + cell.bottomright, q]);
|
|
2362
|
-
d_x = 0;
|
|
2363
|
-
d_y = 1;
|
|
2364
|
-
d_o = 1;
|
|
2365
|
-
closed = true;
|
|
2366
|
-
break;
|
|
2367
|
-
}
|
|
2368
|
-
} else if (cval & Node0) {
|
|
2369
|
-
console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!");
|
|
2370
|
-
} else {
|
|
2371
|
-
console.log(
|
|
2372
|
-
"MarchingSquaresJS-isoBands: found entry from top at " + p + "," + q
|
|
2373
|
-
);
|
|
2374
|
-
break;
|
|
2375
|
-
}
|
|
2376
|
-
} else if (d_x === 1) {
|
|
2377
|
-
if (d_o === 0) {
|
|
2378
|
-
console.log("MarchingSquaresJS-isoBands: wtf");
|
|
2379
|
-
break;
|
|
2380
|
-
} else {
|
|
2381
|
-
if (typeof grid.cells[q + 1] !== "undefined" && typeof grid.cells[q + 1][p] !== "undefined") {
|
|
2382
|
-
d_x = 0;
|
|
2383
|
-
d_y = 1;
|
|
2384
|
-
d_o = 0;
|
|
2385
|
-
} else if (cval & Node1) {
|
|
2386
|
-
path.push([p + 1, q + 1]);
|
|
2387
|
-
d_x = 1;
|
|
2388
|
-
d_y = 0;
|
|
2389
|
-
d_o = 1;
|
|
2390
|
-
} else {
|
|
2391
|
-
path.push([p + cell.topleft, q + 1]);
|
|
2392
|
-
d_x = 0;
|
|
2393
|
-
d_y = -1;
|
|
2394
|
-
d_o = 0;
|
|
2395
|
-
closed = true;
|
|
2396
|
-
break;
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
} else if (d_y === -1) {
|
|
2400
|
-
if (d_o === 1) {
|
|
2401
|
-
if (typeof grid.cells[q][p + 1] !== "undefined") {
|
|
2402
|
-
d_x = 1;
|
|
2403
|
-
d_y = 0;
|
|
2404
|
-
d_o = 1;
|
|
2405
|
-
} else if (cval & Node2) {
|
|
2406
|
-
path.push([p + 1, q]);
|
|
2407
|
-
d_x = 0;
|
|
2408
|
-
d_y = -1;
|
|
2409
|
-
d_o = 1;
|
|
2410
|
-
} else {
|
|
2411
|
-
path.push([p + 1, q + cell.righttop]);
|
|
2412
|
-
d_x = -1;
|
|
2413
|
-
d_y = 0;
|
|
2414
|
-
d_o = 1;
|
|
2415
|
-
closed = true;
|
|
2416
|
-
break;
|
|
2417
|
-
}
|
|
2418
|
-
} else {
|
|
2419
|
-
console.log("MarchingSquaresJS-isoBands: wtf");
|
|
2420
|
-
break;
|
|
2421
|
-
}
|
|
2422
|
-
} else if (d_y === 1) {
|
|
2423
|
-
if (d_o === 0) {
|
|
2424
|
-
if (typeof grid.cells[q][p - 1] !== "undefined") {
|
|
2425
|
-
d_x = -1;
|
|
2426
|
-
d_y = 0;
|
|
2427
|
-
d_o = 0;
|
|
2428
|
-
} else if (cval & Node0) {
|
|
2429
|
-
path.push([p, q + 1]);
|
|
2430
|
-
d_x = 0;
|
|
2431
|
-
d_y = 1;
|
|
2432
|
-
d_o = 0;
|
|
2433
|
-
} else {
|
|
2434
|
-
path.push([p, q + cell.leftbottom]);
|
|
2435
|
-
d_x = 1;
|
|
2436
|
-
d_y = 0;
|
|
2437
|
-
d_o = 0;
|
|
2438
|
-
closed = true;
|
|
2439
|
-
break;
|
|
2440
|
-
}
|
|
2441
|
-
} else {
|
|
2442
|
-
console.log("MarchingSquaresJS-isoBands: wtf");
|
|
2443
|
-
break;
|
|
2444
|
-
}
|
|
2445
|
-
} else {
|
|
2446
|
-
console.log("MarchingSquaresJS-isoBands: where did we came from???");
|
|
2447
|
-
break;
|
|
2448
|
-
}
|
|
2449
|
-
}
|
|
2450
|
-
p += d_x;
|
|
2451
|
-
q += d_y;
|
|
2452
|
-
if (p === i && q === j) {
|
|
2453
|
-
break;
|
|
2454
|
-
}
|
|
2455
|
-
}
|
|
2456
|
-
return { path, i: p, j: q, x: d_x, y: d_y, o: d_o };
|
|
2457
|
-
}
|
|
2458
|
-
function deleteEdge(cell, edgeIdx) {
|
|
2459
|
-
delete cell.edges[edgeIdx];
|
|
2460
|
-
for (var k = edgeIdx + 1; k < cell.edges.length; k++) {
|
|
2461
|
-
cell.edges[k - 1] = cell.edges[k];
|
|
2462
|
-
}
|
|
2463
|
-
cell.edges.pop();
|
|
2464
|
-
}
|
|
2465
|
-
function getStartXY(cell) {
|
|
2466
|
-
if (cell.edges.length > 0) {
|
|
2467
|
-
var e = cell.edges[cell.edges.length - 1];
|
|
2468
|
-
var cval = cell.cval_real;
|
|
2469
|
-
switch (e) {
|
|
2470
|
-
case 0:
|
|
2471
|
-
if (cval & Node1) {
|
|
2472
|
-
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
2473
|
-
} else {
|
|
2474
|
-
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
2475
|
-
}
|
|
2476
|
-
case 1:
|
|
2477
|
-
if (cval & Node2) {
|
|
2478
|
-
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
2479
|
-
} else {
|
|
2480
|
-
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
2481
|
-
}
|
|
2482
|
-
case 2:
|
|
2483
|
-
if (cval & Node2) {
|
|
2484
|
-
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
2485
|
-
} else {
|
|
2486
|
-
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
2487
|
-
}
|
|
2488
|
-
case 3:
|
|
2489
|
-
if (cval & Node3) {
|
|
2490
|
-
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
2491
|
-
} else {
|
|
2492
|
-
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
2493
|
-
}
|
|
2494
|
-
case 4:
|
|
2495
|
-
if (cval & Node1) {
|
|
2496
|
-
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
2497
|
-
} else {
|
|
2498
|
-
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
2499
|
-
}
|
|
2500
|
-
case 5:
|
|
2501
|
-
if (cval & Node2) {
|
|
2502
|
-
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
2503
|
-
} else {
|
|
2504
|
-
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
2505
|
-
}
|
|
2506
|
-
case 6:
|
|
2507
|
-
if (cval & Node2) {
|
|
2508
|
-
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
2509
|
-
} else {
|
|
2510
|
-
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
2511
|
-
}
|
|
2512
|
-
case 7:
|
|
2513
|
-
if (cval & Node3) {
|
|
2514
|
-
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
2515
|
-
} else {
|
|
2516
|
-
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
2517
|
-
}
|
|
2518
|
-
case 8:
|
|
2519
|
-
if (cval & Node2) {
|
|
2520
|
-
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
2521
|
-
} else {
|
|
2522
|
-
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
2523
|
-
}
|
|
2524
|
-
case 9:
|
|
2525
|
-
if (cval & Node3) {
|
|
2526
|
-
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
2527
|
-
} else {
|
|
2528
|
-
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
2529
|
-
}
|
|
2530
|
-
case 10:
|
|
2531
|
-
if (cval & Node3) {
|
|
2532
|
-
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
2533
|
-
} else {
|
|
2534
|
-
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
2535
|
-
}
|
|
2536
|
-
case 11:
|
|
2537
|
-
if (cval & Node0) {
|
|
2538
|
-
return { p: [1, cell.righttop], x: -1, y: 0, o: 1 };
|
|
2539
|
-
} else {
|
|
2540
|
-
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
2541
|
-
}
|
|
2542
|
-
case 12:
|
|
2543
|
-
if (cval & Node2) {
|
|
2544
|
-
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
2545
|
-
} else {
|
|
2546
|
-
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
2547
|
-
}
|
|
2548
|
-
case 13:
|
|
2549
|
-
if (cval & Node3) {
|
|
2550
|
-
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
2551
|
-
} else {
|
|
2552
|
-
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
2553
|
-
}
|
|
2554
|
-
case 14:
|
|
2555
|
-
if (cval & Node3) {
|
|
2556
|
-
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
2557
|
-
} else {
|
|
2558
|
-
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
2559
|
-
}
|
|
2560
|
-
case 15:
|
|
2561
|
-
if (cval & Node0) {
|
|
2562
|
-
return { p: [1, cell.rightbottom], x: -1, y: 0, o: 0 };
|
|
2563
|
-
} else {
|
|
2564
|
-
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
2565
|
-
}
|
|
2566
|
-
case 16:
|
|
2567
|
-
if (cval & Node2) {
|
|
2568
|
-
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
2569
|
-
} else {
|
|
2570
|
-
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
2571
|
-
}
|
|
2572
|
-
case 17:
|
|
2573
|
-
if (cval & Node0) {
|
|
2574
|
-
return { p: [cell.bottomright, 0], x: 0, y: 1, o: 1 };
|
|
2575
|
-
} else {
|
|
2576
|
-
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
2577
|
-
}
|
|
2578
|
-
case 18:
|
|
2579
|
-
if (cval & Node3) {
|
|
2580
|
-
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
2581
|
-
} else {
|
|
2582
|
-
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
2583
|
-
}
|
|
2584
|
-
case 19:
|
|
2585
|
-
if (cval & Node0) {
|
|
2586
|
-
return { p: [cell.bottomleft, 0], x: 0, y: 1, o: 0 };
|
|
2587
|
-
} else {
|
|
2588
|
-
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
2589
|
-
}
|
|
2590
|
-
case 20:
|
|
2591
|
-
if (cval & Node0) {
|
|
2592
|
-
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
2593
|
-
} else {
|
|
2594
|
-
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
2595
|
-
}
|
|
2596
|
-
case 21:
|
|
2597
|
-
if (cval & Node1) {
|
|
2598
|
-
return { p: [0, cell.leftbottom], x: 1, y: 0, o: 0 };
|
|
2599
|
-
} else {
|
|
2600
|
-
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
2601
|
-
}
|
|
2602
|
-
case 22:
|
|
2603
|
-
if (cval & Node0) {
|
|
2604
|
-
return { p: [cell.topleft, 1], x: 0, y: -1, o: 0 };
|
|
2605
|
-
} else {
|
|
2606
|
-
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
2607
|
-
}
|
|
2608
|
-
case 23:
|
|
2609
|
-
if (cval & Node1) {
|
|
2610
|
-
return { p: [0, cell.lefttop], x: 1, y: 0, o: 1 };
|
|
2611
|
-
} else {
|
|
2612
|
-
return { p: [cell.topright, 1], x: 0, y: -1, o: 1 };
|
|
2613
|
-
}
|
|
2614
|
-
default:
|
|
2615
|
-
console.log("MarchingSquaresJS-isoBands: edge index out of range!");
|
|
2616
|
-
console.log(cell);
|
|
2617
|
-
break;
|
|
2618
|
-
}
|
|
2619
|
-
}
|
|
2620
|
-
return null;
|
|
2621
|
-
}
|
|
2622
|
-
function getExitXY(cell, x, y, o) {
|
|
2623
|
-
var e, id_x, d_x, d_y, cval = cell.cval;
|
|
2624
|
-
var d_o;
|
|
2625
|
-
switch (x) {
|
|
2626
|
-
case -1:
|
|
2627
|
-
switch (o) {
|
|
2628
|
-
case 0:
|
|
2629
|
-
e = isoBandEdgeRB[cval];
|
|
2630
|
-
d_x = isoBandNextXRB[cval];
|
|
2631
|
-
d_y = isoBandNextYRB[cval];
|
|
2632
|
-
d_o = isoBandNextORB[cval];
|
|
2633
|
-
break;
|
|
2634
|
-
default:
|
|
2635
|
-
e = isoBandEdgeRT[cval];
|
|
2636
|
-
d_x = isoBandNextXRT[cval];
|
|
2637
|
-
d_y = isoBandNextYRT[cval];
|
|
2638
|
-
d_o = isoBandNextORT[cval];
|
|
2639
|
-
break;
|
|
2640
|
-
}
|
|
2641
|
-
break;
|
|
2642
|
-
case 1:
|
|
2643
|
-
switch (o) {
|
|
2644
|
-
case 0:
|
|
2645
|
-
e = isoBandEdgeLB[cval];
|
|
2646
|
-
d_x = isoBandNextXLB[cval];
|
|
2647
|
-
d_y = isoBandNextYLB[cval];
|
|
2648
|
-
d_o = isoBandNextOLB[cval];
|
|
2649
|
-
break;
|
|
2650
|
-
default:
|
|
2651
|
-
e = isoBandEdgeLT[cval];
|
|
2652
|
-
d_x = isoBandNextXLT[cval];
|
|
2653
|
-
d_y = isoBandNextYLT[cval];
|
|
2654
|
-
d_o = isoBandNextOLT[cval];
|
|
2655
|
-
break;
|
|
2656
|
-
}
|
|
2657
|
-
break;
|
|
2658
|
-
default:
|
|
2659
|
-
switch (y) {
|
|
2660
|
-
case -1:
|
|
2661
|
-
switch (o) {
|
|
2662
|
-
case 0:
|
|
2663
|
-
e = isoBandEdgeTL[cval];
|
|
2664
|
-
d_x = isoBandNextXTL[cval];
|
|
2665
|
-
d_y = isoBandNextYTL[cval];
|
|
2666
|
-
d_o = isoBandNextOTL[cval];
|
|
2667
|
-
break;
|
|
2668
|
-
default:
|
|
2669
|
-
e = isoBandEdgeTR[cval];
|
|
2670
|
-
d_x = isoBandNextXTR[cval];
|
|
2671
|
-
d_y = isoBandNextYTR[cval];
|
|
2672
|
-
d_o = isoBandNextOTR[cval];
|
|
2673
|
-
break;
|
|
2674
|
-
}
|
|
2675
|
-
break;
|
|
2676
|
-
case 1:
|
|
2677
|
-
switch (o) {
|
|
2678
|
-
case 0:
|
|
2679
|
-
e = isoBandEdgeBL[cval];
|
|
2680
|
-
d_x = isoBandNextXBL[cval];
|
|
2681
|
-
d_y = isoBandNextYBL[cval];
|
|
2682
|
-
d_o = isoBandNextOBL[cval];
|
|
2683
|
-
break;
|
|
2684
|
-
default:
|
|
2685
|
-
e = isoBandEdgeBR[cval];
|
|
2686
|
-
d_x = isoBandNextXBR[cval];
|
|
2687
|
-
d_y = isoBandNextYBR[cval];
|
|
2688
|
-
d_o = isoBandNextOBR[cval];
|
|
2689
|
-
break;
|
|
2690
|
-
}
|
|
2691
|
-
break;
|
|
2692
|
-
}
|
|
2693
|
-
break;
|
|
2694
|
-
}
|
|
2695
|
-
id_x = cell.edges.indexOf(e);
|
|
2696
|
-
if (typeof cell.edges[id_x] !== "undefined") {
|
|
2697
|
-
deleteEdge(cell, id_x);
|
|
2698
|
-
} else {
|
|
2699
|
-
return null;
|
|
2700
|
-
}
|
|
2701
|
-
cval = cell.cval_real;
|
|
2702
|
-
switch (e) {
|
|
2703
|
-
case 0:
|
|
2704
|
-
if (cval & Node1) {
|
|
2705
|
-
x = cell.topleft;
|
|
2706
|
-
y = 1;
|
|
2707
|
-
} else {
|
|
2708
|
-
x = 1;
|
|
2709
|
-
y = cell.righttop;
|
|
2710
|
-
}
|
|
2711
|
-
break;
|
|
2712
|
-
case 1:
|
|
2713
|
-
if (cval & Node2) {
|
|
2714
|
-
x = 1;
|
|
2715
|
-
y = cell.rightbottom;
|
|
2716
|
-
} else {
|
|
2717
|
-
x = cell.topleft;
|
|
2718
|
-
y = 1;
|
|
2719
|
-
}
|
|
2720
|
-
break;
|
|
2721
|
-
case 2:
|
|
2722
|
-
if (cval & Node2) {
|
|
2723
|
-
x = cell.topleft;
|
|
2724
|
-
y = 1;
|
|
2725
|
-
} else {
|
|
2726
|
-
x = cell.bottomright;
|
|
2727
|
-
y = 0;
|
|
2728
|
-
}
|
|
2729
|
-
break;
|
|
2730
|
-
case 3:
|
|
2731
|
-
if (cval & Node3) {
|
|
2732
|
-
x = cell.bottomleft;
|
|
2733
|
-
y = 0;
|
|
2734
|
-
} else {
|
|
2735
|
-
x = cell.topleft;
|
|
2736
|
-
y = 1;
|
|
2737
|
-
}
|
|
2738
|
-
break;
|
|
2739
|
-
case 4:
|
|
2740
|
-
if (cval & Node1) {
|
|
2741
|
-
x = cell.topright;
|
|
2742
|
-
y = 1;
|
|
2743
|
-
} else {
|
|
2744
|
-
x = 1;
|
|
2745
|
-
y = cell.righttop;
|
|
2746
|
-
}
|
|
2747
|
-
break;
|
|
2748
|
-
case 5:
|
|
2749
|
-
if (cval & Node2) {
|
|
2750
|
-
x = 1;
|
|
2751
|
-
y = cell.rightbottom;
|
|
2752
|
-
} else {
|
|
2753
|
-
x = cell.topright;
|
|
2754
|
-
y = 1;
|
|
2755
|
-
}
|
|
2756
|
-
break;
|
|
2757
|
-
case 6:
|
|
2758
|
-
if (cval & Node2) {
|
|
2759
|
-
x = cell.topright;
|
|
2760
|
-
y = 1;
|
|
2761
|
-
} else {
|
|
2762
|
-
x = cell.bottomright;
|
|
2763
|
-
y = 0;
|
|
2764
|
-
}
|
|
2765
|
-
break;
|
|
2766
|
-
case 7:
|
|
2767
|
-
if (cval & Node3) {
|
|
2768
|
-
x = cell.bottomleft;
|
|
2769
|
-
y = 0;
|
|
2770
|
-
} else {
|
|
2771
|
-
x = cell.topright;
|
|
2772
|
-
y = 1;
|
|
2773
|
-
}
|
|
2774
|
-
break;
|
|
2775
|
-
case 8:
|
|
2776
|
-
if (cval & Node2) {
|
|
2777
|
-
x = 1;
|
|
2778
|
-
y = cell.righttop;
|
|
2779
|
-
} else {
|
|
2780
|
-
x = cell.bottomright;
|
|
2781
|
-
y = 0;
|
|
2782
|
-
}
|
|
2783
|
-
break;
|
|
2784
|
-
case 9:
|
|
2785
|
-
if (cval & Node3) {
|
|
2786
|
-
x = cell.bottomleft;
|
|
2787
|
-
y = 0;
|
|
2788
|
-
} else {
|
|
2789
|
-
x = 1;
|
|
2790
|
-
y = cell.righttop;
|
|
2791
|
-
}
|
|
2792
|
-
break;
|
|
2793
|
-
case 10:
|
|
2794
|
-
if (cval & Node3) {
|
|
2795
|
-
x = 1;
|
|
2796
|
-
y = cell.righttop;
|
|
2797
|
-
} else {
|
|
2798
|
-
x = 0;
|
|
2799
|
-
y = cell.leftbottom;
|
|
2800
|
-
}
|
|
2801
|
-
break;
|
|
2802
|
-
case 11:
|
|
2803
|
-
if (cval & Node0) {
|
|
2804
|
-
x = 0;
|
|
2805
|
-
y = cell.lefttop;
|
|
2806
|
-
} else {
|
|
2807
|
-
x = 1;
|
|
2808
|
-
y = cell.righttop;
|
|
2809
|
-
}
|
|
2810
|
-
break;
|
|
2811
|
-
case 12:
|
|
2812
|
-
if (cval & Node2) {
|
|
2813
|
-
x = 1;
|
|
2814
|
-
y = cell.rightbottom;
|
|
2815
|
-
} else {
|
|
2816
|
-
x = cell.bottomright;
|
|
2817
|
-
y = 0;
|
|
2818
|
-
}
|
|
2819
|
-
break;
|
|
2820
|
-
case 13:
|
|
2821
|
-
if (cval & Node3) {
|
|
2822
|
-
x = cell.bottomleft;
|
|
2823
|
-
y = 0;
|
|
2824
|
-
} else {
|
|
2825
|
-
x = 1;
|
|
2826
|
-
y = cell.rightbottom;
|
|
2827
|
-
}
|
|
2828
|
-
break;
|
|
2829
|
-
case 14:
|
|
2830
|
-
if (cval & Node3) {
|
|
2831
|
-
x = 1;
|
|
2832
|
-
y = cell.rightbottom;
|
|
2833
|
-
} else {
|
|
2834
|
-
x = 0;
|
|
2835
|
-
y = cell.leftbottom;
|
|
2836
|
-
}
|
|
2837
|
-
break;
|
|
2838
|
-
case 15:
|
|
2839
|
-
if (cval & Node0) {
|
|
2840
|
-
x = 0;
|
|
2841
|
-
y = cell.lefttop;
|
|
2842
|
-
} else {
|
|
2843
|
-
x = 1;
|
|
2844
|
-
y = cell.rightbottom;
|
|
2845
|
-
}
|
|
2846
|
-
break;
|
|
2847
|
-
case 16:
|
|
2848
|
-
if (cval & Node2) {
|
|
2849
|
-
x = 0;
|
|
2850
|
-
y = cell.leftbottom;
|
|
2851
|
-
} else {
|
|
2852
|
-
x = cell.bottomright;
|
|
2853
|
-
y = 0;
|
|
2854
|
-
}
|
|
2855
|
-
break;
|
|
2856
|
-
case 17:
|
|
2857
|
-
if (cval & Node0) {
|
|
2858
|
-
x = 0;
|
|
2859
|
-
y = cell.lefttop;
|
|
2860
|
-
} else {
|
|
2861
|
-
x = cell.bottomright;
|
|
2862
|
-
y = 0;
|
|
2863
|
-
}
|
|
2864
|
-
break;
|
|
2865
|
-
case 18:
|
|
2866
|
-
if (cval & Node3) {
|
|
2867
|
-
x = cell.bottomleft;
|
|
2868
|
-
y = 0;
|
|
2869
|
-
} else {
|
|
2870
|
-
x = 0;
|
|
2871
|
-
y = cell.leftbottom;
|
|
2872
|
-
}
|
|
2873
|
-
break;
|
|
2874
|
-
case 19:
|
|
2875
|
-
if (cval & Node0) {
|
|
2876
|
-
x = 0;
|
|
2877
|
-
y = cell.lefttop;
|
|
2878
|
-
} else {
|
|
2879
|
-
x = cell.bottomleft;
|
|
2880
|
-
y = 0;
|
|
2881
|
-
}
|
|
2882
|
-
break;
|
|
2883
|
-
case 20:
|
|
2884
|
-
if (cval & Node0) {
|
|
2885
|
-
x = 0;
|
|
2886
|
-
y = cell.leftbottom;
|
|
2887
|
-
} else {
|
|
2888
|
-
x = cell.topleft;
|
|
2889
|
-
y = 1;
|
|
2890
|
-
}
|
|
2891
|
-
break;
|
|
2892
|
-
case 21:
|
|
2893
|
-
if (cval & Node1) {
|
|
2894
|
-
x = cell.topright;
|
|
2895
|
-
y = 1;
|
|
2896
|
-
} else {
|
|
2897
|
-
x = 0;
|
|
2898
|
-
y = cell.leftbottom;
|
|
2899
|
-
}
|
|
2900
|
-
break;
|
|
2901
|
-
case 22:
|
|
2902
|
-
if (cval & Node0) {
|
|
2903
|
-
x = 0;
|
|
2904
|
-
y = cell.lefttop;
|
|
2905
|
-
} else {
|
|
2906
|
-
x = cell.topleft;
|
|
2907
|
-
y = 1;
|
|
2908
|
-
}
|
|
2909
|
-
break;
|
|
2910
|
-
case 23:
|
|
2911
|
-
if (cval & Node1) {
|
|
2912
|
-
x = cell.topright;
|
|
2913
|
-
y = 1;
|
|
2914
|
-
} else {
|
|
2915
|
-
x = 0;
|
|
2916
|
-
y = cell.lefttop;
|
|
2917
|
-
}
|
|
2918
|
-
break;
|
|
2919
|
-
default:
|
|
2920
|
-
console.log("MarchingSquaresJS-isoBands: edge index out of range!");
|
|
2921
|
-
console.log(cell);
|
|
2922
|
-
return null;
|
|
2923
|
-
}
|
|
2924
|
-
if (typeof x === "undefined" || typeof y === "undefined" || typeof d_x === "undefined" || typeof d_y === "undefined" || typeof d_o === "undefined") {
|
|
2925
|
-
console.log("MarchingSquaresJS-isoBands: undefined value!");
|
|
2926
|
-
console.log(cell);
|
|
2927
|
-
console.log(x + " " + y + " " + d_x + " " + d_y + " " + d_o);
|
|
2928
|
-
}
|
|
2929
|
-
return { p: [x, y], x: d_x, y: d_y, o: d_o };
|
|
2930
|
-
}
|
|
2931
|
-
function BandGrid2Areas(grid) {
|
|
2932
|
-
var areas = [];
|
|
2933
|
-
var area_idx = 0;
|
|
2934
|
-
grid.cells.forEach(function(g, j) {
|
|
2935
|
-
g.forEach(function(gg, i) {
|
|
2936
|
-
if (typeof gg !== "undefined") {
|
|
2937
|
-
var a = polygon_table[gg.cval](gg);
|
|
2938
|
-
if (typeof a === "object" && isArray(a)) {
|
|
2939
|
-
if (typeof a[0] === "object" && isArray(a[0])) {
|
|
2940
|
-
if (typeof a[0][0] === "object" && isArray(a[0][0])) {
|
|
2941
|
-
a.forEach(function(aa) {
|
|
2942
|
-
aa.forEach(function(aaa) {
|
|
2943
|
-
aaa[0] += i;
|
|
2944
|
-
aaa[1] += j;
|
|
2945
|
-
});
|
|
2946
|
-
areas[area_idx++] = aa;
|
|
2947
|
-
});
|
|
2948
|
-
} else {
|
|
2949
|
-
a.forEach(function(aa) {
|
|
2950
|
-
aa[0] += i;
|
|
2951
|
-
aa[1] += j;
|
|
2952
|
-
});
|
|
2953
|
-
areas[area_idx++] = a;
|
|
2954
|
-
}
|
|
2955
|
-
} else {
|
|
2956
|
-
console.log(
|
|
2957
|
-
"MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates"
|
|
2958
|
-
);
|
|
2959
|
-
}
|
|
2960
|
-
} else {
|
|
2961
|
-
console.log(
|
|
2962
|
-
"MarchingSquaresJS-isoBands: bandcell polygon with null coordinates"
|
|
2963
|
-
);
|
|
2964
|
-
}
|
|
2965
|
-
}
|
|
2966
|
-
});
|
|
2967
|
-
});
|
|
2968
|
-
return areas;
|
|
2969
|
-
}
|
|
2970
|
-
function isobands(pointGrid, breaks, options) {
|
|
2971
|
-
options = options || {};
|
|
2972
|
-
if (!isObject(options))
|
|
2973
|
-
throw new Error("options is invalid");
|
|
2974
|
-
var zProperty = options.zProperty || "elevation";
|
|
2975
|
-
var commonProperties = options.commonProperties || {};
|
|
2976
|
-
var breaksProperties = options.breaksProperties || [];
|
|
2977
|
-
collectionOf(pointGrid, "Point", "Input must contain Points");
|
|
2978
|
-
if (!breaks)
|
|
2979
|
-
throw new Error("breaks is required");
|
|
2980
|
-
if (!Array.isArray(breaks))
|
|
2981
|
-
throw new Error("breaks is not an Array");
|
|
2982
|
-
if (!isObject(commonProperties))
|
|
2983
|
-
throw new Error("commonProperties is not an Object");
|
|
2984
|
-
if (!Array.isArray(breaksProperties))
|
|
2985
|
-
throw new Error("breaksProperties is not an Array");
|
|
2986
|
-
var matrix = gridToMatrix(pointGrid, { zProperty, flip: true });
|
|
2987
|
-
var contours = createContourLines(matrix, breaks, zProperty);
|
|
2988
|
-
contours = rescaleContours(contours, matrix, pointGrid);
|
|
2989
|
-
var multipolygons = contours.map(function(contour, index) {
|
|
2990
|
-
if (breaksProperties[index] && !isObject(breaksProperties[index])) {
|
|
2991
|
-
throw new Error("Each mappedProperty is required to be an Object");
|
|
2992
|
-
}
|
|
2993
|
-
var contourProperties = _objectAssign_4_1_1_objectAssign(
|
|
2994
|
-
{},
|
|
2995
|
-
commonProperties,
|
|
2996
|
-
breaksProperties[index]
|
|
2997
|
-
);
|
|
2998
|
-
contourProperties[zProperty] = contour[zProperty];
|
|
2999
|
-
var multiP = multiPolygon(contour.groupedRings, contourProperties);
|
|
3000
|
-
return multiP;
|
|
3001
|
-
});
|
|
3002
|
-
return featureCollection(multipolygons);
|
|
3003
|
-
}
|
|
3004
|
-
function createContourLines(matrix, breaks, property) {
|
|
3005
|
-
var contours = [];
|
|
3006
|
-
for (var i = 1; i < breaks.length; i++) {
|
|
3007
|
-
var lowerBand = +breaks[i - 1];
|
|
3008
|
-
var upperBand = +breaks[i];
|
|
3009
|
-
var isobandsCoords = isoBands(matrix, lowerBand, upperBand - lowerBand);
|
|
3010
|
-
var nestedRings = orderByArea(isobandsCoords);
|
|
3011
|
-
var groupedRings = groupNestedRings(nestedRings);
|
|
3012
|
-
var obj = {};
|
|
3013
|
-
obj["groupedRings"] = groupedRings;
|
|
3014
|
-
obj[property] = lowerBand + "-" + upperBand;
|
|
3015
|
-
contours.push(obj);
|
|
3016
|
-
}
|
|
3017
|
-
return contours;
|
|
3018
|
-
}
|
|
3019
|
-
function rescaleContours(contours, matrix, points) {
|
|
3020
|
-
var gridBbox = bbox(points);
|
|
3021
|
-
var originalWidth = gridBbox[2] - gridBbox[0];
|
|
3022
|
-
var originalHeigth = gridBbox[3] - gridBbox[1];
|
|
3023
|
-
var x0 = gridBbox[0];
|
|
3024
|
-
var y0 = gridBbox[1];
|
|
3025
|
-
var matrixWidth = matrix[0].length - 1;
|
|
3026
|
-
var matrixHeight = matrix.length - 1;
|
|
3027
|
-
var scaleX = originalWidth / matrixWidth;
|
|
3028
|
-
var scaleY = originalHeigth / matrixHeight;
|
|
3029
|
-
var resize = function(point) {
|
|
3030
|
-
point[0] = point[0] * scaleX + x0;
|
|
3031
|
-
point[1] = point[1] * scaleY + y0;
|
|
3032
|
-
};
|
|
3033
|
-
contours.forEach(function(contour) {
|
|
3034
|
-
contour.groupedRings.forEach(function(lineRingSet) {
|
|
3035
|
-
lineRingSet.forEach(function(lineRing) {
|
|
3036
|
-
lineRing.forEach(resize);
|
|
3037
|
-
});
|
|
3038
|
-
});
|
|
3039
|
-
});
|
|
3040
|
-
return contours;
|
|
3041
|
-
}
|
|
3042
|
-
function orderByArea(ringsCoords) {
|
|
3043
|
-
var ringsWithArea = [];
|
|
3044
|
-
var areas = [];
|
|
3045
|
-
ringsCoords.forEach(function(coords) {
|
|
3046
|
-
var ringArea = area(polygon([coords]));
|
|
3047
|
-
areas.push(ringArea);
|
|
3048
|
-
ringsWithArea.push({ ring: coords, area: ringArea });
|
|
3049
|
-
});
|
|
3050
|
-
areas.sort(function(a, b) {
|
|
3051
|
-
return b - a;
|
|
3052
|
-
});
|
|
3053
|
-
var orderedByArea = [];
|
|
3054
|
-
areas.forEach(function(area2) {
|
|
3055
|
-
for (var lr = 0; lr < ringsWithArea.length; lr++) {
|
|
3056
|
-
if (ringsWithArea[lr].area === area2) {
|
|
3057
|
-
orderedByArea.push(ringsWithArea[lr].ring);
|
|
3058
|
-
ringsWithArea.splice(lr, 1);
|
|
3059
|
-
break;
|
|
3060
|
-
}
|
|
3061
|
-
}
|
|
3062
|
-
});
|
|
3063
|
-
return orderedByArea;
|
|
3064
|
-
}
|
|
3065
|
-
function groupNestedRings(orderedLinearRings) {
|
|
3066
|
-
var lrList = orderedLinearRings.map(function(lr) {
|
|
3067
|
-
return { lrCoordinates: lr, grouped: false };
|
|
3068
|
-
});
|
|
3069
|
-
var groupedLinearRingsCoords = [];
|
|
3070
|
-
while (!allGrouped(lrList)) {
|
|
3071
|
-
for (var i = 0; i < lrList.length; i++) {
|
|
3072
|
-
if (!lrList[i].grouped) {
|
|
3073
|
-
var group = [];
|
|
3074
|
-
group.push(lrList[i].lrCoordinates);
|
|
3075
|
-
lrList[i].grouped = true;
|
|
3076
|
-
var outerMostPoly = polygon([lrList[i].lrCoordinates]);
|
|
3077
|
-
for (var j = i + 1; j < lrList.length; j++) {
|
|
3078
|
-
if (!lrList[j].grouped) {
|
|
3079
|
-
var lrPoly = polygon([lrList[j].lrCoordinates]);
|
|
3080
|
-
if (isInside(lrPoly, outerMostPoly)) {
|
|
3081
|
-
group.push(lrList[j].lrCoordinates);
|
|
3082
|
-
lrList[j].grouped = true;
|
|
3083
|
-
}
|
|
3084
|
-
}
|
|
3085
|
-
}
|
|
3086
|
-
groupedLinearRingsCoords.push(group);
|
|
3087
|
-
}
|
|
3088
|
-
}
|
|
3089
|
-
}
|
|
3090
|
-
return groupedLinearRingsCoords;
|
|
3091
|
-
}
|
|
3092
|
-
function isInside(testPolygon, targetPolygon) {
|
|
3093
|
-
var points = explode(testPolygon);
|
|
3094
|
-
for (var i = 0; i < points.features.length; i++) {
|
|
3095
|
-
if (!booleanPointInPolygon(points.features[i], targetPolygon)) {
|
|
3096
|
-
return false;
|
|
3097
|
-
}
|
|
3098
|
-
}
|
|
3099
|
-
return true;
|
|
3100
|
-
}
|
|
3101
|
-
function allGrouped(list) {
|
|
3102
|
-
for (var i = 0; i < list.length; i++) {
|
|
3103
|
-
if (list[i].grouped === false) {
|
|
3104
|
-
return false;
|
|
3105
|
-
}
|
|
3106
|
-
}
|
|
3107
|
-
return true;
|
|
3108
|
-
}
|
|
3109
|
-
export { isobands as i };
|