{"id":692,"date":"2021-11-27T01:05:43","date_gmt":"2021-11-27T01:05:43","guid":{"rendered":"http:\/\/www.johncmulligan.net\/blog\/?p=692"},"modified":"2023-07-24T20:13:38","modified_gmt":"2023-07-24T20:13:38","slug":"folding","status":"publish","type":"post","link":"https:\/\/www.johncmulligan.net\/blog\/2021\/11\/27\/folding\/","title":{"rendered":"Dihedral Angles"},"content":{"rendered":"\n<p>This is a project of mine that&#8217;s reached a nice stopping point for the time being.<\/p>\n\n\n\n<p>From 2020-22, I got interested in &#8220;nets,&#8221; that geometric exercise by which you unfold regular 3D shapes into contiguous but irregular 2D shapes. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/institucional.us.es\/blogimus\/wp-content\/uploads\/2018\/06\/dodecaedro.jpeg?w=819&#038;ssl=1\" alt=\"\"\/><figcaption>From <a href=\"https:\/\/institucional.us.es\/blogimus\/en\/2018\/06\/durers-problem\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/institucional.us.es\/blogimus\/en\/2018\/06\/durers-problem\/<\/a><\/figcaption><\/figure>\n\n\n\n<p>I approached the problem from the other side, though, and asked whether we could fold regular 2D shapes into well-formed 3D shapes. It turns out that you can! Specifically:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Even-sided polygons, from 10 to at least 16 sides<\/li><li>With the polygon of half its number of sides cut out from the middle of it, e.g.,<ul><li>Cut a pentagon out of a decagon, or<\/li><li>A hexagon out of a dodecagon&#8230;<\/li><\/ul><\/li><li>Will form a ring of alternating trapezoids and triangles.<\/li><li>And that if you snip those at one juncture,<\/li><li>And fold this loose ring at each joint<ul><li>Always at the same angle<\/li><li>But either left or right,<\/li><\/ul><\/li><li>Then you find interesting symmetries in<ul><li>The shapes formed<\/li><li>The angles that produce these shapes<\/li><li>And the decision tree as to whether you should fold these left or right at each joint<\/li><\/ul><\/li><\/ul>\n\n\n\n<p>This blog post used to have a few examples of my early experiments. However, I more recently formalized the steps that I used to produce these one-offs, and set the supercomputers loose on testing many different possible combinations.<\/p>\n\n\n\n<p>The result is a somewhat abstract interactive <strong>[NOT CHROME! AND IT&#8217;S MUCH BETTER ON A FULL WEB BROWSER]<\/strong> that allows you, by clicking the nodes on the graph, to call up the animations that the my algorithm determined are interesting. Some are more interesting than others!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"1964\" src=\"https:\/\/i1.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-24-at-2.53.58-PM.png?fit=819%2C532&amp;ssl=1\" alt=\"\" class=\"wp-image-812\" srcset=\"https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-24-at-2.53.58-PM.png?w=3024&amp;ssl=1 3024w, https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-24-at-2.53.58-PM.png?resize=300%2C195&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-24-at-2.53.58-PM.png?resize=1024%2C665&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-24-at-2.53.58-PM.png?resize=768%2C499&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-24-at-2.53.58-PM.png?resize=1536%2C998&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-24-at-2.53.58-PM.png?resize=2048%2C1330&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-24-at-2.53.58-PM.png?w=1638 1638w, https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-24-at-2.53.58-PM.png?w=2457 2457w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><figcaption>Base URL: <a href=\"http:\/\/johnconnor.pythonanywhere.com\">http:\/\/johnconnor.pythonanywhere.com<\/a><br>Codebase here: <a href=\"https:\/\/github.com\/JohnMulligan\/truncated_tetrahedron\">https:\/\/github.com\/JohnMulligan\/truncated_tetrahedron<\/a><\/figcaption><\/figure>\n\n\n\n<p>What&#8217;s particularly interesting is that I know there are more of these matches out there (I limited my parameter sweeps) &#8212; and the angles I found appear to conform to known dihedral angles of regular polyhedra. Comments more than welcome \ud83d\ude42<\/p>\n\n\n\n<p>What follows are the original examples I generated.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Dodecagon<\/h2>\n\n\n\n<p>A dodecagon with a hexagon, formed by connecting every third vertex cut out of it, leaves a ring composed of trapezoids and triangles. Folding along the lines between them at an angle of 1.4154719912951197&#8230; or (acos(2*sqrt(3)\/3-1)) radians connects the different segments in a butterfly shape that approximates half of a truncated tetrahedron.<\/p>\n\n\n<div class=\"wp-block-cgb-block-p5js\"><iframe srcdoc=\"&lt;script src=&quot;https:\/\/www.johncmulligan.net\/blog\/wp-content\/plugins\/wp-p5js-block\/assets\/js\/p5.min.js&quot;&gt;&lt;\/script&gt;&lt;script&gt;\n\nfunction setup() {\n  createCanvas(1000, 800, WEBGL);\n  fill(204);\n  \n  \n  \n}\n\nfunction draw() {\n\n  background(0);\n\nlet A_x=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0];\nlet A_y=[1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0];\nlet A_z=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0];\nlet B_x=[499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994, 499.99999999999994];\nlet B_y=[866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387, 866.0254037844387];\nlet B_z=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0];\nlet C_x=[866.025403784439, 865.331970794868, 863.255518620643, 859.807566305275, 855.00724123982, 848.881173054366, 841.463345891122, 832.794909878616, 822.923952852839, 811.905233591716, 799.799878042753, 786.675040229056, 772.603529714807, 757.663407696835, 741.937553962945, 725.513207119281, 708.481480637314, 690.936857405137, 672.976665587062, 654.700538699134];\nlet C_y=[500.0, 499.814195190439, 499.257811507234, 498.33393546879, 497.047692244094, 495.406217221024, 493.418616423039, 491.095915993847, 488.451001030268, 485.498544102625, 482.254923859189, 478.738134166219, 474.96768428764, 470.964490658102, 466.750760849816, 462.349870376848, 457.786233020297, 453.085165393727, 448.272746500166, 443.375673059777];\nlet C_z=[0.0, -19.2638066431079, -38.4207480139673, -57.3645516715717, -75.990127548688, -94.1941509352124, -111.875635668272, -128.936494349319, -145.282082480434, -160.821723501265, -175.469211813972, -189.143291005672, -201.768104615458, -213.273616945375, -223.596001580931, -232.677995465828, -240.469216566699, -246.926443365621, -252.013854629926, -255.703228129195];\nlet D_x=[1000.0, 997.227933752591, 988.947036846309, 975.262577458044, 956.34789143149, 932.4412619252377, 903.8416425296791, 870.9033130589996, 834.0295793384323, 793.6656479934485, 750.290824078805, 704.4101929964033, 656.545958247898, 607.228612934528, 556.988125418618, 506.345318149888, 455.803613372248, 405.841310385985, 356.904546451771, 309.401077569691];\nlet D_y=[0.0, 0.372055945005, 1.491498405594, 3.368014794315, 6.017299296586, 9.460387365058, 13.722747232089, 18.833151025541, 24.822353634669, 31.721612393295, 39.561084814141, 48.368144925199, 58.165661149479, 68.970280077141, 80.790760869624, 93.626404397331, 107.465619557377, 122.28466657963, 138.046613564633, 154.700538082337];\nlet D_z=[0.0, -52.5834244758788, -104.5987822734552, -155.4872819724858, -204.708495514052, -251.7490760394784, -296.130930356739, -337.418682707593, -375.226281810646, -409.222621641333, -439.136067672411, -464.75780387028, -485.943941104525, -502.616354223046, -514.762242288088, -522.432433761214, -525.738485168249, -524.848647381992, -519.982797569801, -511.406456541736];\nlet E_x=[866.025403784439, 862.053497086187, 850.194399882511, 830.617374021936, 803.60248612337, 769.5375065148147, 728.9134807654322, 682.3188998888086, 630.4323919072963, 574.0138658156214, 513.894060043754, 450.9624814349553, 386.15376679652, 320.432555664738, 254.777027678335, 190.161327820095, 127.53717417434, 67.815011816338, 11.845138908887, -39.60071698804];\nlet E_y=[-500.0, -499.304900942178, -497.203514557649, -493.647977495902, -488.559862205881, -481.832183520464, -473.33218594873, -462.904887512754, -450.377346081822, -435.563602402027, -418.27024035497, -398.302489558044, -375.470778588012, -349.597629404175, -320.524765670597, -288.120290469175, -252.285773294316, -212.963073212664, -170.140715639653, -123.859635250677];\nlet E_z=[0.0, -52.529954787802275, -104.17191893737255, -154.05167693592355, -201.32250842825928, -245.178787080878, -284.8693710893572, -319.7106685429794, -349.0992251334987, -372.5236427602062, -389.575598760423, -399.9597003044618, -403.5018804495478, -400.156024738562, -390.008512919049, -373.280371593938, -350.326761874974, -321.633571980128, -287.810947822234, -249.583673615407];\nlet F_x=[500.0, 496.353247471748, 485.507619012652, 467.745066429008, 443.529025240308, 413.4945858750517, 378.4345641603071, 339.2813814381976, 297.0847418325843, 252.9852307831685, 208.184150727054, 163.9101449216443, 121.383420331342, 81.778641568419, 46.187803443259, 15.584572683437, -9.208304939103, -27.5469273433744, -38.9879854255083, -43.30305080305794];\nlet F_y=[-866.02540378444, -864.128353216245, -858.417241118939, -848.83367041631, -835.28520299827, -817.652497757573, -795.798911916598, -769.582181344155, -738.867697861374, -703.542814798566, -663.531540407601, -618.808926752536, -569.414434155611, -515.463552676225, -457.156996204128, -394.786854048377, -328.739190131136, -259.4927196216938, -187.6133632160454, -113.744673914924];\nlet F_z=[0.0, -19.117853179349876, -37.25863151547495, -53.47332758602456, -66.86867526900028, -76.633992918842, -82.0666785776842, -82.5957368861614, -77.8026096903677, -67.4384912964632, -51.437256549447, -29.9231349637338, -3.2123420789968, 28.191961383398, 63.611770515856, 102.213469808114, 143.033898724486, 185.01254218228, 227.028728667642, 267.942338013596];\nlet G_x=[0.0, -1.005271795634, -3.896547988284, -8.307016770464, -13.647801820663, -19.1409266876003, -23.8639032286829, -26.8042613481404, -26.9217310524847, -23.2151613263405, -14.790673911576, -0.9270822747337, 18.865657418822, 44.7991763161437, 76.774454220575, 114.3677317795527, 156.836610155981, 203.1470015160746, 252.0200342910097, 301.99640993555204];\nlet G_y=[-1000.0, -995.467800895865, -981.896850125063, -959.366921301744, -928.0201231926851, -888.0736206927006, -839.8355007237531, -783.7220062488136, -720.2740835055913, -650.1710663742613, -574.2393747874186, -493.454337621644, -408.93365823184, -321.921602561077, -233.763671503829, -145.872274023311, -59.684688193456, 23.3846798139982, 101.9951187725486, 174.930460765055];\nlet G_z=[0.0, 38.61987475039483, 77.56967472013905, 117.13149931305144, 157.49436938434073, 198.714097950391, 240.6807682190608, 283.0961551876206, 325.4631531322353, 367.0888292482958, 407.102086547032, 444.4860849563212, 478.1245682836372, 506.860139902099, 529.561415547046, 545.194972538251, 552.897233983026, 552.040988637066, 542.291241586724, 523.645567289743];\nlet H_x=[-500.0, -495.560531119834, -482.186736716975, -459.727313369884, -427.978292466277, -386.7507499017163, -335.9566200154039, -275.7041638721234, -206.3930584686607, -128.7982051949945, -44.1314002037407, 45.9288833595183, 139.24712197337, 233.2840172171597, 325.193550455533, 411.9593801794827, 490.561611889702, 558.1610228421456, 612.2850013507777, 650.9982048718041];\nlet H_y=[-866.02540378444, -857.815451619652, -833.371273002852, -793.249634738074, -738.376866164074, -670.0440040694386, -589.895510351807, -499.9079184786786, -402.3548187265833, -299.7552903389733, -194.8041970585796, -90.284567062501, 11.035606415398, 106.517621742948, 193.770874331233, 270.768183624836, 335.948797001203, 388.3002764923622, 427.4114661065056, 453.490634429157];\nlet H_z=[0.0, 105.07375834377753, 208.44305145316505, 308.3746831234644, 403.0852324392697, 490.733440773283, 569.4319351716327, 637.2819744095036, 692.4326016548173, 733.1628616299178, 757.982778682776, 765.7458661660112, 755.7633843279432, 727.908750527446, 682.699775125987, 621.347006552349, 545.7585337040694, 458.4950406013696, 362.673461764209, 261.822785220238];\nlet I_x=[-866.02540378444, -859.136808428004, -838.463288951377, -804.001311907088, -755.808466516458, -694.0914978030643, -619.3155193387689, -532.3212215675094, -434.4344869192787, -327.5516326988335, -214.1838934822007, -97.4470176955227, 19.013884555796, 131.1679631581807, 234.8068404560172, 325.8052139977058, 400.4136023902373, 455.5563639104596, 489.1040531916497, 500.08860518793705];\nlet I_y=[-500.0, -489.852758962892, -459.691177755543, -410.353641536455, -343.2295561758031, -260.2438148242016, -163.8283013754001, -56.8750416973926, 57.3341357167647, 175.2252366102847, 293.0584673066344, 407.081523080615, 513.70420636974, 609.684892652523, 692.315889097841, 759.592223709979, 810.347362966598, 844.3401623705212, 862.2801876269186, 865.783329975069];\nlet I_z=[0.0, 124.17715653971533, 245.58328805787235, 361.43375164590196, 468.9272617395805, 565.2630456637759, 647.6857532282006, 713.5626942657822, 760.4940775725624, 786.4523212406991, 789.9415439807347, 770.1635356341119, 727.1724824333447, 661.9981943170649, 576.717213645549, 474.453473966719, 359.2953217173843, 236.1235071604436, 110.354533649542, -12.385563219165];\nlet J_x=[-1000.0, -993.44077913063, -973.843658407782, -941.465678810146, -896.783860131977, -840.5586956811443, -773.9050894106159, -698.3549344515144, -615.8941344996967, -528.9577742804966, -440.3706513002277, -353.2264873869337, -270.707431220746, -195.8550571229523, -131.3136385155428, -79.0744139931982, -40.2542218093427, -14.9418986494164, -2.1404924195033, 0.17721040059606];\nlet J_y=[0.0, 8.941079328254, 35.430634193759, 78.477104777861, 136.4604079433839, 207.1835473904054, 287.9496352892389, 375.6671211979064, 466.9843465794307, 558.4515763573987, 646.7046858758264, 728.66023247713, 801.707443823665, 863.879542892851, 913.985607858486, 951.685457774191, 977.49415322991, 992.7094471131522, 999.2642578992526, 999.515852313755];\nlet J_z=[0.0, 90.76544051935622, 178.68232148037515, 260.94871932340595, 334.8650778493695, 397.9064998403179, 447.8159125839236, 482.7179933629312, 501.2484537497405, 502.6877514150441, 487.0833343997426, 455.34106347182893, 409.2654412532287, 351.5304561758389, 285.568586492113, 215.374588883787, 145.2322196867133, 79.3844478796436, 21.6789827347222, -24.7711298929004];\nlet K_x=[-866.02540378444, -862.163188169364, -850.753787616746, -832.326072621036, -807.7494767302067, -778.2079833902483, -745.1498544079977, -710.203930358665, -675.0566933628062, -641.2908428706864, -610.1951692316957, -582.5655452656157, -558.52579054303, -537.4025803792603, -517.6882424676448, -497.1177717366082, -472.8716194603887, -441.8954042229774, -401.3049597761543, -348.82458525683495];\nlet K_y=[500.0, 503.716493272442, 514.575898356147, 531.731767089241, 553.8516645106708, 579.2310876932664, 605.9450307990859, 632.0276716438603, 655.6663965574547, 675.3921214601127, 690.2445711226754, 699.8899823804529, 704.6706510918524, 705.571504715842, 704.098432381486, 702.075560071507, 701.382267315673, 703.6630920289042, 710.0521176980747, 720.955679254714];\nlet K_z=[0.0, 13.871511637536425, 26.308137411948145, 36.00883872194694, 41.93742475977952, 43.4460523112069, 40.3833938454206, 33.1759353726142, 22.8677809838245, 11.1031879436921, 0.0380552591386, -7.82743898901605, -9.8928168360763, -3.7624467045041, 12.418021011707, 39.636595135735, 77.75180669413491, 125.3420492320338, 179.7082787252182, 237.0516518590406];\nlet L_x=[-500.0, -500.79510486045, -503.356575509454, -508.177144761984, -515.9602748744826, -527.4491526702614, -543.2014088526797, -563.329297369284, -587.2361717904657, -613.3913303758327, -639.193330909067, -660.972778057683, -674.175894462385, -673.7481506664593, -654.7039561919757, -612.8284903470512, -545.4189600716545, -451.9445373335894, -334.4961283593688, -197.91498651366695];\nlet L_y=[866.02540378444, 860.710299193853, 844.76055091093, 818.198372390981, 781.1735594508139, 734.1133037874024, 677.8944898202918, 614.0043680941887, 544.6513798593917, 472.7889947969877, 402.0230759496724, 336.3880388939159, 279.9980832829414, 236.604480117895, 209.114077293769, 199.142551248965, 206.683215388542, 229.9645352448402, 265.5457819975426, 308.662983548322];\nlet L_z=[0.0, -85.71625533469107, -169.24866934375984, -248.26840103856506, -320.1854966251345, -382.0897280702251, -430.7740035447454, -462.8605503262738, -475.0402572013635, -464.4205051568599, -428.9568966583564, -367.92164243934207, -282.3399787687423, -175.3112961145991, -52.1294409224407, 79.8685558944182, 211.7627160401499, 333.8075971183758, 436.4180175313672, 511.2600005748496];\nlet M_x=[0.0, -7.032865642508, -28.070157631468, -62.856254027091, -110.7379559339646, -170.3652355169693, -239.3545529227897, -313.993273026366, -389.0762969959027, -457.9654269961807, -512.942577492189, -545.886629474104, -549.242373078054, -517.1770960780123, -446.7509250803748, -338.8799543275402, -198.8646647613315, -36.3015952804224, 135.7068617011282, 301.99640805416607];\nlet M_y=[1000.0, 983.40875229679, 934.3437050704323, 854.9481576550195, 748.8389446261457, 621.1312756677704, 478.3973597767318, 328.5012712773027, 180.2610891097917, 42.9131227158107, -74.6096273332916, -164.5269594086031, -221.0858349918296, -241.322776691876, -225.566328316223, -177.551173700044, -104.067694426396, -14.1492894652648, 82.1097295719176, 174.9304604441];\nlet M_z=[0.0, -181.07417666134359, -353.71241077460985, -509.5880328867091, -640.6516217424825, -739.4065760686951, -799.3213894763584, -815.3782393916148, -784.7200474040125, -707.317017260672, -586.5361016759554, -429.4727213161809, -246.9039164588071, -52.7542298373611, 136.9675560430003, 305.7075021103572, 438.2206257767699, 522.4834507348668, 551.3508467830512, 523.6455678425834];\nlet first_x=[-211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747, -211.32486540518747];\nlet first_y=[788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124, 788.6751345948124];\nlet first_z=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0];\nlet B_C_x=[577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259, 577.3502691896259];\nlet B_C_y=[577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257, 577.3502691896257];\nlet B_C_z=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0];\nlet D_E_x=[788.675134594813, 785.3964018660154, 775.6098192977329, 759.463262110737, 737.199971049308, 709.153797863605, 675.742692184044, 637.460569204591, 594.867732116195, 548.580053936291, 499.257149592267, 447.589790262355, 394.286827594802, 340.061905175813, 285.620238288761, 231.645740526028, 178.788767240811, 127.654731354201, 78.793826988238, 32.692071226064];\nlet D_E_y=[-211.324865405191, -210.444923593806, -207.801558774777, -203.384359025952, -197.176653306419, -189.156516345262, -179.298139207874, -167.573530261371, -153.954502583847, -138.41489619413, -120.932976996671, -101.493949190837, -80.092514206137, -56.735407082926, -31.443840675562, -4.255789129698, 24.771955241212, 55.562013337145, 88.014994894105, 122.008467324608];\nlet D_E_z=[0.0, -52.556708157817, -104.3859401536442, -154.7739150537689, -203.033952359818, -248.5193035253664, -290.635138676469, -328.849435928169, -362.702544712106, -391.815223548185, -415.894986064695, -434.740626059559, -448.244832183221, -456.394844533001, -459.271148158369, -457.044241244119, -449.969557620185, -438.380663318999, -422.680884280675, -403.33355616918];\nlet F_G_x=[211.324865405187, 208.559014693969, 200.371027322762, 187.086530047571, 169.238000597372, 147.5494011494167, 122.9146787316611, 96.3702471343796, 69.0617265371213, 42.2054500502805, 17.045541837636, -5.1922900084197, -23.348749675471, -36.378910467171, -43.398030708494, -43.722951183033, -36.906751049243, -22.7644490498171, -1.3878153643679, 26.8521939863162];\nlet F_G_y=[-788.67513459481, -785.899294244987, -777.562127601217, -763.636607366268, -744.083962940158, -718.862779406498, -687.941116217993, -651.311042240674, -609.004836621931, -561.111979005029, -507.7959546564965, -449.3098372576092, -386.0095915233046, -318.3640658054817, -246.9607262876035, -172.506321904892, -95.821862386809, -17.831536951434, 60.454509536031, 137.963304310403];\nlet F_G_z=[0.0, 0.1458793084666253, 1.159751773649447, 3.87337136794344, 9.04683756751572, 17.334872916631, 29.2557429491988, 45.1638653495936, 65.2272446873503, 89.4109222389118, 117.467619045123, 148.9366498906432, 183.1519789193592, 219.259966683307, 256.246928027552, 292.976097489416, 328.233013183946, 360.777721238958, 389.401618020129, 412.986237586458];\nlet H_I_x=[-577.35026918963, -571.527856730195, -554.060130619202, -524.961396311169, -484.306310355957, -432.3000524541303, -369.3648521039899, -296.2320811131014, -214.0274200746157, -124.3359926178055, -29.2350606775235, 68.7159799979021, 166.534985845081, 260.9277040662217, 348.445897609572, 425.6833155291737, 489.494470270752, 537.2170130549356, 566.8762274069577, 577.3502691766811];\nlet H_I_y=[-577.35026918962, -568.773324059566, -543.285268545941, -501.611460688022, -444.9501204160831, -374.9537049345016, -293.6982051235291, -203.6368144966426, -107.5347987421993, -8.3835603474843, 90.7062250740944, 186.630108862963, 276.429041119382, 357.434659981878, 427.411004673209, 484.681616121702, 528.230721985418, 557.7681777006642, 573.7500726019585, 577.350269224985];\nlet H_I_z=[0.0, 104.96693048318463, 207.59290779324306, 305.5308588319754, 396.42965151771773, 477.951661926905, 547.8114846382358, 603.8389626423856, 644.0666030988343, 666.8378957594078, 670.929373238883, 655.6758522615532, 621.0856401443542, 567.9310521572103, 497.7997607326492, 413.094528840867, 316.972782377266, 213.222994923254, 106.081464665849, 1.809144e-06];\nlet J_K_x=[-788.67513459481, -783.3722610712084, -767.6023928242569, -741.7908524497038, -706.6738854244967, -663.330126454576, -613.2067520707284, -558.1254028252521, -500.2528440326262, -442.0240242580705, -386.0108040089177, -334.7378353730367, -290.457009585017, -254.9021450054263, -229.0543384520528, -212.9536746716712, -205.5930408536777, -204.9235480471264, -207.9884888507303, -211.18510396209194];\nlet J_K_y=[211.32486540519, 217.999271039088, 237.695254813957, 269.44584859903, 311.6889736148769, 362.3429706813114, 418.9138448883579, 478.6336825821314, 538.6270716356047, 596.0986098131867, 648.5301831320944, 693.872372695216, 730.711025244822, 758.388659965023, 777.0617952314784, 787.6799305824206, 791.8797566014412, 791.7985089289285, 789.8219327206995, 788.2932993353174];\nlet J_K_z=[0.0, 52.26495122438383, 102.06665015318134, 147.03076604856093, 184.96662967034453, 213.9717693216319, 232.5467376951026, 239.7160115322742, 235.1454485756665, 219.2417751584341, 193.2158948300176, 159.09054104942496, 119.6348831616377, 78.2146818254669, 38.556395317963, 4.436379713972, -20.67970923438569, -34.0094024258274, -33.790939440174, -19.53637511773642];\nlet last_x=[-211.324865405191, -213.368217587366, -219.635306791119, -230.494453833717, -246.4201093307646, -267.7956173167313, -294.6633171116407, -326.452660942314, -361.7291206901352, -398.0167207140395, -431.7510621367107, -458.4135051240087, -472.8777321340402, -469.9668670007512, -445.1761113783215, -395.4700078199692, -320.0256080958757, -220.7745508642654, -102.6075606312023, 26.85219223874606];\nlet last_y=[788.67513459481, 781.103546908268, 758.512105403526, 721.304025585561, 670.2552257914189, 606.6464759300816, 532.4033434435112, 450.2046198763714, 363.5175051628217, 276.5225134324357, 193.9039301347214, 120.5024842857799, 60.8536360940154, 18.663397474382, -3.701910510769, -5.62158626817, 11.566073876329, 44.6099628708622, 88.6797444469666, 137.963304777916];\nlet last_z=[0.0, -104.81983981725358, -206.39493162479786, -301.37401461216103, -386.2280578558855, -457.2472084128441, -510.6335099089554, -542.7072727127618, -550.2299294874215, -530.8256501597649, -483.4594080580384, -408.90414769656206, -310.1097210527913, -192.3779419707181, -63.2575611393692, 67.8962738466971, 190.7024346969189, 294.8137856494488, 371.1302361692982, 412.9862375431916];\n\n\nlet sec=floor(millis()\/1000);\nlet steparray=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1];\nlet t=steparray[sec%38];\n\nbackground(0)\n\nlet angle=((sec*5)%360);\n\n\n\n\n\/\/adapted from\n\/\/from https:\/\/discourse.processing.org\/t\/how-to-rotate-around-a-sphere\/25072\/24\n\/\/and math.fandom.com\/wiki\/Ellipsoid\n\/\/and Simon Greenwold.\n\n  let latitude = (frameCount%360)*3.141\/180;\n  let longitude = (((frameCount-(latitude\/2))\/5)%360)*3.141\/180;\n  let radius=5000;\n  \n  let cam_x = radius * cos(latitude)*cos(longitude);\n  let cam_y = radius * cos(latitude)*sin(longitude);\n  let cam_z = radius * sin(latitude);\n  camera(cam_x, cam_y, cam_z, 0, 0, 0, 0, 1, 0);\n\n\/**\n * Points and Lines. \n * \n * Points and lines can be used to draw basic geometry.\n * Change the value of the variable &#039;d&#039; to scale the form.\n * The four variables set the positions based on the value of &#039;d&#039;. \n *\/\n\n\n\n\n\/\/let cam_x=350 * cos(angle);\n\/\/let cam_y=350*sin(angle);\n\/\/let cam_x=350*cos(angle);\n\/\/let cam_y=350*sin(angle);\n\/\/console.log(angle,cam_x,cam_y);\n\n\/\/camera(cam_x,cam_y,-900,0,0,0,0,1,0);\n\n\nfill(127);\n\nbeginShape();\nvertex(A_x[t],A_y[t],A_z[t]);\nvertex(B_x[t],B_y[t],B_z[t]);\nvertex(B_C_x[t],B_C_y[t],B_C_z[t]);\nvertex(first_x[t],first_y[t],first_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(B_x[t],B_y[t],B_z[t]);\nvertex(B_C_x[t],B_C_y[t],B_C_z[t]);\nvertex(C_x[t],C_y[t],C_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(B_C_x[t],B_C_y[t],B_C_z[t]);\nvertex(C_x[t],C_y[t],C_z[t]);\nvertex(D_x[t],D_y[t],D_z[t]);\nvertex(D_E_x[t],D_E_y[t],D_E_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(D_x[t],D_y[t],D_z[t]);\nvertex(D_E_x[t],D_E_y[t],D_E_z[t]);\nvertex(E_x[t],E_y[t],E_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(D_E_x[t],D_E_y[t],D_E_z[t]);\nvertex(E_x[t],E_y[t],E_z[t]);\nvertex(F_x[t],F_y[t],F_z[t]);\nvertex(F_G_x[t],F_G_y[t],F_G_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(F_x[t],F_y[t],F_z[t]);\nvertex(F_G_x[t],F_G_y[t],F_G_z[t]);\nvertex(G_x[t],G_y[t],G_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(F_G_x[t],F_G_y[t],F_G_z[t]);\nvertex(G_x[t],G_y[t],G_z[t]);\nvertex(H_x[t],H_y[t],H_z[t]);\nvertex(H_I_x[t],H_I_y[t],H_I_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(H_x[t],H_y[t],H_z[t]);\nvertex(H_I_x[t],H_I_y[t],H_I_z[t]);\nvertex(I_x[t],I_y[t],I_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(H_I_x[t],H_I_y[t],H_I_z[t]);\nvertex(I_x[t],I_y[t],I_z[t]);\nvertex(J_x[t],J_y[t],J_z[t]);\nvertex(J_K_x[t],J_K_y[t],J_K_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(J_x[t],J_y[t],J_z[t]);\nvertex(J_K_x[t],J_K_y[t],J_K_z[t]);\nvertex(K_x[t],K_y[t],K_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(J_K_x[t],J_K_y[t],J_K_z[t]);\nvertex(K_x[t],K_y[t],K_z[t]);\nvertex(L_x[t],L_y[t],L_z[t]);\nvertex(last_x[t],last_y[t],last_z[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(L_x[t],L_y[t],L_z[t]);\nvertex(M_x[t],M_y[t],M_z[t]);\nvertex(last_x[t],last_y[t],last_z[t]);\nendShape(CLOSE);\n\n}\n\nfunction polygon( x, y,  radius,  npoints) {\n  var angle = 3 \/ npoints;\n  beginShape();\n  for (var a = 0; a &lt; TWO_PI; a += angle) {\n    var sx = x + cos(a) * radius;\n    var sy = y + sin(a) * radius;\n    vertex(sx, sy);\n  }\n  endShape(CLOSE);\n}\n&lt;\/script&gt;&lt;style&gt;body{margin: 0; padding: 0;}&lt;\/style&gt;\"><\/iframe><\/div>\n\n\n<h2 class=\"wp-block-heading\">Decagon<\/h2>\n\n\n\n<p>Folding along the lines between them at an angle of 2.034443043&#8230;. or acos(-sqrt(5)\/5) radians connects the different segments in a pill or cradle-like shape.<\/p>\n\n\n<div class=\"wp-block-cgb-block-p5js\"><iframe srcdoc=\"&lt;script src=&quot;https:\/\/www.johncmulligan.net\/blog\/wp-content\/plugins\/wp-p5js-block\/assets\/js\/p5.min.js&quot;&gt;&lt;\/script&gt;&lt;script&gt;\n\nfunction setup() {\n  createCanvas(1000, 800, WEBGL);\n  fill(204);\n  \n  \n  \n};\n\nfunction draw() {\n\n  background(0);\n\n\nlet ax=[0, 48.7379275423940, 382.792836865775, 176.335364470941, 176.335439470292, 48.7381868658718, -364.176476300880, -364.176476300880, -364.176476300880, -364.176476300880];\nlet bx=[176.335575687742, 176.335575687742, 382.792749839784, 48.7379109219530, 53.8833228641560, 53.8833302969833, -201.311558426080, -201.311558426080, -201.311558426080, -201.311558426080];\nlet cx=[285.316954888546, 285.316954888546, 285.316954888546, 157.719404041327, 84.0051880849077, -122.452206471353, -122.452275122644, -122.452275122644, -122.452275122644, -122.452275122644];\nlet dx=[285.316954888546, 285.316954888546, 285.316954888546, 285.316954888546, 206.457331583722, -127.597507334110, -285.317122592199, -285.317122592199, -285.317122592199, -285.317122592199];\nlet ex=[176.335575687742, 176.335575687742, 176.335575687742, 176.335575687742, 176.335575687742, 48.7380248405235, -364.176551300703, -364.176551300703, -364.176551300703, -364.176551300703];\nlet fx=[3.67394039744206e-14, 3.67394039744206e-14, 3.67394039744206e-14, 3.67394039744206e-14, 3.67394039744206e-14, 3.67394039744206e-14, -255.195101694437, -255.195101694437, -255.195101694437, -255.195101694437];\nlet gx=[-176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742];\nlet hx=[-285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546];\nlet ix=[-285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546, -285.316954888546, -315.438710784526, -315.438710784526, -315.438710784526];\nlet jx=[-176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -236.579087479702, -139.103161989365, -139.103161989365];\nlet kx=[0, 0, 0, 0, 0, 0, 0, -78.8597807365030, 18.6161447538339, -108.981248661730];\nlet lx=[67.3541964869379, 67.3541964869379, 352.670993943804, 67.3540390553450, 67.3540454038190, 67.3542028352804, -285.316559347426, -285.316559347426, -285.316559347426, -285.316559347426];\nlet mx=[217.962758401608, 217.962758401608, 217.962758401608, 217.962758401608, 108.981439334355, -176.335515554104, -176.335710150536, -176.335710150536, -176.335710150536, -176.335710150536];\nlet nx=[67.3541964869379, 67.3541964869379, 67.3541964869379, 67.3541964869379, 67.3541964869379, 67.3541964869379, -285.316760292289, -285.316760292289, -285.316760292289, -285.316760292289];\nlet ox=[-176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742];\nlet px=[-176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -176.335575687742, -217.962818535159, -217.962818535159, -217.962818535159];\nlet qx=[67.3541964869379, 67.3541964869379, 67.3541964869379, 67.3541964869379, 67.3541964869379, 67.3541964869379, 67.3541964869379, -9.72981280000000e-5, -9.72981271000000e-5, -176.335358122545];\nlet ay=[300.000000000000, 150.000082766732, -92.7050155456788, -242.705149465018, -242.704918640750, -150.000088166995, -150.000088166995, -150.000088166995, -150.000088166995, -150.000088166995];\nlet by=[242.705098312484, 242.705098312484, 92.7051810792160, -149.999866080569, -134.163916454065, -134.163921854330, -134.163921854330, -134.163921854330, -134.163921854330, -134.163921854330];\nlet cy=[92.7050983124842, 92.7050983124842, 92.7050983124842, 5.11526537000000e-5, -226.868977752199, -76.8689003858940, -76.8689003858940, -76.8689003858940, -76.8689003858940, -76.8689003858940];\nlet dy=[-92.7050983124842, -92.7050983124842, -92.7050983124842, -92.7050983124842, -335.410062705583, -92.7050155457980, -92.7050155457980, -92.7050155457980, -92.7050155457980, -92.7050155457980];\nlet ey=[-242.705098312484, -242.705098312484, -242.705098312484, -242.705098312484, -242.705098312484, -150.000051152653, -150.000051152653, -150.000051152653, -150.000051152653, -150.000051152653];\nlet fy=[-300.000000000000, -300.000000000000, -300.000000000000, -300.000000000000, -300.000000000000, -300.000000000000, -300.000000000000, -300.000000000000, -300.000000000000, -300.000000000000];\nlet gy=[-242.705098312484, -242.705098312484, -242.705098312484, -242.705098312484, -242.705098312484, -242.705098312484, -242.705098312484, -242.705098312484, -242.705098312484, -242.705098312484];\nlet hy=[-92.7050983124843, -92.7050983124843, -92.7050983124843, -92.7050983124843, -92.7050983124843, -92.7050983124843, -92.7050983124843, -92.7050983124843, -92.7050983124843, -92.7050983124843];\nlet iy=[92.7050983124842, 92.7050983124842, 92.7050983124842, 92.7050983124842, 92.7050983124842, 92.7050983124842, 92.7050983124842, -0.000133919385500000, -0.000133919385500000, -0.000133919385500000];\nlet jy=[242.705098312484, 242.705098312484, 242.705098312484, 242.705098312484, 242.705098312484, 242.705098312484, 242.705098312484, 57.2946338487447, 57.2948505347433, 57.2948505347433];\nlet ky=[300.000000000000, 300.000000000000, 300.000000000000, 300.000000000000, 300.000000000000, 300.000000000000, 300.000000000000, 57.2945510820127, 57.2947677680117, -35.4100627056280];\nlet ly=[207.294901687516, 207.294901687516, 0.000114380810300000, -207.294787306642, -207.294767768049, -207.294882148701, -207.294882148701, -207.294882148701, -207.294882148701, -207.294882148701];\nlet my=[-5.96867798957339e-15, -5.96867798957339e-15, -5.96867798957339e-15, -5.96867798957339e-15, -335.410011552930, -128.115109865477, -128.115109865477, -128.115109865477, -128.115109865477, -128.115109865477];\nlet ny=[-207.294901687516, -207.294901687516, -207.294901687516, -207.294901687516, -207.294901687516, -207.294901687516, -207.294901687516, -207.294901687516, -207.294901687516, -207.294901687516];\nlet oy=[-128.115294937453, -128.115294937453, -128.115294937453, -128.115294937453, -128.115294937453, -128.115294937453, -128.115294937453, -128.115294937453, -128.115294937453, -128.115294937453];\nlet py=[128.115294937453, 128.115294937453, 128.115294937453, 128.115294937453, 128.115294937453, 128.115294937453, 128.115294937453, -0.000185072038900000, -0.000185072038900000, -0.000185072038900000];\nlet qy=[207.294901687516, 207.294901687516, 207.294901687516, 207.294901687516, 207.294901687516, 207.294901687516, 207.294901687516, -0.000299452849300000, -0.000299452847978606, -128.115224246123];\nlet az=[0, -97.4759523828695, -157.719544852487, -8.70262080638895e-5, -6.29726441311450e-5, 97.4757875180621, 157.719763502080, 157.719763502080, 157.719763502080, 157.719763502080];\nlet bz=[0, 0, -157.719404041249, -97.4760394089999, 87.1852052525380, -87.1852109307184, 244.904483348288, 244.904483348288, 244.904483348288, 244.904483348288];\nlet cz=[0, 0, 0, -97.4759523828693, 244.904531455262, -87.1849590400051, 87.1850014688790, 87.1850014688790, 87.1850014688790, 87.1850014688790];\nlet dz=[0, 0, 0, 0, 157.719404041249, 97.4760394090001, 0.000140811363230853, 0.000140811363230853, 0.000140811363230853, 0.000140811363230853];\nlet ez=[0, 0, 0, 0, 0, 97.4759523828693, 157.719544852487, 157.719544852487, 157.719544852487, 157.719544852487];\nlet fz=[0, 0, 0, 0, 0, 0, 157.719404041249, 157.719404041249, 157.719404041249, 157.719404041249];\nlet gz=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\nlet hz=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\nlet iz=[0, 0, 0, 0, 0, 0, 0, -157.719404041249, -157.719404041249, -157.719404041249];\nlet jz=[0, 0, 0, 0, 0, 0, 0, -315.438808082498, -157.719544852486, -157.719544852486];\nlet kz=[0, 0, 0, 0, 0, 0, 0, -412.914760465367, -255.195497235355, -0.000140811361822636];\nlet lz=[0, 0, -217.962855699628, -0.000120267155054421, 0.000107570195139593, -0.000227837249840843, 217.962963269495, 217.962963269495, 217.962963269495, 217.962963269495];\nlet mz=[0, 0, 0, 0, 217.962855699628, 0.000120267155182319, 1.74111975135898e-10, 1.74111975135898e-10, 1.74111975135898e-10, 1.74111975135898e-10];\nlet nz=[0, 0, 0, 0, 0, 0, 217.962855699629, 217.962855699629, 217.962855699629, 217.962855699629];\nlet oz=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\nlet pz=[0, 0, 0, 0, 0, 0, 0, -217.962855699628, -217.962855699628, -217.962855699628];\nlet qz=[0, 0, 0, 0, 0, 0, 0, -352.671308806988, -352.671308806987, -1.71822636000000e-10];\nlet steparray=[0,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1];\nlet sec=floor(millis()\/1000);\nlet t=steparray[sec%18];\n\n\nbackground(0)\n\nlet angle=((sec*5)%360);\n\n\n\n\n\/\/adapted from\n\/\/from https:\/\/discourse.processing.org\/t\/how-to-rotate-around-a-sphere\/25072\/24\n\/\/and math.fandom.com\/wiki\/Ellipsoid\n\/\/and Simon Greenwold.\n\n  let latitude = (frameCount%360)*3.141\/180;\n  let longitude = (((frameCount-(latitude\/2))\/5)%360)*3.141\/180;\n  let radius=1000;\n  \n  let cam_x = radius * cos(latitude)*cos(longitude);\n  let cam_y = radius * cos(latitude)*sin(longitude);\n  let cam_z = radius * sin(latitude);\n  camera(cam_x, cam_y, cam_z, 0, 0, 0, 0, 1, 0);\n\n\/**\n * Points and Lines. \n * \n * Points and lines can be used to draw basic geometry.\n * Change the value of the variable &#039;d&#039; to scale the form.\n * The four variables set the positions based on the value of &#039;d&#039;. \n *\/\n\n\n\n\n\/\/let cam_x=350 * cos(angle);\n\/\/let cam_y=350*sin(angle);\n\/\/let cam_x=350*cos(angle);\n\/\/let cam_y=350*sin(angle);\n\/\/console.log(angle,cam_x,cam_y);\n\n\/\/camera(cam_x,cam_y,-900,0,0,0,0,1,0);\n\n\nfill(127);\n\n\n\n\n\n\nbeginShape();\nvertex(ax[t],ay[t],az[t]);\nvertex(bx[t],by[t],bz[t]);\nvertex(lx[t],ly[t],lz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(bx[t],by[t],bz[t]);\nvertex(lx[t],ly[t],lz[t]);\nvertex(mx[t],my[t],mz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(bx[t],by[t],bz[t]);\nvertex(cx[t],cy[t],cz[t]);\nvertex(mx[t],my[t],mz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(cx[t],cy[t],cz[t]);\nvertex(dx[t],dy[t],dz[t]);\nvertex(mx[t],my[t],mz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(dx[t],dy[t],dz[t]);\nvertex(mx[t],my[t],mz[t]);\nvertex(nx[t],ny[t],nz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(dx[t],dy[t],dz[t]);\nvertex(ex[t],ey[t],ez[t]);\nvertex(nx[t],ny[t],nz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(ex[t],ey[t],ez[t]);\nvertex(nx[t],ny[t],nz[t]);\nvertex(fx[t],fy[t],fz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(nx[t],ny[t],nz[t]);\nvertex(fx[t],fy[t],fz[t]);\nvertex(ox[t],oy[t],oz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(fx[t],fy[t],fz[t]);\nvertex(ox[t],oy[t],oz[t]);\nvertex(gx[t],gy[t],gz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(gx[t],gy[t],gz[t]);\nvertex(hx[t],hy[t],hz[t]);\nvertex(ox[t],oy[t],oz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(hx[t],hy[t],hz[t]);\nvertex(ox[t],oy[t],oz[t]);\nvertex(px[t],py[t],pz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(hx[t],hy[t],hz[t]);\nvertex(px[t],py[t],pz[t]);\nvertex(ix[t],iy[t],iz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(px[t],py[t],pz[t]);\nvertex(ix[t],iy[t],iz[t]);\nvertex(jx[t],jy[t],jz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(jx[t],jy[t],jz[t]);\nvertex(px[t],py[t],pz[t]);\nvertex(qx[t],qy[t],qz[t]);\nendShape(CLOSE);\nbeginShape();\nvertex(jx[t],jy[t],jz[t]);\nvertex(qx[t],qy[t],qz[t]);\nvertex(kx[t],ky[t],kz[t]);\nendShape(CLOSE);\n\n\n};\n\nfunction polygon( x, y,  radius,  npoints) {\n  var angle = 3 \/ npoints;\n  beginShape();\n  for (var a = 0; a &lt; TWO_PI; a += angle) {\n    var sx = x + cos(a) * radius;\n    var sy = y + sin(a) * radius;\n    vertex(sx, sy);\n  }\n  endShape(CLOSE);\n};\n&lt;\/script&gt;&lt;style&gt;body{margin: 0; padding: 0;}&lt;\/style&gt;\"><\/iframe><\/div>\n\n\n<h2 class=\"wp-block-heading\">Ring<\/h2>\n\n\n\n<p>A third variation on this is to take a ring-shaped cross section of a truncated tetrahedron. The folding angle for this comes to: asin(sqrt(3)\/3)*2, or 1.2309594173407745&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/johncmulligan.net\/truncated_tetrahedra\/ring.html\" target=\"_blank\" rel=\"noreferrer noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"819\" height=\"729\" src=\"https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2022\/04\/Screen-Shot-2022-04-26-at-5.20.17-PM.png?resize=819%2C729&#038;ssl=1\" alt=\"\" class=\"wp-image-732\" srcset=\"https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2022\/04\/Screen-Shot-2022-04-26-at-5.20.17-PM.png?w=1004&amp;ssl=1 1004w, https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2022\/04\/Screen-Shot-2022-04-26-at-5.20.17-PM.png?resize=300%2C267&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2022\/04\/Screen-Shot-2022-04-26-at-5.20.17-PM.png?resize=768%2C684&amp;ssl=1 768w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This is a project of mine that&#8217;s reached a nice stopping point for the time being. From 2020-22, I got interested in &#8220;nets,&#8221; that geometric [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":709,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-692","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.johncmulligan.net\/blog\/wp-content\/uploads\/2021\/11\/Screen-Shot-2021-11-27-at-7.37.11-PM.png?fit=868%2C738&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s4eIi2-folding","_links":{"self":[{"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/posts\/692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/comments?post=692"}],"version-history":[{"count":31,"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/posts\/692\/revisions"}],"predecessor-version":[{"id":813,"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/posts\/692\/revisions\/813"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/media\/709"}],"wp:attachment":[{"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/media?parent=692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/categories?post=692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johncmulligan.net\/blog\/wp-json\/wp\/v2\/tags?post=692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}