const frames = [{"kind":"points","caption":"16점 · 원 안 15 · π≈3.75","data":{"points":[[0.5675064628012478,0.2662253996822983],[0.14650599937886,0.9778140755370259],[0.7559511039871722,0.30583598790690303],[0.22043796931393445,0.21788522601127625],[0.01089441729709506,0.8671524606179446],[0.3924959064461291,0.20277963345870376],[0.643770927330479,0.12159829935990274],[0.2174331925343722,0.27663939469493926],[0.18950266088359058,0.2084743846207857],[0.26172577147372067,0.2861509616486728],[0.5272082956507802,0.1968867010436952],[0.3161495786625892,0.2794722046237439],[0.7172230063006282,0.39384063077159226],[0.22810186445713043,0.9649702589958906],[0.022309558233246207,0.561373841483146],[0.5633289813995361,0.9855060640256852]]}},{"kind":"points","caption":"32점 · 원 안 28 · π≈3.50","data":{"points":[[0.5675064628012478,0.2662253996822983],[0.14650599937886,0.9778140755370259],[0.7559511039871722,0.30583598790690303],[0.22043796931393445,0.21788522601127625],[0.01089441729709506,0.8671524606179446],[0.3924959064461291,0.20277963345870376],[0.643770927330479,0.12159829935990274],[0.2174331925343722,0.27663939469493926],[0.18950266088359058,0.2084743846207857],[0.26172577147372067,0.2861509616486728],[0.5272082956507802,0.1968867010436952],[0.3161495786625892,0.2794722046237439],[0.7172230063006282,0.39384063077159226],[0.22810186445713043,0.9649702589958906],[0.022309558233246207,0.561373841483146],[0.5633289813995361,0.9855060640256852],[0.03802243829704821,0.9398316519800574],[0.8024529365357012,0.8705305245239288],[0.8079806866589934,0.023662644671276212],[0.1356958132237196,0.7482356622349471],[0.8837344171479344,0.721113673876971],[0.5873848388437182,0.3168156440369785],[0.7560732192359865,0.48222293984144926],[0.5894963752944022,0.3268312537111342],[0.5578892691992223,0.6302459700964391],[0.06928226444870234,0.25569124845787883],[0.41361113800667226,0.20388634479604661],[0.6889062435366213,0.9785859487019479],[0.4212646253872663,0.585529243806377],[0.5557653806172311,0.7385778569150716],[0.9733625878579915,0.17624182882718742],[0.4202225219924003,0.05925825051963329]]}},{"kind":"points","caption":"48점 · 원 안 41 · π≈3.42","data":{"points":[[0.5675064628012478,0.2662253996822983],[0.14650599937886,0.9778140755370259],[0.7559511039871722,0.30583598790690303],[0.22043796931393445,0.21788522601127625],[0.01089441729709506,0.8671524606179446],[0.3924959064461291,0.20277963345870376],[0.643770927330479,0.12159829935990274],[0.2174331925343722,0.27663939469493926],[0.18950266088359058,0.2084743846207857],[0.26172577147372067,0.2861509616486728],[0.5272082956507802,0.1968867010436952],[0.3161495786625892,0.2794722046237439],[0.7172230063006282,0.39384063077159226],[0.22810186445713043,0.9649702589958906],[0.022309558233246207,0.561373841483146],[0.5633289813995361,0.9855060640256852],[0.03802243829704821,0.9398316519800574],[0.8024529365357012,0.8705305245239288],[0.8079806866589934,0.023662644671276212],[0.1356958132237196,0.7482356622349471],[0.8837344171479344,0.721113673876971],[0.5873848388437182,0.3168156440369785],[0.7560732192359865,0.48222293984144926],[0.5894963752944022,0.3268312537111342],[0.5578892691992223,0.6302459700964391],[0.06928226444870234,0.25569124845787883],[0.41361113800667226,0.20388634479604661],[0.6889062435366213,0.9785859487019479],[0.4212646253872663,0.585529243806377],[0.5557653806172311,0.7385778569150716],[0.9733625878579915,0.17624182882718742],[0.4202225219924003,0.05925825051963329],[0.4560812416020781,0.9548365527298301],[0.6106901280581951,0.04976183734834194],[0.13792114332318306,0.6782080226112157],[0.651649933308363,0.10210968018509448],[0.7857066625729203,0.0653874920681119],[0.6003602261189371,0.07369352434761822],[0.24534734012559056,0.9586415782105178],[0.25726186973042786,0.14141355780884624],[0.877454943722114,0.4096072167158127],[0.22392204031348228,0.9881245892029256],[0.41820390964858234,0.016290565254166722],[0.6360865305177867,0.9894509015139192],[0.10217616078443825,0.42584964889101684],[0.6714271956589073,0.39205087069422007],[0.01374565134756267,0.8364149704575539],[0.10123784351162612,0.6543647435028106]]}},{"kind":"points","caption":"64점 · 원 안 56 · π≈3.50","data":{"points":[[0.5675064628012478,0.2662253996822983],[0.14650599937886,0.9778140755370259],[0.7559511039871722,0.30583598790690303],[0.22043796931393445,0.21788522601127625],[0.01089441729709506,0.8671524606179446],[0.3924959064461291,0.20277963345870376],[0.643770927330479,0.12159829935990274],[0.2174331925343722,0.27663939469493926],[0.18950266088359058,0.2084743846207857],[0.26172577147372067,0.2861509616486728],[0.5272082956507802,0.1968867010436952],[0.3161495786625892,0.2794722046237439],[0.7172230063006282,0.39384063077159226],[0.22810186445713043,0.9649702589958906],[0.022309558233246207,0.561373841483146],[0.5633289813995361,0.9855060640256852],[0.03802243829704821,0.9398316519800574],[0.8024529365357012,0.8705305245239288],[0.8079806866589934,0.023662644671276212],[0.1356958132237196,0.7482356622349471],[0.8837344171479344,0.721113673876971],[0.5873848388437182,0.3168156440369785],[0.7560732192359865,0.48222293984144926],[0.5894963752944022,0.3268312537111342],[0.5578892691992223,0.6302459700964391],[0.06928226444870234,0.25569124845787883],[0.41361113800667226,0.20388634479604661],[0.6889062435366213,0.9785859487019479],[0.4212646253872663,0.585529243806377],[0.5557653806172311,0.7385778569150716],[0.9733625878579915,0.17624182882718742],[0.4202225219924003,0.05925825051963329],[0.4560812416020781,0.9548365527298301],[0.6106901280581951,0.04976183734834194],[0.13792114332318306,0.6782080226112157],[0.651649933308363,0.10210968018509448],[0.7857066625729203,0.0653874920681119],[0.6003602261189371,0.07369352434761822],[0.24534734012559056,0.9586415782105178],[0.25726186973042786,0.14141355780884624],[0.877454943722114,0.4096072167158127],[0.22392204031348228,0.9881245892029256],[0.41820390964858234,0.016290565254166722],[0.6360865305177867,0.9894509015139192],[0.10217616078443825,0.42584964889101684],[0.6714271956589073,0.39205087069422007],[0.01374565134756267,0.8364149704575539],[0.10123784351162612,0.6543647435028106],[0.554575523128733,0.6456948171835393],[0.2652329395059496,0.9272501615341753],[0.4708023378625512,0.4251888198778033],[0.38783333264291286,0.6500488233286887],[0.2422174047678709,0.09589959913864732],[0.9152328039053828,0.2815841173287481],[0.6641814946196973,0.16044684359803796],[0.3044070522300899,0.23885357659310102],[0.9931491643656045,0.22298962995409966],[0.017480072332546115,0.1486331473570317],[0.7500786292366683,0.5734668867662549],[0.7472430053167045,0.0646097925491631],[0.6102673595305532,0.12314638891257346],[0.07041332055814564,0.31451207282952964],[0.2645273783709854,0.2705606317613274],[0.8354397653602064,0.38468647957779467]]}},{"kind":"points","caption":"80점 · 원 안 69 · π≈3.45","data":{"points":[[0.5675064628012478,0.2662253996822983],[0.14650599937886,0.9778140755370259],[0.7559511039871722,0.30583598790690303],[0.22043796931393445,0.21788522601127625],[0.01089441729709506,0.8671524606179446],[0.3924959064461291,0.20277963345870376],[0.643770927330479,0.12159829935990274],[0.2174331925343722,0.27663939469493926],[0.18950266088359058,0.2084743846207857],[0.26172577147372067,0.2861509616486728],[0.5272082956507802,0.1968867010436952],[0.3161495786625892,0.2794722046237439],[0.7172230063006282,0.39384063077159226],[0.22810186445713043,0.9649702589958906],[0.022309558233246207,0.561373841483146],[0.5633289813995361,0.9855060640256852],[0.03802243829704821,0.9398316519800574],[0.8024529365357012,0.8705305245239288],[0.8079806866589934,0.023662644671276212],[0.1356958132237196,0.7482356622349471],[0.8837344171479344,0.721113673876971],[0.5873848388437182,0.3168156440369785],[0.7560732192359865,0.48222293984144926],[0.5894963752944022,0.3268312537111342],[0.5578892691992223,0.6302459700964391],[0.06928226444870234,0.25569124845787883],[0.41361113800667226,0.20388634479604661],[0.6889062435366213,0.9785859487019479],[0.4212646253872663,0.585529243806377],[0.5557653806172311,0.7385778569150716],[0.9733625878579915,0.17624182882718742],[0.4202225219924003,0.05925825051963329],[0.4560812416020781,0.9548365527298301],[0.6106901280581951,0.04976183734834194],[0.13792114332318306,0.6782080226112157],[0.651649933308363,0.10210968018509448],[0.7857066625729203,0.0653874920681119],[0.6003602261189371,0.07369352434761822],[0.24534734012559056,0.9586415782105178],[0.25726186973042786,0.14141355780884624],[0.877454943722114,0.4096072167158127],[0.22392204031348228,0.9881245892029256],[0.41820390964858234,0.016290565254166722],[0.6360865305177867,0.9894509015139192],[0.10217616078443825,0.42584964889101684],[0.6714271956589073,0.39205087069422007],[0.01374565134756267,0.8364149704575539],[0.10123784351162612,0.6543647435028106],[0.554575523128733,0.6456948171835393],[0.2652329395059496,0.9272501615341753],[0.4708023378625512,0.4251888198778033],[0.38783333264291286,0.6500488233286887],[0.2422174047678709,0.09589959913864732],[0.9152328039053828,0.2815841173287481],[0.6641814946196973,0.16044684359803796],[0.3044070522300899,0.23885357659310102],[0.9931491643656045,0.22298962995409966],[0.017480072332546115,0.1486331473570317],[0.7500786292366683,0.5734668867662549],[0.7472430053167045,0.0646097925491631],[0.6102673595305532,0.12314638891257346],[0.07041332055814564,0.31451207282952964],[0.2645273783709854,0.2705606317613274],[0.8354397653602064,0.38468647957779467],[0.38575612171553075,0.3391395432408899],[0.17259003059007227,0.7971322403755039],[0.05694502289406955,0.5285027974750847],[0.9123115430120379,0.8539599264040589],[0.14803742058575153,0.7483128935564309],[0.9353929308708757,0.33102619810961187],[0.7006629747338593,0.6293828589841723],[0.8946556427981704,0.21548877283930779],[0.5272993543185294,0.9137417816091329],[0.8798079325351864,0.5965705411508679],[0.7330523005221039,0.27300989837385714],[0.38323519635014236,0.681193636264652],[0.5654331289697438,0.31149753951467574],[0.06949397479183972,0.09421570249833167],[0.26811339193955064,0.840477640973404],[0.021766507532447577,0.8761444017291069]]}},{"kind":"points","caption":"96점 · 원 안 80 · π≈3.33","data":{"points":[[0.5675064628012478,0.2662253996822983],[0.14650599937886,0.9778140755370259],[0.7559511039871722,0.30583598790690303],[0.22043796931393445,0.21788522601127625],[0.01089441729709506,0.8671524606179446],[0.3924959064461291,0.20277963345870376],[0.643770927330479,0.12159829935990274],[0.2174331925343722,0.27663939469493926],[0.18950266088359058,0.2084743846207857],[0.26172577147372067,0.2861509616486728],[0.5272082956507802,0.1968867010436952],[0.3161495786625892,0.2794722046237439],[0.7172230063006282,0.39384063077159226],[0.22810186445713043,0.9649702589958906],[0.022309558233246207,0.561373841483146],[0.5633289813995361,0.9855060640256852],[0.03802243829704821,0.9398316519800574],[0.8024529365357012,0.8705305245239288],[0.8079806866589934,0.023662644671276212],[0.1356958132237196,0.7482356622349471],[0.8837344171479344,0.721113673876971],[0.5873848388437182,0.3168156440369785],[0.7560732192359865,0.48222293984144926],[0.5894963752944022,0.3268312537111342],[0.5578892691992223,0.6302459700964391],[0.06928226444870234,0.25569124845787883],[0.41361113800667226,0.20388634479604661],[0.6889062435366213,0.9785859487019479],[0.4212646253872663,0.585529243806377],[0.5557653806172311,0.7385778569150716],[0.9733625878579915,0.17624182882718742],[0.4202225219924003,0.05925825051963329],[0.4560812416020781,0.9548365527298301],[0.6106901280581951,0.04976183734834194],[0.13792114332318306,0.6782080226112157],[0.651649933308363,0.10210968018509448],[0.7857066625729203,0.0653874920681119],[0.6003602261189371,0.07369352434761822],[0.24534734012559056,0.9586415782105178],[0.25726186973042786,0.14141355780884624],[0.877454943722114,0.4096072167158127],[0.22392204031348228,0.9881245892029256],[0.41820390964858234,0.016290565254166722],[0.6360865305177867,0.9894509015139192],[0.10217616078443825,0.42584964889101684],[0.6714271956589073,0.39205087069422007],[0.01374565134756267,0.8364149704575539],[0.10123784351162612,0.6543647435028106],[0.554575523128733,0.6456948171835393],[0.2652329395059496,0.9272501615341753],[0.4708023378625512,0.4251888198778033],[0.38783333264291286,0.6500488233286887],[0.2422174047678709,0.09589959913864732],[0.9152328039053828,0.2815841173287481],[0.6641814946196973,0.16044684359803796],[0.3044070522300899,0.23885357659310102],[0.9931491643656045,0.22298962995409966],[0.017480072332546115,0.1486331473570317],[0.7500786292366683,0.5734668867662549],[0.7472430053167045,0.0646097925491631],[0.6102673595305532,0.12314638891257346],[0.07041332055814564,0.31451207282952964],[0.2645273783709854,0.2705606317613274],[0.8354397653602064,0.38468647957779467],[0.38575612171553075,0.3391395432408899],[0.17259003059007227,0.7971322403755039],[0.05694502289406955,0.5285027974750847],[0.9123115430120379,0.8539599264040589],[0.14803742058575153,0.7483128935564309],[0.9353929308708757,0.33102619810961187],[0.7006629747338593,0.6293828589841723],[0.8946556427981704,0.21548877283930779],[0.5272993543185294,0.9137417816091329],[0.8798079325351864,0.5965705411508679],[0.7330523005221039,0.27300989837385714],[0.38323519635014236,0.681193636264652],[0.5654331289697438,0.31149753951467574],[0.06949397479183972,0.09421570249833167],[0.26811339193955064,0.840477640973404],[0.021766507532447577,0.8761444017291069],[0.765622834675014,0.8819283086340874],[0.1852774526923895,0.21739206556230783],[0.553382596001029,0.7749594142660499],[0.3266948217060417,0.3640185738913715],[0.7033739492762834,0.986741540255025],[0.8058454131241888,0.0527230694424361],[0.5802146818023175,0.5885107358917594],[0.7415874530561268,0.25177024910226464],[0.55082728411071,0.20937379263341427],[0.9345726161263883,0.30446287081576884],[0.34275224595330656,0.38413915457203984],[0.8304063016548753,0.8484506765380502],[0.8588391400408,0.9702269798144698],[0.46585656981915236,0.8063519280403852],[0.40123127377592027,0.7837240982335061],[0.43144152988679707,0.9483258503023535]]}},{"kind":"points","caption":"112점 · 원 안 90 · π≈3.21","data":{"points":[[0.5675064628012478,0.2662253996822983],[0.14650599937886,0.9778140755370259],[0.7559511039871722,0.30583598790690303],[0.22043796931393445,0.21788522601127625],[0.01089441729709506,0.8671524606179446],[0.3924959064461291,0.20277963345870376],[0.643770927330479,0.12159829935990274],[0.2174331925343722,0.27663939469493926],[0.18950266088359058,0.2084743846207857],[0.26172577147372067,0.2861509616486728],[0.5272082956507802,0.1968867010436952],[0.3161495786625892,0.2794722046237439],[0.7172230063006282,0.39384063077159226],[0.22810186445713043,0.9649702589958906],[0.022309558233246207,0.561373841483146],[0.5633289813995361,0.9855060640256852],[0.03802243829704821,0.9398316519800574],[0.8024529365357012,0.8705305245239288],[0.8079806866589934,0.023662644671276212],[0.1356958132237196,0.7482356622349471],[0.8837344171479344,0.721113673876971],[0.5873848388437182,0.3168156440369785],[0.7560732192359865,0.48222293984144926],[0.5894963752944022,0.3268312537111342],[0.5578892691992223,0.6302459700964391],[0.06928226444870234,0.25569124845787883],[0.41361113800667226,0.20388634479604661],[0.6889062435366213,0.9785859487019479],[0.4212646253872663,0.585529243806377],[0.5557653806172311,0.7385778569150716],[0.9733625878579915,0.17624182882718742],[0.4202225219924003,0.05925825051963329],[0.4560812416020781,0.9548365527298301],[0.6106901280581951,0.04976183734834194],[0.13792114332318306,0.6782080226112157],[0.651649933308363,0.10210968018509448],[0.7857066625729203,0.0653874920681119],[0.6003602261189371,0.07369352434761822],[0.24534734012559056,0.9586415782105178],[0.25726186973042786,0.14141355780884624],[0.877454943722114,0.4096072167158127],[0.22392204031348228,0.9881245892029256],[0.41820390964858234,0.016290565254166722],[0.6360865305177867,0.9894509015139192],[0.10217616078443825,0.42584964889101684],[0.6714271956589073,0.39205087069422007],[0.01374565134756267,0.8364149704575539],[0.10123784351162612,0.6543647435028106],[0.554575523128733,0.6456948171835393],[0.2652329395059496,0.9272501615341753],[0.4708023378625512,0.4251888198778033],[0.38783333264291286,0.6500488233286887],[0.2422174047678709,0.09589959913864732],[0.9152328039053828,0.2815841173287481],[0.6641814946196973,0.16044684359803796],[0.3044070522300899,0.23885357659310102],[0.9931491643656045,0.22298962995409966],[0.017480072332546115,0.1486331473570317],[0.7500786292366683,0.5734668867662549],[0.7472430053167045,0.0646097925491631],[0.6102673595305532,0.12314638891257346],[0.07041332055814564,0.31451207282952964],[0.2645273783709854,0.2705606317613274],[0.8354397653602064,0.38468647957779467],[0.38575612171553075,0.3391395432408899],[0.17259003059007227,0.7971322403755039],[0.05694502289406955,0.5285027974750847],[0.9123115430120379,0.8539599264040589],[0.14803742058575153,0.7483128935564309],[0.9353929308708757,0.33102619810961187],[0.7006629747338593,0.6293828589841723],[0.8946556427981704,0.21548877283930779],[0.5272993543185294,0.9137417816091329],[0.8798079325351864,0.5965705411508679],[0.7330523005221039,0.27300989837385714],[0.38323519635014236,0.681193636264652],[0.5654331289697438,0.31149753951467574],[0.06949397479183972,0.09421570249833167],[0.26811339193955064,0.840477640973404],[0.021766507532447577,0.8761444017291069],[0.765622834675014,0.8819283086340874],[0.1852774526923895,0.21739206556230783],[0.553382596001029,0.7749594142660499],[0.3266948217060417,0.3640185738913715],[0.7033739492762834,0.986741540255025],[0.8058454131241888,0.0527230694424361],[0.5802146818023175,0.5885107358917594],[0.7415874530561268,0.25177024910226464],[0.55082728411071,0.20937379263341427],[0.9345726161263883,0.30446287081576884],[0.34275224595330656,0.38413915457203984],[0.8304063016548753,0.8484506765380502],[0.8588391400408,0.9702269798144698],[0.46585656981915236,0.8063519280403852],[0.40123127377592027,0.7837240982335061],[0.43144152988679707,0.9483258503023535],[0.4671557559631765,0.18921130988746881],[0.7115049206186086,0.7104930775240064],[0.5175008685328066,0.982673057820648],[0.50650668842718,0.2200995273888111],[0.5684159095399082,0.6755543372128159],[0.9925718780141324,0.8254077301826328],[0.016232003923505545,0.35611017094925046],[0.15826364047825336,0.47834573523141444],[0.049676462542265654,0.3000725272577256],[0.5502179639879614,0.9029143245425075],[0.8595612426288426,0.1830705653410405],[0.811022411333397,0.8776184658054262],[0.7479719494003803,0.11055980995297432],[0.16332280659116805,0.3120970206800848],[0.5802383201662451,0.9653353292960674],[0.23786660376936197,0.14017733838409185]]}},{"kind":"points","caption":"128점 · 원 안 102 · π≈3.19","data":{"points":[[0.5675064628012478,0.2662253996822983],[0.14650599937886,0.9778140755370259],[0.7559511039871722,0.30583598790690303],[0.22043796931393445,0.21788522601127625],[0.01089441729709506,0.8671524606179446],[0.3924959064461291,0.20277963345870376],[0.643770927330479,0.12159829935990274],[0.2174331925343722,0.27663939469493926],[0.18950266088359058,0.2084743846207857],[0.26172577147372067,0.2861509616486728],[0.5272082956507802,0.1968867010436952],[0.3161495786625892,0.2794722046237439],[0.7172230063006282,0.39384063077159226],[0.22810186445713043,0.9649702589958906],[0.022309558233246207,0.561373841483146],[0.5633289813995361,0.9855060640256852],[0.03802243829704821,0.9398316519800574],[0.8024529365357012,0.8705305245239288],[0.8079806866589934,0.023662644671276212],[0.1356958132237196,0.7482356622349471],[0.8837344171479344,0.721113673876971],[0.5873848388437182,0.3168156440369785],[0.7560732192359865,0.48222293984144926],[0.5894963752944022,0.3268312537111342],[0.5578892691992223,0.6302459700964391],[0.06928226444870234,0.25569124845787883],[0.41361113800667226,0.20388634479604661],[0.6889062435366213,0.9785859487019479],[0.4212646253872663,0.585529243806377],[0.5557653806172311,0.7385778569150716],[0.9733625878579915,0.17624182882718742],[0.4202225219924003,0.05925825051963329],[0.4560812416020781,0.9548365527298301],[0.6106901280581951,0.04976183734834194],[0.13792114332318306,0.6782080226112157],[0.651649933308363,0.10210968018509448],[0.7857066625729203,0.0653874920681119],[0.6003602261189371,0.07369352434761822],[0.24534734012559056,0.9586415782105178],[0.25726186973042786,0.14141355780884624],[0.877454943722114,0.4096072167158127],[0.22392204031348228,0.9881245892029256],[0.41820390964858234,0.016290565254166722],[0.6360865305177867,0.9894509015139192],[0.10217616078443825,0.42584964889101684],[0.6714271956589073,0.39205087069422007],[0.01374565134756267,0.8364149704575539],[0.10123784351162612,0.6543647435028106],[0.554575523128733,0.6456948171835393],[0.2652329395059496,0.9272501615341753],[0.4708023378625512,0.4251888198778033],[0.38783333264291286,0.6500488233286887],[0.2422174047678709,0.09589959913864732],[0.9152328039053828,0.2815841173287481],[0.6641814946196973,0.16044684359803796],[0.3044070522300899,0.23885357659310102],[0.9931491643656045,0.22298962995409966],[0.017480072332546115,0.1486331473570317],[0.7500786292366683,0.5734668867662549],[0.7472430053167045,0.0646097925491631],[0.6102673595305532,0.12314638891257346],[0.07041332055814564,0.31451207282952964],[0.2645273783709854,0.2705606317613274],[0.8354397653602064,0.38468647957779467],[0.38575612171553075,0.3391395432408899],[0.17259003059007227,0.7971322403755039],[0.05694502289406955,0.5285027974750847],[0.9123115430120379,0.8539599264040589],[0.14803742058575153,0.7483128935564309],[0.9353929308708757,0.33102619810961187],[0.7006629747338593,0.6293828589841723],[0.8946556427981704,0.21548877283930779],[0.5272993543185294,0.9137417816091329],[0.8798079325351864,0.5965705411508679],[0.7330523005221039,0.27300989837385714],[0.38323519635014236,0.681193636264652],[0.5654331289697438,0.31149753951467574],[0.06949397479183972,0.09421570249833167],[0.26811339193955064,0.840477640973404],[0.021766507532447577,0.8761444017291069],[0.765622834675014,0.8819283086340874],[0.1852774526923895,0.21739206556230783],[0.553382596001029,0.7749594142660499],[0.3266948217060417,0.3640185738913715],[0.7033739492762834,0.986741540255025],[0.8058454131241888,0.0527230694424361],[0.5802146818023175,0.5885107358917594],[0.7415874530561268,0.25177024910226464],[0.55082728411071,0.20937379263341427],[0.9345726161263883,0.30446287081576884],[0.34275224595330656,0.38413915457203984],[0.8304063016548753,0.8484506765380502],[0.8588391400408,0.9702269798144698],[0.46585656981915236,0.8063519280403852],[0.40123127377592027,0.7837240982335061],[0.43144152988679707,0.9483258503023535],[0.4671557559631765,0.18921130988746881],[0.7115049206186086,0.7104930775240064],[0.5175008685328066,0.982673057820648],[0.50650668842718,0.2200995273888111],[0.5684159095399082,0.6755543372128159],[0.9925718780141324,0.8254077301826328],[0.016232003923505545,0.35611017094925046],[0.15826364047825336,0.47834573523141444],[0.049676462542265654,0.3000725272577256],[0.5502179639879614,0.9029143245425075],[0.8595612426288426,0.1830705653410405],[0.811022411333397,0.8776184658054262],[0.7479719494003803,0.11055980995297432],[0.16332280659116805,0.3120970206800848],[0.5802383201662451,0.9653353292960674],[0.23786660376936197,0.14017733838409185],[0.5308834442403167,0.10385214723646641],[0.08649746375158429,0.4978997546713799],[0.8304374215658754,0.8165310760959983],[0.15111011872068048,0.44774369010701776],[0.8226141454651952,0.6388169955462217],[0.1478734880220145,0.5407866430468857],[0.9652995720971376,0.6506718904711306],[0.447638054843992,0.18832693388685584],[0.5996713337954134,0.5802417267113924],[0.1702942573465407,0.7839153341483325],[0.7468569020275027,0.9968675056006759],[0.4234501966275275,0.884206019109115],[0.25436983723193407,0.5393157463986427],[0.8752324266824871,0.2654541567899287],[0.16346216946840286,0.14226602739654481],[0.6488617626018822,0.19852779433131218]]}},{"kind":"points","caption":"144점 · 원 안 114 · π≈3.17","data":{"points":[[0.5675064628012478,0.2662253996822983],[0.14650599937886,0.9778140755370259],[0.7559511039871722,0.30583598790690303],[0.22043796931393445,0.21788522601127625],[0.01089441729709506,0.8671524606179446],[0.3924959064461291,0.20277963345870376],[0.643770927330479,0.12159829935990274],[0.2174331925343722,0.27663939469493926],[0.18950266088359058,0.2084743846207857],[0.26172577147372067,0.2861509616486728],[0.5272082956507802,0.1968867010436952],[0.3161495786625892,0.2794722046237439],[0.7172230063006282,0.39384063077159226],[0.22810186445713043,0.9649702589958906],[0.022309558233246207,0.561373841483146],[0.5633289813995361,0.9855060640256852],[0.03802243829704821,0.9398316519800574],[0.8024529365357012,0.8705305245239288],[0.8079806866589934,0.023662644671276212],[0.1356958132237196,0.7482356622349471],[0.8837344171479344,0.721113673876971],[0.5873848388437182,0.3168156440369785],[0.7560732192359865,0.48222293984144926],[0.5894963752944022,0.3268312537111342],[0.5578892691992223,0.6302459700964391],[0.06928226444870234,0.25569124845787883],[0.41361113800667226,0.20388634479604661],[0.6889062435366213,0.9785859487019479],[0.4212646253872663,0.585529243806377],[0.5557653806172311,0.7385778569150716],[0.9733625878579915,0.17624182882718742],[0.4202225219924003,0.05925825051963329],[0.4560812416020781,0.9548365527298301],[0.6106901280581951,0.04976183734834194],[0.13792114332318306,0.6782080226112157],[0.651649933308363,0.10210968018509448],[0.7857066625729203,0.0653874920681119],[0.6003602261189371,0.07369352434761822],[0.24534734012559056,0.9586415782105178],[0.25726186973042786,0.14141355780884624],[0.877454943722114,0.4096072167158127],[0.22392204031348228,0.9881245892029256],[0.41820390964858234,0.016290565254166722],[0.6360865305177867,0.9894509015139192],[0.10217616078443825,0.42584964889101684],[0.6714271956589073,0.39205087069422007],[0.01374565134756267,0.8364149704575539],[0.10123784351162612,0.6543647435028106],[0.554575523128733,0.6456948171835393],[0.2652329395059496,0.9272501615341753],[0.4708023378625512,0.4251888198778033],[0.38783333264291286,0.6500488233286887],[0.2422174047678709,0.09589959913864732],[0.9152328039053828,0.2815841173287481],[0.6641814946196973,0.16044684359803796],[0.3044070522300899,0.23885357659310102],[0.9931491643656045,0.22298962995409966],[0.017480072332546115,0.1486331473570317],[0.7500786292366683,0.5734668867662549],[0.7472430053167045,0.0646097925491631],[0.6102673595305532,0.12314638891257346],[0.07041332055814564,0.31451207282952964],[0.2645273783709854,0.2705606317613274],[0.8354397653602064,0.38468647957779467],[0.38575612171553075,0.3391395432408899],[0.17259003059007227,0.7971322403755039],[0.05694502289406955,0.5285027974750847],[0.9123115430120379,0.8539599264040589],[0.14803742058575153,0.7483128935564309],[0.9353929308708757,0.33102619810961187],[0.7006629747338593,0.6293828589841723],[0.8946556427981704,0.21548877283930779],[0.5272993543185294,0.9137417816091329],[0.8798079325351864,0.5965705411508679],[0.7330523005221039,0.27300989837385714],[0.38323519635014236,0.681193636264652],[0.5654331289697438,0.31149753951467574],[0.06949397479183972,0.09421570249833167],[0.26811339193955064,0.840477640973404],[0.021766507532447577,0.8761444017291069],[0.765622834675014,0.8819283086340874],[0.1852774526923895,0.21739206556230783],[0.553382596001029,0.7749594142660499],[0.3266948217060417,0.3640185738913715],[0.7033739492762834,0.986741540255025],[0.8058454131241888,0.0527230694424361],[0.5802146818023175,0.5885107358917594],[0.7415874530561268,0.25177024910226464],[0.55082728411071,0.20937379263341427],[0.9345726161263883,0.30446287081576884],[0.34275224595330656,0.38413915457203984],[0.8304063016548753,0.8484506765380502],[0.8588391400408,0.9702269798144698],[0.46585656981915236,0.8063519280403852],[0.40123127377592027,0.7837240982335061],[0.43144152988679707,0.9483258503023535],[0.4671557559631765,0.18921130988746881],[0.7115049206186086,0.7104930775240064],[0.5175008685328066,0.982673057820648],[0.50650668842718,0.2200995273888111],[0.5684159095399082,0.6755543372128159],[0.9925718780141324,0.8254077301826328],[0.016232003923505545,0.35611017094925046],[0.15826364047825336,0.47834573523141444],[0.049676462542265654,0.3000725272577256],[0.5502179639879614,0.9029143245425075],[0.8595612426288426,0.1830705653410405],[0.811022411333397,0.8776184658054262],[0.7479719494003803,0.11055980995297432],[0.16332280659116805,0.3120970206800848],[0.5802383201662451,0.9653353292960674],[0.23786660376936197,0.14017733838409185],[0.5308834442403167,0.10385214723646641],[0.08649746375158429,0.4978997546713799],[0.8304374215658754,0.8165310760959983],[0.15111011872068048,0.44774369010701776],[0.8226141454651952,0.6388169955462217],[0.1478734880220145,0.5407866430468857],[0.9652995720971376,0.6506718904711306],[0.447638054843992,0.18832693388685584],[0.5996713337954134,0.5802417267113924],[0.1702942573465407,0.7839153341483325],[0.7468569020275027,0.9968675056006759],[0.4234501966275275,0.884206019109115],[0.25436983723193407,0.5393157463986427],[0.8752324266824871,0.2654541567899287],[0.16346216946840286,0.14226602739654481],[0.6488617626018822,0.19852779433131218],[0.9202242502942681,0.959955339320004],[0.07302091899327934,0.7012548977509141],[0.6763668982312083,0.4793872772715986],[0.49705359200015664,0.9952717190608382],[0.5616388421040028,0.3053796966560185],[0.48840014077723026,0.8056502901017666],[0.09736100351437926,0.24149807542562485],[0.6310735784936696,0.8584145554341376],[0.3070940144825727,0.7670392533764243],[0.7860699009615928,0.8527469413820654],[0.16040976834483445,0.18668065103702247],[0.4859544299542904,0.5906381167005748],[0.3680307420436293,0.397234650561586],[0.7006684497464448,0.03152657556347549],[0.3354543827008456,0.2330197759438306],[0.6497347766999155,0.178086097817868]]}},{"kind":"points","caption":"160점 · 원 안 126 · π≈3.15","data":{"points":[[0.5675064628012478,0.2662253996822983],[0.14650599937886,0.9778140755370259],[0.7559511039871722,0.30583598790690303],[0.22043796931393445,0.21788522601127625],[0.01089441729709506,0.8671524606179446],[0.3924959064461291,0.20277963345870376],[0.643770927330479,0.12159829935990274],[0.2174331925343722,0.27663939469493926],[0.18950266088359058,0.2084743846207857],[0.26172577147372067,0.2861509616486728],[0.5272082956507802,0.1968867010436952],[0.3161495786625892,0.2794722046237439],[0.7172230063006282,0.39384063077159226],[0.22810186445713043,0.9649702589958906],[0.022309558233246207,0.561373841483146],[0.5633289813995361,0.9855060640256852],[0.03802243829704821,0.9398316519800574],[0.8024529365357012,0.8705305245239288],[0.8079806866589934,0.023662644671276212],[0.1356958132237196,0.7482356622349471],[0.8837344171479344,0.721113673876971],[0.5873848388437182,0.3168156440369785],[0.7560732192359865,0.48222293984144926],[0.5894963752944022,0.3268312537111342],[0.5578892691992223,0.6302459700964391],[0.06928226444870234,0.25569124845787883],[0.41361113800667226,0.20388634479604661],[0.6889062435366213,0.9785859487019479],[0.4212646253872663,0.585529243806377],[0.5557653806172311,0.7385778569150716],[0.9733625878579915,0.17624182882718742],[0.4202225219924003,0.05925825051963329],[0.4560812416020781,0.9548365527298301],[0.6106901280581951,0.04976183734834194],[0.13792114332318306,0.6782080226112157],[0.651649933308363,0.10210968018509448],[0.7857066625729203,0.0653874920681119],[0.6003602261189371,0.07369352434761822],[0.24534734012559056,0.9586415782105178],[0.25726186973042786,0.14141355780884624],[0.877454943722114,0.4096072167158127],[0.22392204031348228,0.9881245892029256],[0.41820390964858234,0.016290565254166722],[0.6360865305177867,0.9894509015139192],[0.10217616078443825,0.42584964889101684],[0.6714271956589073,0.39205087069422007],[0.01374565134756267,0.8364149704575539],[0.10123784351162612,0.6543647435028106],[0.554575523128733,0.6456948171835393],[0.2652329395059496,0.9272501615341753],[0.4708023378625512,0.4251888198778033],[0.38783333264291286,0.6500488233286887],[0.2422174047678709,0.09589959913864732],[0.9152328039053828,0.2815841173287481],[0.6641814946196973,0.16044684359803796],[0.3044070522300899,0.23885357659310102],[0.9931491643656045,0.22298962995409966],[0.017480072332546115,0.1486331473570317],[0.7500786292366683,0.5734668867662549],[0.7472430053167045,0.0646097925491631],[0.6102673595305532,0.12314638891257346],[0.07041332055814564,0.31451207282952964],[0.2645273783709854,0.2705606317613274],[0.8354397653602064,0.38468647957779467],[0.38575612171553075,0.3391395432408899],[0.17259003059007227,0.7971322403755039],[0.05694502289406955,0.5285027974750847],[0.9123115430120379,0.8539599264040589],[0.14803742058575153,0.7483128935564309],[0.9353929308708757,0.33102619810961187],[0.7006629747338593,0.6293828589841723],[0.8946556427981704,0.21548877283930779],[0.5272993543185294,0.9137417816091329],[0.8798079325351864,0.5965705411508679],[0.7330523005221039,0.27300989837385714],[0.38323519635014236,0.681193636264652],[0.5654331289697438,0.31149753951467574],[0.06949397479183972,0.09421570249833167],[0.26811339193955064,0.840477640973404],[0.021766507532447577,0.8761444017291069],[0.765622834675014,0.8819283086340874],[0.1852774526923895,0.21739206556230783],[0.553382596001029,0.7749594142660499],[0.3266948217060417,0.3640185738913715],[0.7033739492762834,0.986741540255025],[0.8058454131241888,0.0527230694424361],[0.5802146818023175,0.5885107358917594],[0.7415874530561268,0.25177024910226464],[0.55082728411071,0.20937379263341427],[0.9345726161263883,0.30446287081576884],[0.34275224595330656,0.38413915457203984],[0.8304063016548753,0.8484506765380502],[0.8588391400408,0.9702269798144698],[0.46585656981915236,0.8063519280403852],[0.40123127377592027,0.7837240982335061],[0.43144152988679707,0.9483258503023535],[0.4671557559631765,0.18921130988746881],[0.7115049206186086,0.7104930775240064],[0.5175008685328066,0.982673057820648],[0.50650668842718,0.2200995273888111],[0.5684159095399082,0.6755543372128159],[0.9925718780141324,0.8254077301826328],[0.016232003923505545,0.35611017094925046],[0.15826364047825336,0.47834573523141444],[0.049676462542265654,0.3000725272577256],[0.5502179639879614,0.9029143245425075],[0.8595612426288426,0.1830705653410405],[0.811022411333397,0.8776184658054262],[0.7479719494003803,0.11055980995297432],[0.16332280659116805,0.3120970206800848],[0.5802383201662451,0.9653353292960674],[0.23786660376936197,0.14017733838409185],[0.5308834442403167,0.10385214723646641],[0.08649746375158429,0.4978997546713799],[0.8304374215658754,0.8165310760959983],[0.15111011872068048,0.44774369010701776],[0.8226141454651952,0.6388169955462217],[0.1478734880220145,0.5407866430468857],[0.9652995720971376,0.6506718904711306],[0.447638054843992,0.18832693388685584],[0.5996713337954134,0.5802417267113924],[0.1702942573465407,0.7839153341483325],[0.7468569020275027,0.9968675056006759],[0.4234501966275275,0.884206019109115],[0.25436983723193407,0.5393157463986427],[0.8752324266824871,0.2654541567899287],[0.16346216946840286,0.14226602739654481],[0.6488617626018822,0.19852779433131218],[0.9202242502942681,0.959955339320004],[0.07302091899327934,0.7012548977509141],[0.6763668982312083,0.4793872772715986],[0.49705359200015664,0.9952717190608382],[0.5616388421040028,0.3053796966560185],[0.48840014077723026,0.8056502901017666],[0.09736100351437926,0.24149807542562485],[0.6310735784936696,0.8584145554341376],[0.3070940144825727,0.7670392533764243],[0.7860699009615928,0.8527469413820654],[0.16040976834483445,0.18668065103702247],[0.4859544299542904,0.5906381167005748],[0.3680307420436293,0.397234650561586],[0.7006684497464448,0.03152657556347549],[0.3354543827008456,0.2330197759438306],[0.6497347766999155,0.178086097817868],[0.310566873755306,0.3169924062676728],[0.8673730420414358,0.03549668635241687],[0.15758864698000252,0.7022221661172807],[0.9175500213168561,0.213803417282179],[0.7466966118663549,0.8234703643247485],[0.77326267096214,0.19682225096039474],[0.2678100906778127,0.8008902524597943],[0.35669602849520743,0.5578793571330607],[0.7212660335935652,0.7425720831379294],[0.7933286854531616,0.21247860323637724],[0.981175130000338,0.5439277184195817],[0.17931180610321462,0.713459103833884],[0.6192170032300055,0.4844184273388237],[0.8636513818055391,0.3702042873483151],[0.9052932132035494,0.5046043759211898],[0.27094965800642967,0.2496710428968072]]}}];
const title = "몬테카를로 · π 추정";
const canvas = document.getElementById('stage');
const ctx = canvas.getContext('2d');
const restart = document.getElementById('restart');
const step = document.getElementById('step');
const speed = document.getElementById('speed');
let index = 0, last = performance.now(), width = 300, height = 200;
function colors(){ const s=getComputedStyle(document.documentElement); const v=(key)=>s.getPropertyValue(key).trim(); return {bg:v('--bg'),fg:v('--fg'),muted:v('--muted'),line:v('--line'),surface:v('--surface'),accent:v('--accent'),accent2:v('--accent-2'),accent3:v('--accent-3')}; }
function resize(){ const dpr=Math.min(devicePixelRatio||1,2); width=innerWidth;height=innerHeight;canvas.width=Math.round(width*dpr);canvas.height=Math.round(height*dpr);ctx.setTransform(dpr,0,0,dpr,0,0);draw(); }
function text(value,x,y,color,size=12,align='left'){ ctx.fillStyle=color;ctx.font='600 '+size+'px sans-serif';ctx.textAlign=align;ctx.textBaseline='middle';ctx.fillText(String(value),x,y); }
function line(x1,y1,x2,y2,color,thick=2){ctx.strokeStyle=color;ctx.lineWidth=thick;ctx.beginPath();ctx.moveTo(x1,y1);ctx.lineTo(x2,y2);ctx.stroke();}
function dot(x,y,r,color){ctx.fillStyle=color;ctx.beginPath();ctx.arc(x,y,r,0,Math.PI*2);ctx.fill();}
function draw(){
if(!frames.length)return;
const p=colors(), frame=frames[index], d=frame.data, detail=width>500;
ctx.fillStyle=p.bg;ctx.fillRect(0,0,width,height);
text(title,12,18,p.fg,detail?16:13);text(frame.caption,12,detail?43:39,p.muted,detail?13:10);
text((index+1)+' / '+frames.length,width-12,18,p.muted,10,'right');
const top=detail?62:53, bottom=detail?height-47:height-9, span=Math.max(10,bottom-top), areaW=Math.min(width-22,detail?710:width-22), left=(width-areaW)/2;
if(frame.kind==='graph'){
const nodes=d.nodes, edges=d.edges, positions=Object.fromEntries(nodes.map(n=>[n.id,{x:left+areaW*(.06+.88*n.x),y:top+span*(.11+.78*n.y)}]));
for(const edge of edges){const a=edge[0],b=edge[1],weight=edge[2],key=[a,b].sort().join('-'),pa=positions[a],pb=positions[b];
if(d.hideUnvisited&&(!d.visited.includes(a)||!d.visited.includes(b)))continue;
const chosen=d.selected?.includes(key), active=d.activeEdge===key;ctx.globalAlpha=active||chosen?1:.58;line(pa.x,pa.y,pb.x,pb.y,active?p.accent2:chosen?p.accent:p.muted,active?4:chosen?3:2);ctx.globalAlpha=1;
if(d.directed){const angle=Math.atan2(pb.y-pa.y,pb.x-pa.x),x=pb.x-Math.cos(angle)*(detail?18:13),y=pb.y-Math.sin(angle)*(detail?18:13);line(x-Math.cos(angle-.55)*7,y-Math.sin(angle-.55)*7,x,y,p.muted,1.5);line(x-Math.cos(angle+.55)*7,y-Math.sin(angle+.55)*7,x,y,p.muted,1.5);}
if(weight>0&&!d.hideUnvisited)text(weight,(pa.x+pb.x)/2,(pa.y+pb.y)/2-7,p.muted,10,'center');
}
for(const node of nodes){if(d.hideUnvisited&&!d.visited.includes(node.id))continue;const pt=positions[node.id],selected=d.visited?.includes(node.id),front=d.frontier?.includes(node.id),active=d.active===node.id;let color=active?p.accent2:front?p.accent3:selected?p.accent:p.surface;
if(d.groups){const group=d.groups[nodes.findIndex(n=>n.id===node.id)];color=[p.accent,p.accent2,p.accent3][nodes.findIndex(n=>n.id===group)%3];}
dot(pt.x,pt.y,detail?18:12,color);ctx.strokeStyle=p.line;ctx.lineWidth=1;ctx.stroke();text(node.id,pt.x,pt.y,selected||active||front||d.groups?'#fff':p.fg,detail?13:10,'center');
if(d.distances)text(Number.isFinite(d.distances[node.id])?d.distances[node.id]:'∞',pt.x,pt.y+(detail?29:22),p.muted,10,'center');
}
} else if(frame.kind==='grid'||frame.kind==='table'||frame.kind==='bits'){
const table=frame.kind==='table',bits=frame.kind==='bits';const rows=bits?1:table?d.values.length:d.rows,cols=bits?d.bits.length:table?d.values[0].length:d.cols;
const labelX=table?24:0,labelY=table?18:0,cell=Math.min((areaW-labelX)/cols,(span-labelY)/rows,detail?56:32),ox=left+(areaW-(cols*cell+labelX))/2+labelX,oy=top+(span-(rows*cell+labelY))/2+labelY;
if(table){d.colLabels.forEach((label,c)=>text(label,ox+c*cell+cell/2,oy-10,p.muted,10,'center'));d.rowLabels.forEach((label,r)=>text(label,ox-12,oy+r*cell+cell/2,p.muted,10,'center'));}
for(let r=0;r<rows;r++)for(let c=0;c<cols;c++){const n=r*cols+c,x=ox+c*cell,y=oy+r*cell,active=bits?d.active?.includes(c):table?d.active?.[0]===r&&d.active?.[1]===c:d.active===n,source=table?d.sources?.some(v=>v[0]===r&&v[1]===c):false,visited=bits?d.bits[c]:table?false:d.visited?.includes(n),front=d.frontier?.includes(n),blocked=d.blocked?.includes(n),path=d.path?.includes(n),queen=d.queens?.[r]===c;
ctx.fillStyle=blocked?p.line:active?p.accent2:path||queen?p.accent3:front?p.accent2:visited?p.accent:source?p.accent3:bits&&d.bits[c]?p.accent:p.surface;ctx.fillRect(x+2,y+2,cell-4,cell-4);ctx.strokeStyle=p.muted;ctx.globalAlpha=.42;ctx.strokeRect(x+1,y+1,cell-2,cell-2);ctx.globalAlpha=1;
const value=bits?d.bits[c]:table?d.values[r][c]:queen?'Q':d.start===n?'S':d.goal===n?'G':blocked?'':visited?'·':'';
if(value!==''&&value!==undefined)text(value,x+cell/2,y+cell/2,(active||path||queen||front||visited||bits&&d.bits[c])?'#fff':p.fg,Math.min(13,cell*.43),'center');
if(bits)text(c,x+cell/2,y+cell+11,p.muted,9,'center');
}
} else if(frame.kind==='intervals'){
const rowH=Math.min(31,span/d.intervals.length),unit=(areaW-28)/10,ox=left+10,oy=top+(span-rowH*d.intervals.length)/2;
d.intervals.forEach((it,i)=>{const y=oy+i*rowH;ctx.fillStyle=d.active===i?p.accent2:d.selected.includes(i)?p.accent:p.line;ctx.fillRect(ox+it[0]*unit,y+3,Math.max(5,(it[1]-it[0])*unit-3),rowH-7);text(i+1,ox-5,y+rowH/2,p.muted,10,'right');});
} else if(frame.kind==='ring'){
const cx=width/2,cy=top+span/2,r=Math.min(areaW,span)*.35,loc=(v,rr)=>({x:cx+Math.sin(v*2*Math.PI)*rr,y:cy-Math.cos(v*2*Math.PI)*rr});ctx.strokeStyle=p.muted;ctx.globalAlpha=.6;ctx.lineWidth=2;ctx.beginPath();ctx.arc(cx,cy,r,0,Math.PI*2);ctx.stroke();ctx.globalAlpha=1;
d.keys.forEach((key,i)=>{const point=loc(key,r),server=d.servers.find(s=>s.id===d.owners[i]),dest=loc(server.pos,r);line(point.x,point.y,dest.x,dest.y,d.active===i?p.accent2:p.line,1);dot(point.x,point.y,d.active===i?6:4,d.active===i?p.accent2:p.fg);});
d.servers.forEach((server,i)=>{const point=loc(server.pos,r);dot(point.x,point.y,detail?15:11,[p.accent,p.accent2,p.accent3,p.fg][i]);text(server.id,point.x,point.y,i===3?p.bg:'#fff',11,'center');});
} else if(frame.kind==='points'){
const side=Math.min(areaW,span)-8,ox=(width-side)/2,oy=top+(span-side)/2;ctx.strokeStyle=p.muted;ctx.globalAlpha=.5;ctx.strokeRect(ox,oy,side,side);ctx.globalAlpha=1;ctx.beginPath();ctx.arc(ox,oy+side,side,Math.PI*1.5,0);ctx.strokeStyle=p.muted;ctx.stroke();
d.points.forEach(([x,y])=>dot(ox+x*side,oy+side-y*side,detail?2.5:1.7,x*x+y*y<=1?p.accent:p.accent2));
}
}
function advance(){index=(index+1)%frames.length;draw();}
restart.addEventListener('click',()=>{index=0;last=performance.now();draw();});
step.addEventListener('click',()=>{advance();last=performance.now();});
addEventListener('resize',resize);resize();
function loop(now){const delay=900-Number(speed.value)*140;if(now-last>delay){advance();last=now;}requestAnimationFrame(loop);}requestAnimationFrame(loop);