Comments (22)
I will mention that most of the axes do seem to touch the original location, which you can just barely make out if you squint.
______________
| |
here -> | . |
| |
| |
|______________|
Even if you don't have the answer, I'm sure the art is entertaining.
from earcut.
The outputs of the first polygon:
old:
[[50.01215521174626,14.55496454528594],[50.01090393810035,14.555661985922347],[50.00771654302379,14.551420549326107],[50.00771654302379,14.551420549326107],[50.007945135220254,14.543149917147526],[50.01147724395961,14.534995805038387],[50.0079122560409,14.522078321631612],[50.00033339477384,14.530019233038018],[49.996419426184396,14.518820477432536],[49.996419426184396,14.518820477432536],[49.99421923043172,14.519702498085207],[49.995973626740515,14.51736097179277],[49.99358217613555,14.514413410541792],[49.9919177885236,14.513750983893027],[49.99203433128207,14.50908923079979],[49.98751737478084,14.48499314843067],[49.98752622075485,14.488285741593486],[49.986050108332876,14.48801187669909],[49.98390401399266,14.474068792887328],[49.98012199569854,14.474300608045409],[49.98149940033203,14.467030298012869],[49.98149940033203,14.467030298012869],[49.974703576256054,14.465557903526244],[49.971303582829755,14.462410438524776],[49.971303582829755,14.462410438524776],[49.97169355705919,14.454707994242838],[49.97361994358572,14.451759308886388],[49.97349596418914,14.445537681511246],[49.96841089618041,14.43915253157319],[49.96431850371695,14.424316607401716],[49.96431850371695,14.424316607401716],[49.96482575086773,14.416942045077937],[49.9718684882602,14.402378853979904],[49.94735581607933,14.396133615586514],[49.94618599019203,14.396859224805468],[49.94231780527363,14.39622929044857],[49.94231780527363,14.39622929044857],[49.9438311814923,14.391410386668785],[49.949587628534964,14.388781556882028],[49.9495303648685,14.381108974511243],[49.9464869252427,14.374461015620584],[49.94773773161583,14.373308675345058],[49.95098984803754,14.366940999856116],[49.94761803042626,14.359776701897385],[49.948633536810505,14.35813809088685],[49.948633536810505,14.35813809088685],[49.9476356298342,14.338348714560748],[49.95230789908107,14.334972835865813],[49.95230789908107,14.334972835865813],[49.95572403028599,14.327403693925897],[49.95874556139773,14.32515983030359],[49.95874556139773,14.32515983030359],[49.9654821878067,14.32963054403104],[49.967474756310814,14.334447534504623],[49.97462790860305,14.34449595171506],[49.971130696526224,14.330872511840841],[49.97114260034338,14.327761249937573],[49.97114260034338,14.327761249937573],[49.972334063175786,14.327888286142553],[49.98087632420823,14.33915134106653],[49.984674000124684,14.338985577409915],[49.98772049095565,14.33498819458427],[49.990333383426105,14.34207825886545],[49.99359632289327,14.335120200350953],[49.993326817133266,14.334174946883087],[49.988830376673754,14.318386960508894],[49.99454669174765,14.313697571886529],[49.9944767635573,14.309980992885475],[49.99629019496875,14.307628744233291],[49.99629019496875,14.307628744233291],[49.99752316364247,14.302247058429058],[49.999491418122155,14.30182378215363],[49.999491418122155,14.30182378215363],[50.0020244405046,14.296061145980435],[50.004139881986696,14.300716830101203],[50.004139881986696,14.300716830101203],[50.01161310556263,14.30154910987471],[50.00690562989948,14.311413348749921],[50.02299571437602,14.317161223494788],[50.023962186762546,14.297851324553813],[50.0273351882106,14.288488308195783],[50.0273351882106,14.288488308195783],[50.031604439802905,14.28159248258282],[50.040851914793976,14.270596347996571],[50.040851914793976,14.270596347996571],[50.04233807626527,14.268547271983284],[50.04775814414931,14.269458356332077],[50.04775814414931,14.269458356332077],[50.04816948327118,14.267773371696892],[50.05091496761254,14.27286429425261],[50.054286952589436,14.2720997095035],[50.05240832198102,14.265139890922924],[50.05550566373035,14.26313881308763],[50.05550566373035,14.26313881308763],[50.05454808338047,14.258147016331618],[50.057657876107804,14.25638592323177],[50.057657876107804,14.25638592323177],[50.058561922190904,14.248681125294574],[50.06266371726475,14.248761789092878],[50.06504507251701,14.258674868076431],[50.07198956760158,14.258466053848776],[50.073095425009754,14.273796165129626],[50.071319465017076,14.278180130479415],[50.07398265835057,14.28054207955137],[50.07322345119468,14.290089404981138],[50.075209624038095,14.290371658529166],[50.076545505203434,14.289236001013956],[50.077571413567455,14.28836402894006],[50.077571413567455,14.28836402894006],[50.078175226629135,14.284570746133916],[50.081244561738714,14.284581067919172],[50.081244561738714,14.284581067919172],[50.080526703667275,14.27466280100924],[50.0876619955062,14.273042642595271],[50.0876619955062,14.273042642595271],[50.08626043334487,14.269466565365033],[50.08748859413834,14.262424486755302],[50.09612796763345,14.26127636762191],[50.098051171569075,14.255606564924598],[50.100432744870986,14.259375136879408],[50.10280818024786,14.244103404869891],[50.101030308975226,14.23746822551714],[50.102504388535515,14.233273407462866],[50.102504388535515,14.233273407462866],[50.100810728041345,14.227478550694743],[50.10212608534944,14.22535238537413],[50.10212608534944,14.22535238537413],[50.10390386663407,14.22563525893032],[50.10755221371553,14.239217815469765],[50.10755221371553,14.239217815469765],[50.11066490126964,14.237388449570155],[50.11211276715232,14.239654030158551],[50.11211276715232,14.239654030158551],[50.11168691485693,14.242486529079548],[50.11032939618565,14.245862324131785],[50.112703844535694,14.256311641507159],[50.11377625872042,14.25521372510608],[50.11505420987109,14.257714513326084],[50.11384924582723,14.260065071315847],[50.11771123472607,14.272841606686908],[50.1195423955044,14.279591050869243],[50.12108401684564,14.298009781393581],[50.124803281272335,14.295648304642093],[50.12721113383763,14.301250696219258],[50.12721113383763,14.301250696219258],[50.13022409220262,14.301951260378354],[50.13033586023138,14.306549270810088],[50.1284717788491,14.311488225255983],[50.128398855952184,14.316258327373648],[50.12459575054799,14.316364033981001],[50.12459575054799,14.316364033981001],[50.119115437683256,14.318766483330952],[50.11499558074735,14.320571797626958],[50.11499558074735,14.320571797626958],[50.116823091070884,14.327922839927233],[50.116165848897595,14.354522746480798],[50.116165848897595,14.354522746480798],[50.11598025983589,14.36199129874899],[50.11596511225967,14.36259889822089],[50.11596511225967,14.36259889822089],[50.12426242500129,14.355370381935968],[50.129774492935745,14.35927335692329],[50.129774492935745,14.35927335692329],[50.129580467456364,14.357092990054277],[50.131042254937086,14.35706586050462],[50.131042254937086,14.35706586050462],[50.1369834508272,14.35470574394884],[50.13877189800746,14.357361222067464],[50.13877189800746,14.357361222067464],[50.14081185258991,14.356927081323933],[50.14792208306549,14.364821192979235],[50.14792208306549,14.364821192979235],[50.148056772126445,14.37236331203878],[50.14575897392064,14.381035594461936],[50.14575897392064,14.381035594461936],[50.14678034896312,14.38599973367516],[50.14195164869344,14.39398102828298],[50.14195164869344,14.39398102828298],[50.143995073195626,14.398904839533698],[50.14415178257846,14.40037269592389],[50.14415178257846,14.40037269592389],[50.1479349371489,14.401072379953874],[50.14729445496897,14.406651069744267],[50.14980732804761,14.421456831654755],[50.15304109954503,14.421546632526807],[50.153001911630504,14.429012234196826],[50.153001911630504,14.429012234196826],[50.15833542205189,14.428362781026259],[50.15735709520717,14.4418534011309],[50.15735709520717,14.4418534011309],[50.15872844054035,14.460769296933055],[50.15904074239428,14.46508437959544],[50.15904074239428,14.46508437959544],[50.16491256862865,14.464366474483413],[50.165147279162554,14.467034234957497],[50.165147279162554,14.467034234957497],[50.169382579239,14.46721028684171],[50.169655925507186,14.479507651150827],[50.169655925507186,14.479507651150827],[50.17253428538819,14.479526948409298],[50.17181072669359,14.498579503885091],[50.17098765058769,14.507410764269391],[50.17369881925974,14.509977799684432],[50.173633269506254,14.51907660342001],[50.173633269506254,14.51907660342001],[50.17737095069891,14.526848955743732],[50.17686780106832,14.533544352441252],[50.17686780106832,14.533544352441252],[50.166957301384464,14.533502339252951],[50.166222647015324,14.53157872758728],[50.16154637661338,14.533624187502776],[50.164337801723995,14.539896282589641],[50.16253534107128,14.542114889543795],[50.163064995525644,14.545999316637031],[50.16563714624274,14.54906435012126],[50.1626554033645,14.553368150991995],[50.1626554033645,14.553368150991995],[50.16133158744141,14.560454919514056],[50.15568662434476,14.564083126117108],[50.149898196084514,14.563462184165955],[50.15162146078119,14.566890813242868],[50.14988144595255,14.569414015358156],[50.14959799909944,14.579602472419895],[50.153578625228604,14.585207206928946],[50.15403962908179,14.589570651017748],[50.15403962908179,14.589570651017748],[50.1540327717072,14.598786101554072],[50.14851024044644,14.593595726067798],[50.145232774727035,14.58772556199647],[50.14203202927461,14.591505341046863],[50.1397937568235,14.590597337937817],[50.1294682594472,14.601794101885968],[50.128329978617714,14.605461118556542],[50.12667002761788,14.61080841418883],[50.12667002761788,14.61080841418883],[50.129529886138485,14.620918993451694],[50.12740691501881,14.622213742084742],[50.12740691501881,14.622213742084742],[50.129691146954556,14.633245590529835],[50.12428755264961,14.635865514267236],[50.12428755264961,14.635865514267236],[50.12282344094283,14.658801088509563],[50.10700258018815,14.65765023913748],[50.103183216344924,14.665945471518503],[50.104683517998296,14.668192332099743],[50.102347276798895,14.676020926836452],[50.102347276798895,14.676020926836452],[50.100582882784934,14.691228803313148],[50.09912776569539,14.688868977562818],[50.09614896641987,14.688934805121361],[50.0958836987262,14.68997538384165],[50.09257414938793,14.702938757931769],[50.09257414938793,14.702938757931769],[50.087226302958,14.70657142748322],[50.07241668773493,14.700077739555976],[50.07166064213808,14.689511710759616],[50.07110179862724,14.688606155171275],[50.06525441514498,14.670987726942625],[50.06364389491786,14.660119664058913],[50.063338863118176,14.659339505870376],[50.062770182337786,14.65788420111878],[50.062770182337786,14.65788420111878],[50.06183050580245,14.658767328038554],[50.062115407700055,14.651679183920342],[50.062115407700055,14.651679183920342],[50.05986969846174,14.65151754364777],[50.060274656546994,14.644668692762302],[50.060274656546994,14.644668692762302],[50.05859231597226,14.645355822478223],[50.056965074004744,14.641023660168571],[50.04343905133679,14.64909443842832],[50.048895458314306,14.654066840527848],[50.04532449629786,14.66039703943909],[50.04532449629786,14.66039703943909],[50.038917342862376,14.666558503744339],[50.03763617085487,14.658104984594857],[50.02595884938369,14.662462471642561],[50.01927774802021,14.669192141433776],[50.0162995417417,14.668532129409149],[50.0162995417417,14.668532129409149],[50.01425792526074,14.66850069293905],[50.01293187862234,14.661483591276731],[50.01293187862234,14.661483591276731],[50.007680072203506,14.662017646504458],[50.00419226506526,14.65809243753774],[50.00810410592283,14.649473043774844],[50.00404246517899,14.645684223384565],[50.006477689266184,14.64478705622538],[50.00584355224569,14.64019500038602],[49.99953886178802,14.648152084668999],[49.994611718001664,14.641237463370128],[49.99656716698598,14.63470792743096],[49.99560005087195,14.628377086803146],[49.998314305173864,14.621504153438215],[49.998314305173864,14.621504153438215],[49.996981385917536,14.620051834909338],[49.99847020933847,14.617271044462473],[49.99847020933847,14.617271044462473],[49.99765626866424,14.616440324724572],[50.000061924058336,14.612205879677937],[50.000061924058336,14.612205879677937],[49.99893297025462,14.611873994913196],[49.9999883976335,14.60841557946813],[50.00286431249747,14.607892260529322],[50.00184225813284,14.605010488143552],[50.010000523250184,14.602945896543398],[50.010000523250184,14.602945896543398],[50.00774905245988,14.595430284150074],[50.010833620902226,14.59560939187596],[50.010833620902226,14.59560939187596],[50.008547518580585,14.588456649414418],[50.01084675606323,14.587614891465146],[50.012257904042684,14.587097704850034],[50.01149539731253,14.583036573214647],[50.016146138742045,14.583408631519722],[50.01260435323492,14.575599877834579],[50.00770881859146,14.569244627125006],[50.01206105569959,14.562395986119219],[50.01215521174626,14.55496454528594],[50.00771654302379,14.551420549326107],[50.01147724395961,14.534995805038387],[50.0079122560409,14.522078321631612],[49.996419426184396,14.518820477432536],[49.995973626740515,14.51736097179277],[49.995973626740515,14.51736097179277],[49.99358217613555,14.514413410541792],[49.99203433128207,14.50908923079979],[49.98751737478084,14.48499314843067],[49.986050108332876,14.48801187669909],[49.98390401399266,14.474068792887328],[49.98149940033203,14.467030298012869],[49.971303582829755,14.462410438524776],[49.97361994358572,14.451759308886388],[49.97349596418914,14.445537681511246],[49.96431850371695,14.424316607401716],[49.9718684882602,14.402378853979904],[49.952517282080116,14.393345768303345],[49.94735581607933,14.396133615586514],[49.94231780527363,14.39622929044857],[49.9495303648685,14.381108974511243],[49.94773773161583,14.373308675345058],[49.94989226943106,14.371323473253339],[49.95098984803754,14.366940999856116],[49.948633536810505,14.35813809088685],[49.95230789908107,14.334972835865813],[49.95230789908107,14.334972835865813],[49.95874556139773,14.32515983030359],[49.967474756310814,14.334447534504623],[49.97462790860305,14.34449595171506],[49.97114260034338,14.327761249937573],[49.98087632420823,14.33915134106653],[49.98087632420823,14.33915134106653],[49.984674000124684,14.338985577409915],[49.990333383426105,14.34207825886545],[49.99359632289327,14.335120200350953],[49.988830376673754,14.318386960508894],[49.99454669174765,14.313697571886529],[49.99454669174765,14.313697571886529],[49.99629019496875,14.307628744233291],[49.999491418122155,14.30182378215363],[49.999491418122155,14.30182378215363],[50.004139881986696,14.300716830101203],[50.00690562989948,14.311413348749921],[50.02299571437602,14.317161223494788],[50.0273351882106,14.288488308195783],[50.040851914793976,14.270596347996571],[50.040851914793976,14.270596347996571],[50.04775814414931,14.269458356332077],[50.05091496761254,14.27286429425261],[50.054286952589436,14.2720997095035],[50.05550566373035,14.26313881308763],[50.057657876107804,14.25638592323177],[50.057657876107804,14.25638592323177],[50.06266371726475,14.248761789092878],[50.0628457749345,14.254110566264702],[50.06504507251701,14.258674868076431],[50.073095425009754,14.273796165129626],[50.071319465017076,14.278180130479415],[50.0876619955062,14.273042642595271],[50.08748859413834,14.262424486755302],[50.09612796763345,14.26127636762191],[50.10414428959627,14.252392186320213],[50.10280818024786,14.244103404869891],[50.102504388535515,14.233273407462866],[50.102504388535515,14.233273407462866],[50.10212608534944,14.22535238537413],[50.10755221371553,14.239217815469765],[50.10755221371553,14.239217815469765],[50.11211276715232,14.239654030158551],[50.11032939618565,14.245862324131785],[50.112703844535694,14.256311641507159],[50.11505420987109,14.257714513326084],[50.11384924582723,14.260065071315847],[50.11384924582723,14.260065071315847],[50.1195423955044,14.279591050869243],[50.11564787164902,14.286576392964113],[50.12108401684564,14.298009781393581],[50.12721113383763,14.301250696219258],[50.13033586023138,14.306549270810088],[50.13033586023138,14.306549270810088],[50.1284717788491,14.311488225255983],[50.12459575054799,14.316364033981001],[50.11499558074735,14.320571797626958],[50.116165848897595,14.354522746480798],[50.11596511225967,14.36259889822089],[50.129774492935745,14.35927335692329],[50.131042254937086,14.35706586050462],[50.13877189800746,14.357361222067464],[50.13877189800746,14.357361222067464],[50.14792208306549,14.364821192979235],[50.14575897392064,14.381035594461936],[50.14415178257846,14.40037269592389],[50.14729445496897,14.406651069744267],[50.149465555986296,14.421447023567833],[50.149465555986296,14.421447023567833],[50.14980732804761,14.421456831654755],[50.153001911630504,14.429012234196826],[50.153001911630504,14.429012234196826],[50.15735709520717,14.4418534011309],[50.15904074239428,14.46508437959544],[50.15904074239428,14.46508437959544],[50.165147279162554,14.467034234957497],[50.169655925507186,14.479507651150827],[50.169655925507186,14.479507651150827],[50.17181072669359,14.498579503885091],[50.17098765058769,14.507410764269391],[50.17098765058769,14.507410764269391],[50.173633269506254,14.51907660342001],[50.17686780106832,14.533544352441252],[50.16253534107128,14.542114889543795],[50.163064995525644,14.545999316637031],[50.1626554033645,14.553368150991995],[50.1626554033645,14.553368150991995],[50.15568662434476,14.564083126117108],[50.154771108234186,14.560970049396861],[50.149898196084514,14.563462184165955],[50.14988144595255,14.569414015358156],[50.14959799909944,14.579602472419895],[50.14959799909944,14.579602472419895],[50.15403962908179,14.589570651017748],[50.14851024044644,14.593595726067798],[50.12667002761788,14.61080841418883],[50.12740691501881,14.622213742084742],[50.12428755264961,14.635865514267236],[50.103183216344924,14.665945471518503],[50.102347276798895,14.676020926836452],[50.09912776569539,14.688868977562818],[50.09614896641987,14.688934805121361],[50.09257414938793,14.702938757931769],[50.07241668773493,14.700077739555976],[50.07166064213808,14.689511710759616],[50.06525441514498,14.670987726942625],[50.06364389491786,14.660119664058913],[50.06364389491786,14.660119664058913],[50.062770182337786,14.65788420111878],[50.062115407700055,14.651679183920342],[50.04174398081665,14.6439791558789],[50.04343905133679,14.64909443842832],[50.04532449629786,14.66039703943909],[50.03187686051607,14.657505286565314],[50.02595884938369,14.662462471642561],[50.0162995417417,14.668532129409149],[50.01293187862234,14.661483591276731],[50.00419226506526,14.65809243753774],[50.0087407277356,14.650066941405884],[50.0087407277356,14.650066941405884],[50.00810410592283,14.649473043774844],[50.006477689266184,14.64478705622538],[50.00584355224569,14.64019500038602],[49.994611718001664,14.641237463370128],[49.99656716698598,14.63470792743096],[49.998314305173864,14.621504153438215],[49.99847020933847,14.617271044462473],[50.000061924058336,14.612205879677937],[50.000061924058336,14.612205879677937],[49.9999883976335,14.60841557946813],[50.00160559168214,14.608936313366387],[50.00160559168214,14.608936313366387],[50.00286431249747,14.607892260529322],[50.010000523250184,14.602945896543398],[50.010833620902226,14.59560939187596],[50.01084675606323,14.587614891465146],[50.012257904042684,14.587097704850034],[50.013579072879786,14.576865483813584],[50.01260435323492,14.575599877834579],[50.01206105569959,14.562395986119219],[50.0079122560409,14.522078321631612],[49.995973626740515,14.51736097179277],[49.99203433128207,14.50908923079979],[49.992559481799795,14.48559642307117],[49.98751737478084,14.48499314843067],[49.98390401399266,14.474068792887328],[49.98149940033203,14.467030298012869],[49.97361994358572,14.451759308886388],[49.97349596418914,14.445537681511246],[49.97349596418914,14.445537681511246],[49.9718684882602,14.402378853979904],[49.971941289316064,14.402227845029456],[49.952517282080116,14.393345768303345],[49.94231780527363,14.39622929044857],[49.949587628534964,14.388781556882028],[49.949587628534964,14.388781556882028],[49.9495303648685,14.381108974511243],[49.94989226943106,14.371323473253339],[49.95098984803754,14.366940999856116],[49.95230789908107,14.334972835865813],[49.967474756310814,14.334447534504623],[49.97242134523336,14.34682275750543],[49.97462790860305,14.34449595171506],[49.98087632420823,14.33915134106653],[49.99359632289327,14.335120200350953],[49.99454669174765,14.313697571886529],[49.999491418122155,14.30182378215363],[50.02299571437602,14.317161223494788],[50.040851914793976,14.270596347996571],[50.05091496761254,14.27286429425261],[50.054286952589436,14.2720997095035],[50.057657876107804,14.25638592323177],[50.0628457749345,14.254110566264702],[50.0628457749345,14.254110566264702],[50.06504507251701,14.258674868076431],[50.071319465017076,14.278180130479415],[50.081244561738714,14.284581067919172],[50.0876619955062,14.273042642595271],[50.09612796763345,14.26127636762191],[50.10414428959627,14.252392186320213],[50.102504388535515,14.233273407462866],[50.10755221371553,14.239217815469765],[50.10755221371553,14.239217815469765],[50.11032939618565,14.245862324131785],[50.112703844535694,14.256311641507159],[50.112703844535694,14.256311641507159],[50.11384924582723,14.260065071315847],[50.11564787164902,14.286576392964113],[50.12108401684564,14.298009781393581],[50.13033586023138,14.306549270810088],[50.12459575054799,14.316364033981001],[50.11596511225967,14.36259889822089],[50.129774492935745,14.35927335692329],[50.13877189800746,14.357361222067464],[50.13877189800746,14.357361222067464],[50.14575897392064,14.381035594461936],[50.14195164869344,14.39398102828298],[50.14195164869344,14.39398102828298],[50.14415178257846,14.40037269592389],[50.149465555986296,14.421447023567833],[50.149465555986296,14.421447023567833],[50.153001911630504,14.429012234196826],[50.15904074239428,14.46508437959544],[50.15904074239428,14.46508437959544],[50.169655925507186,14.479507651150827],[50.17098765058769,14.507410764269391],[50.17098765058769,14.507410764269391],[50.17686780106832,14.533544352441252],[50.166222647015324,14.53157872758728],[50.16154637661338,14.533624187502776],[50.16253534107128,14.542114889543795],[50.1626554033645,14.553368150991995],[50.1626554033645,14.553368150991995],[50.154771108234186,14.560970049396861],[50.149898196084514,14.563462184165955],[50.149898196084514,14.563462184165955],[50.14959799909944,14.579602472419895],[50.14851024044644,14.593595726067798],[50.12667002761788,14.61080841418883],[50.12428755264961,14.635865514267236],[50.10700258018815,14.65765023913748],[50.103183216344924,14.665945471518503],[50.09912776569539,14.688868977562818],[50.09614896641987,14.688934805121361],[50.09614896641987,14.688934805121361],[50.07241668773493,14.700077739555976],[50.07166064213808,14.689511710759616],[50.07166064213808,14.689511710759616],[50.06364389491786,14.660119664058913],[50.062115407700055,14.651679183920342],[50.04174398081665,14.6439791558789],[50.04532449629786,14.66039703943909],[50.03763617085487,14.658104984594857],[50.03187686051607,14.657505286565314],[50.0162995417417,14.668532129409149],[50.01293187862234,14.661483591276731],[50.0087407277356,14.650066941405884],[50.006477689266184,14.64478705622538],[50.00584355224569,14.64019500038602],[50.00584355224569,14.64019500038602],[49.99656716698598,14.63470792743096],[49.998314305173864,14.621504153438215],[49.998314305173864,14.621504153438215],[50.000061924058336,14.612205879677937],[50.00160559168214,14.608936313366387],[50.010000523250184,14.602945896543398],[50.010833620902226,14.59560939187596],[50.012257904042684,14.587097704850034],[50.016146138742045,14.583408631519722],[50.013579072879786,14.576865483813584],[50.01206105569959,14.562395986119219],[50.0079122560409,14.522078321631612],[49.99203433128207,14.50908923079979],[49.997422706899684,14.506590734181568],[49.992559481799795,14.48559642307117],[49.98390401399266,14.474068792887328],[49.98149940033203,14.467030298012869],[49.98149940033203,14.467030298012869],[49.97349596418914,14.445537681511246],[49.971941289316064,14.402227845029456],[49.97136397512963,14.4002262494845],[49.952517282080116,14.393345768303345],[49.949587628534964,14.388781556882028],[49.949587628534964,14.388781556882028],[49.94989226943106,14.371323473253339],[49.95098984803754,14.366940999856116],[49.95098984803754,14.366940999856116],[49.967474756310814,14.334447534504623],[49.965523719098385,14.341759285760174],[49.97242134523336,14.34682275750543],[49.98087632420823,14.33915134106653],[49.990333383426105,14.34207825886545],[49.99359632289327,14.335120200350953],[49.999491418122155,14.30182378215363],[50.00690562989948,14.311413348749921],[50.02299571437602,14.317161223494788],[50.05091496761254,14.27286429425261],[50.054286952589436,14.2720997095035],[50.054286952589436,14.2720997095035],[50.0628457749345,14.254110566264702],[50.071319465017076,14.278180130479415],[50.081244561738714,14.284581067919172],[50.09612796763345,14.26127636762191],[50.100432744870986,14.259375136879408],[50.10414428959627,14.252392186320213],[50.10755221371553,14.239217815469765],[50.112703844535694,14.256311641507159],[50.11589192201234,14.287089964206471],[50.12108401684564,14.298009781393581],[50.12459575054799,14.316364033981001],[50.11596511225967,14.36259889822089],[50.13877189800746,14.357361222067464],[50.14195164869344,14.39398102828298],[50.14195164869344,14.39398102828298],[50.149465555986296,14.421447023567833],[50.15904074239428,14.46508437959544],[50.15904074239428,14.46508437959544],[50.17098765058769,14.507410764269391],[50.166222647015324,14.53157872758728],[50.16154637661338,14.533624187502776],[50.1626554033645,14.553368150991995],[50.149898196084514,14.563462184165955],[50.149898196084514,14.563462184165955],[50.14851024044644,14.593595726067798],[50.145232774727035,14.58772556199647],[50.1294682594472,14.601794101885968],[50.12667002761788,14.61080841418883],[50.10700258018815,14.65765023913748],[50.103183216344924,14.665945471518503],[50.09614896641987,14.688934805121361],[50.07166064213808,14.689511710759616],[50.04174398081665,14.6439791558789],[50.03763617085487,14.658104984594857],[50.03187686051607,14.657505286565314],[50.03187686051607,14.657505286565314],[50.01293187862234,14.661483591276731],[50.0087407277356,14.650066941405884],[50.00584355224569,14.64019500038602],[49.998314305173864,14.621504153438215],[50.00160559168214,14.608936313366387],[50.010000523250184,14.602945896543398],[50.012257904042684,14.587097704850034],[50.016146138742045,14.583408631519722],[50.016146138742045,14.583408631519722],[50.01206105569959,14.562395986119219],[50.01215521174626,14.55496454528594],[50.0079122560409,14.522078321631612],[49.997422706899684,14.506590734181568],[49.992559481799795,14.48559642307117],[49.992559481799795,14.48559642307117],[49.98149940033203,14.467030298012869],[49.971941289316064,14.402227845029456],[49.97136397512963,14.4002262494845],[49.949587628534964,14.388781556882028],[49.95098984803754,14.366940999856116],[49.95098984803754,14.366940999856116],[49.965523719098385,14.341759285760174],[49.972349721870465,14.346770415195262],[49.990333383426105,14.34207825886545],[49.99359632289327,14.335120200350953],[50.00690562989948,14.311413348749921],[50.02299571437602,14.317161223494788],[50.054286952589436,14.2720997095035],[50.071319465017076,14.278180130479415],[50.100432744870986,14.259375136879408],[50.10414428959627,14.252392186320213],[50.112703844535694,14.256311641507159],[50.11564787164902,14.286576392964113],[50.11589192201234,14.287089964206471],[50.12459575054799,14.316364033981001],[50.11596511225967,14.36259889822089],[50.14195164869344,14.39398102828298],[50.15904074239428,14.46508437959544],[50.15904074239428,14.46508437959544],[50.166222647015324,14.53157872758728],[50.16154637661338,14.533624187502776],[50.149898196084514,14.563462184165955],[50.145232774727035,14.58772556199647],[50.1397937568235,14.590597337937817],[50.12952720010847,14.601604409760409],[50.1294682594472,14.601794101885968],[50.10700258018815,14.65765023913748],[50.10700258018815,14.65765023913748],[50.103183216344924,14.665945471518503],[50.07166064213808,14.689511710759616],[50.04174398081665,14.6439791558789],[50.03187686051607,14.657505286565314],[50.0087407277356,14.650066941405884],[50.0087407277356,14.650066941405884],[50.00584355224569,14.64019500038602],[50.00160559168214,14.608936313366387],[50.016146138742045,14.583408631519722],[50.01215521174626,14.55496454528594],[50.01147724395961,14.534995805038387],[50.0079122560409,14.522078321631612],[49.992559481799795,14.48559642307117],[49.971941289316064,14.402227845029456],[49.97136397512963,14.4002262494845],[49.95098984803754,14.366940999856116],[49.972349721870465,14.346770415195262],[49.990333383426105,14.34207825886545],[50.00690562989948,14.311413348749921],[50.02299571437602,14.317161223494788],[50.02299571437602,14.317161223494788],[50.071319465017076,14.278180130479415],[50.07322345119468,14.290089404981138],[50.081244561738714,14.284581067919172],[50.100432744870986,14.259375136879408],[50.112703844535694,14.256311641507159],[50.11564787164902,14.286576392964113],[50.12459575054799,14.316364033981001],[50.11499558074735,14.320571797626958],[50.11596511225967,14.36259889822089],[50.15904074239428,14.46508437959544],[50.16154637661338,14.533624187502776],[50.149898196084514,14.563462184165955],[50.1397937568235,14.590597337937817],[50.13440172777793,14.595262678708764],[50.12952720010847,14.601604409760409],[50.10700258018815,14.65765023913748],[50.07166064213808,14.689511710759616],[50.0487559272131,14.640514260688915],[50.04174398081665,14.6439791558789],[50.0087407277356,14.650066941405884],[50.0087407277356,14.650066941405884],[50.00160559168214,14.608936313366387],[50.010000523250184,14.602945896543398],[50.0104688207128,14.52908356552079],[50.0079122560409,14.522078321631612],[49.971941289316064,14.402227845029456],[49.971941289316064,14.402227845029456],[49.97136397512963,14.4002262494845],[49.972349721870465,14.346770415195262],[49.990333383426105,14.34207825886545],[50.02299571437602,14.317161223494788],[50.07322345119468,14.290089404981138],[50.077571413567455,14.28836402894006],[50.081244561738714,14.284581067919172],[50.112703844535694,14.256311641507159],[50.112703844535694,14.256311641507159],[50.11564787164902,14.286576392964113],[50.11499558074735,14.320571797626958],[50.11596511225967,14.36259889822089],[50.16154637661338,14.533624187502776],[50.149898196084514,14.563462184165955],[50.149898196084514,14.563462184165955],[50.13440172777793,14.595262678708764],[50.12952720010847,14.601604409760409],[50.12952720010847,14.601604409760409],[50.07166064213808,14.689511710759616],[50.062115407700055,14.651679183920342],[50.0487559272131,14.640514260688915],[50.0087407277356,14.650066941405884],[50.010000523250184,14.602945896543398],[50.0104688207128,14.52908356552079],[49.971941289316064,14.402227845029456],[49.972349721870465,14.346770415195262],[49.990333383426105,14.34207825886545],[50.07322345119468,14.290089404981138],[50.075209624038095,14.290371658529166],[50.077571413567455,14.28836402894006],[50.112703844535694,14.256311641507159],[50.11499558074735,14.320571797626958],[50.11596511225967,14.36259889822089],[50.149898196084514,14.563462184165955],[50.12952720010847,14.601604409760409],[50.12952720010847,14.601604409760409],[50.062115407700055,14.651679183920342],[50.060274656546994,14.644668692762302],[50.04906490218909,14.64053333258701],[50.0487559272131,14.640514260688915],[50.010000523250184,14.602945896543398],[50.0104688207128,14.52908356552079],[49.972349721870465,14.346770415195262],[49.97242134523336,14.34682275750543],[50.075209624038095,14.290371658529166],[50.077571413567455,14.28836402894006],[50.11499558074735,14.320571797626958],[50.11596511225967,14.36259889822089],[50.12952720010847,14.601604409760409],[50.060274656546994,14.644668692762302],[50.056965074004744,14.641023660168571],[50.04906490218909,14.64053333258701],[50.010000523250184,14.602945896543398],[50.0104688207128,14.52908356552079],[49.97242134523336,14.34682275750543],[49.990333383426105,14.34207825886545],[49.990333383426105,14.34207825886545],[50.075209624038095,14.290371658529166],[50.11499558074735,14.320571797626958],[50.11499558074735,14.320571797626958],[50.11596511225967,14.36259889822089],[50.060274656546994,14.644668692762302],[50.056965074004744,14.641023660168571],[50.010000523250184,14.602945896543398],[50.016146138742045,14.583408631519722],[50.011430429685966,14.534720548681266],[50.0104688207128,14.52908356552079],[49.990333383426105,14.34207825886545],[49.990333383426105,14.34207825886545],[50.11499558074735,14.320571797626958],[50.060274656546994,14.644668692762302],[50.060274656546994,14.644668692762302],[50.056965074004744,14.641023660168571],[50.016146138742045,14.583408631519722],[50.01147724395961,14.534995805038387],[50.011430429685966,14.534720548681266],[49.990333383426105,14.34207825886545],[50.060274656546994,14.644668692762302],[50.016146138742045,14.583408631519722],[50.01147724395961,14.534995805038387],[50.01147724395961,14.534995805038387],[49.990333383426105,14.34207825886545],[50.060274656546994,14.644668692762302]]
new:
[1.5,0.5,139.5,139.5,138.5,137.5,137.5,136.5,135.5,135.5,134.5,133.5,133.5,132.5,131.5,131.5,130.5,129.5,129.5,128.5,127.5,127.5,126.5,125.5,125.5,124.5,123.5,123.5,122.5,121.5,121.5,120.5,119.5,119.5,118.5,117.5,117.5,116.5,115.5,115.5,114.5,113.5,113.5,112.5,111.5,111.5,110.5,109.5,109.5,108.5,107.5,107.5,106.5,105.5,105.5,104.5,103.5,103.5,102.5,101.5,101.5,100.5,99.5,99.5,98.5,97.5,97.5,96.5,95.5,95.5,94.5,93.5,93.5,92.5,91.5,91.5,90.5,89.5,89.5,88.5,87.5,87.5,86.5,85.5,85.5,84.5,83.5,83.5,82.5,81.5,81.5,80.5,79.5,79.5,78.5,77.5,77.5,76.5,75.5,75.5,74.5,73.5,73.5,72.5,71.5,71.5,70.5,69.5,69.5,68.5,67.5,67.5,66.5,65.5,65.5,64.5,63.5,63.5,62.5,61.5,61.5,60.5,59.5,59.5,58.5,57.5,57.5,56.5,55.5,55.5,54.5,53.5,53.5,52.5,51.5,51.5,50.5,49.5,49.5,48.5,47.5,47.5,46.5,45.5,45.5,44.5,43.5,43.5,42.5,41.5,41.5,40.5,39.5,39.5,38.5,37.5,37.5,36.5,35.5,35.5,34.5,33.5,33.5,32.5,31.5,31.5,30.5,29.5,29.5,28.5,27.5,27.5,26.5,25.5,25.5,24.5,23.5,23.5,22.5,21.5,21.5,20.5,19.5,19.5,18.5,17.5,17.5,16.5,15.5,15.5,14.5,13.5,13.5,12.5,11.5,11.5,10.5,9.5,9.5,8.5,7.5,7.5,6.5,5.5,5.5,4.5,3.5,3.5,2.5,1.5,1.5,139.5,137.5,137.5,135.5,133.5,133.5,131.5,129.5,129.5,127.5,125.5,125.5,123.5,121.5,121.5,119.5,117.5,117.5,115.5,113.5,113.5,111.5,109.5,109.5,107.5,105.5,105.5,103.5,101.5,101.5,99.5,97.5,97.5,95.5,93.5,93.5,91.5,89.5,89.5,87.5,85.5,85.5,83.5,81.5,81.5,79.5,77.5,77.5,75.5,73.5,73.5,71.5,69.5,69.5,67.5,65.5,65.5,63.5,61.5,61.5,59.5,57.5,57.5,55.5,53.5,53.5,51.5,49.5,49.5,47.5,45.5,45.5,43.5,41.5,41.5,39.5,37.5,37.5,35.5,33.5,33.5,31.5,29.5,29.5,27.5,25.5,25.5,23.5,21.5,21.5,19.5,17.5,17.5,15.5,13.5,13.5,11.5,9.5,9.5,7.5,5.5,5.5,3.5,1.5,1.5,137.5,133.5,133.5,129.5,125.5,125.5,121.5,117.5,117.5,113.5,109.5,109.5,105.5,101.5,101.5,97.5,93.5,93.5,89.5,85.5,85.5,81.5,77.5,77.5,73.5,69.5,69.5,65.5,61.5,61.5,57.5,53.5,53.5,49.5,45.5,45.5,41.5,37.5,37.5,33.5,29.5,29.5,25.5,21.5,21.5,17.5,13.5,13.5,9.5,5.5,5.5,1.5,133.5,133.5,125.5,117.5,117.5,109.5,101.5,101.5,93.5,85.5,85.5,77.5,69.5,69.5,61.5,53.5,53.5,45.5,37.5,37.5,29.5,21.5,21.5,13.5,5.5,5.5,133.5,117.5,117.5,101.5,85.5,85.5,69.5,53.5,53.5,37.5,21.5,21.5,5.5,117.5,117.5,85.5,53.5,53.5,21.5,117.5]
?
from earcut.
The outputs of the first triangle
You mean the inputs of the first polygon?
from earcut.
Can you try using this function for flattening https://github.com/mapbox/earcut/blob/master/test/test.js#L85-L101 and seeing if it works? Perhaps some indices math mismatch.
from earcut.
I'm getting ready to try it, and thank you for pointing out my error, indeed I meant polygon (corrected). I'm curious, though, if the points are all longitudes and latitudes of a certain type, why would there be an index starting at: [1.5,0.5,...
? I plan on posting my findings here. We will get through this one together!
from earcut.
Looks like part of the problem is this:
pixel = L.glify.latLonToPixelXY(triangles[i], triangles[i + 1]);
Since triangles are indices to rawVerts
elements, you can't convert them to pixels like that - they're indices, not coordinate values.
But I still don't get why would the indices be non-integer (0.5, etc.). Can you provide an exact sample array input to earcut that produces such a weird result?
from earcut.
I need to cross reference them to get their pixels, how would you suggest I do that?
from earcut.
Here is the input file: https://github.com/robertleeplummerjr/Leaflet.glify/blob/master/CZDistricts.json
from earcut.
I need to cross reference them to get their pixels, how would you suggest I do that?
Take a look at how the viz script does that. Something like toPixel(rawVerts[triangles[i]], rawVerts[triangles[i] + 1])
.
from earcut.
Using that exact code does help a bit. Progress:
More very enjoyable art. I'm sure I'll figure it out, thanks for the help.
from earcut.
Will it matter if I give coordinates vs pixels?
from earcut.
Ok, so I started from scratch with the original, and no glify code to simplify the process of upgrade, and I get the same results: http://rawgit.com/robertleeplummerjr/1437e67a5d5501748d1c/raw/09eb0c83cf9f7b26628247e13d51213915f431ef/index.html
from earcut.
Gist here: https://gist.github.com/robertleeplummerjr/1437e67a5d5501748d1c
from earcut.
@robertleeplummerjr here's how you should use the returned indices: https://github.com/mapbox/earcut/blob/master/viz/viz.js#L59
from earcut.
I believe I've updated it to reflect the above, but I don't even get an output now: https://gist.github.com/robertleeplummerjr/1437e67a5d5501748d1c
I'm flattening data here: https://gist.github.com/robertleeplummerjr/1437e67a5d5501748d1c#file-index-html-L142
I'm using the preferred return index here: https://gist.github.com/robertleeplummerjr/1437e67a5d5501748d1c#file-index-html-L148
I'm also still using the same means of plotting the points that I used 1.4 here: https://gist.github.com/robertleeplummerjr/1437e67a5d5501748d1c#file-index-html-L153
I'm sure I'm doing something wrong. Any more suggestions?
from earcut.
Eh, I'm afraid you'll have to go through the earcut viz script yourself and figure out why it produces correct visual output and yours doesn't. Don't give up :)
from earcut.
I don't get it. The script was practical with version 1.4.2, and now there is no known upgrade path from a completely working and perfectly valid geojson file? And how is this a closed issue? My point was not
answered, even it is me that needs to find the solution. Do you not feel anyone else will be upgrading from 1.4.2?
from earcut.
@robertleeplummerjr This is an open source project and @mourner has generously given you plenty of free guidance. All indications are this is a bug in your code -- it's time to step up to the plate and investigate the matter yourself.
from earcut.
challenge accepted.
from earcut.
working. Thanks for your help. robertleeplummerjr/Leaflet.glify@ff279f0#diff-d0afc23070fd2eeb72f8362e659b089dR723
from earcut.
Thank you for understanding! I didn't know the change could cause so much trouble, should have worked on a proper upgrade guide. What was the issue in the end? Flipped coordinates?
from earcut.
It all good. It ended up being flipped coordinates, and a lack of understanding what values were being returned from the call. No sweat, in fact have it working great here: http://robertleeplummerjr.github.io/Leaflet.glify/
Click on any poly. This should look familiar, it was originally created by @Sumbera. I just turned it into a lib.
For handling the latitude or longitude first, I ended up doing this: https://github.com/robertleeplummerjr/Leaflet.glify/blob/master/glify.js#L20 and this: https://github.com/robertleeplummerjr/Leaflet.glify/blob/master/glify.js#L628
So now I don't have to worry about it. Thanks for your hard work @mourner, and as well @jfirebaugh!
from earcut.
Related Issues (20)
- This my test data, will wrong.
- Another infinite loop
- Bug with vertical object in 3dim space HOT 1
- The result of dividing a plane triangle is [] HOT 2
- Triangle out of contour
- Failure with simple case in 3D HOT 2
- Another infinite loop, bridge node gets filtered out but still referenced HOT 3
- Update readme to clarify if vertices are output in clockwise or counterclockwise order. HOT 4
- Is it acceptable for bridges to cross holes? HOT 3
- wrong triangulation HOT 1
- Bad triangulation with disjoint hole HOT 3
- Triangulation error
- Bug: Incorrect triangulation
- Typescript or JSDoc HOT 4
- Does the triangulation consider only 2 dimensions? HOT 1
- How do I use a polygon with Steiner points HOT 2
- Provide appropriate full examples HOT 2
- Incorrect triangulation with a shape in a hole HOT 1
- Trouble Understanding Earcut's Polygon Interpretation
- Triangulation result is different from expectation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from earcut.