Rearranging things a bit before publishing
parent
26f927daae
commit
9f08a82c0c
1683
dodecahedra.js
1683
dodecahedra.js
File diff suppressed because it is too large
Load Diff
43
polytopes.js
43
polytopes.js
|
@ -384,47 +384,8 @@ function meridian_label_120cell(nodes) {
|
|||
|
||||
function arctic_label_120cell(nodes) {
|
||||
|
||||
const ARCTIC_COLOURED = {
|
||||
'1': [
|
||||
27, 49, 61, 87, 95, 105, 131, 149, 165,
|
||||
174, 185, 210, 223, 226, 239, 241, 253, 263,
|
||||
265, 279, 285, 301, 311, 313, 325, 331, 347,
|
||||
357, 367, 369, 383, 389, 393, 406, 413, 419,
|
||||
425, 438, 449, 453, 469, 471, 473, 487, 511,
|
||||
513, 525, 530, 563, 566, 573, 581, 585, 593
|
||||
],
|
||||
'2': [
|
||||
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 23,
|
||||
24, 25, 31, 35, 37, 41, 50, 53, 57, 67, 69,
|
||||
73, 82, 83, 85, 91, 93, 97, 103, 109, 113, 119,
|
||||
123, 125, 129, 135, 141, 145, 150, 155, 157, 161, 167,
|
||||
170, 173, 177, 182, 189, 193, 199, 209, 214, 215
|
||||
],
|
||||
'3': [
|
||||
39, 45, 65, 86, 99, 117, 127, 137, 153,
|
||||
178, 197, 211, 219, 230, 235, 245, 251, 257,
|
||||
269, 273, 293, 312, 317, 321, 335, 343, 349,
|
||||
355, 363, 375, 385, 399, 405, 415, 417, 437,
|
||||
441, 445, 457, 475, 485, 498, 502, 509, 515,
|
||||
529, 547, 551, 562, 567, 569, 577, 589, 597
|
||||
],
|
||||
'4': [
|
||||
33, 54, 71, 77, 101, 115, 121, 146, 159,
|
||||
169, 195, 213, 221, 229, 237, 242, 249, 261,
|
||||
271, 277, 295, 309, 315, 322, 329, 341, 351,
|
||||
359, 361, 371, 390, 397, 408, 409, 423, 433,
|
||||
443, 447, 461, 477, 483, 489, 493, 507, 517,
|
||||
533, 545, 549, 553, 561, 575, 583, 595, 598
|
||||
],
|
||||
'5': [
|
||||
29, 81, 89, 133, 163, 181, 217, 225, 233,
|
||||
246, 255, 259, 267, 275, 287, 294, 303, 310,
|
||||
319, 326, 333, 337, 345, 353, 365, 373, 381,
|
||||
391, 395, 407, 411, 421, 429, 434, 451, 455,
|
||||
465, 467, 479, 481, 497, 501, 505, 519, 521,
|
||||
534, 537, 541, 557, 565, 571, 579, 594, 599
|
||||
]
|
||||
};
|
||||
const ARCTIC_COLOURED = {"1":[27,38,48,49,61,68,74,87,95,98,105,120,126,131,140,149,156,165,174,179,185,200,207,210,218,223,226,231,234,239,241,248,252,253,258,263,265,272,274,279,284,285,289,296,300,301,306,311,313,320,324,325,331,334,339,342,347,350,356,357,362,367,369,376,378,383,388,389,393,400,403,406,413,414,419,420,425,427,438,440,444,448,449,453,458,460,469,471,473,474,487,488,490,494,499,503,511,512,513,514,525,527,530,532,539,543,546,550,555,558,563,566,572,573,580,581,585,592,593,600],"2":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,28,30,31,34,35,37,40,41,44,46,47,50,51,53,56,57,60,62,63,66,67,69,72,73,76,78,79,82,83,85,88,90,91,93,96,97,100,102,103,106,107,109,112,113,116,118,119,122,123,125,128,129,132,134,135,138,139,141,144,145,148,150,151,154,155,157,160,161,164,166,167,170,171,173,176,177,180,182,183,186,187,189,192,193,196,198,199,202,203,205,208,209,212,214,215],"3":[26,39,45,52,64,65,75,86,94,99,108,117,127,130,137,152,153,168,175,178,188,197,206,211,219,222,227,230,235,238,244,245,251,254,257,264,268,269,273,280,283,286,292,293,299,302,305,312,316,317,321,328,330,335,338,343,348,349,355,358,363,366,370,375,377,384,385,392,394,399,404,405,415,416,417,418,426,428,437,439,441,445,452,456,457,459,470,472,475,476,485,486,491,495,498,502,509,510,515,516,526,528,529,531,538,542,547,551,554,559,562,567,569,576,577,584,588,589,596,597],"4":[32,33,43,54,58,71,77,84,92,101,110,115,121,136,143,146,159,162,169,184,190,195,204,213,220,221,228,229,236,237,242,247,249,256,260,261,266,271,276,277,281,288,290,295,297,304,308,309,315,318,322,327,329,336,340,341,346,351,354,359,361,368,371,374,379,382,387,390,396,397,401,408,409,410,423,424,430,432,433,435,443,447,450,454,461,463,466,468,477,478,483,484,489,493,500,504,507,508,517,518,522,524,533,535,540,544,545,549,553,560,561,568,570,575,578,583,587,590,595,598],"5":[29,36,42,55,59,70,80,81,89,104,111,114,124,133,142,147,158,163,172,181,191,194,201,216,217,224,225,232,233,240,243,246,250,255,259,262,267,270,275,278,282,287,291,294,298,303,307,310,314,319,323,326,332,333,337,344,345,352,353,360,364,365,372,373,380,381,386,391,395,398,402,407,411,412,421,422,429,431,434,436,442,446,451,455,462,464,465,467,479,480,481,482,492,496,497,501,505,506,519,520,521,523,534,536,537,541,548,552,556,557,564,565,571,574,579,582,586,591,594,599]};
|
||||
|
||||
|
||||
for( const cstr in ARCTIC_COLOURED ) {
|
||||
label_nodes(nodes, ARCTIC_COLOURED[cstr], Number(cstr));
|
||||
|
|
104
testbed.js
104
testbed.js
|
@ -688,10 +688,12 @@ function arctic_two(nodes, links, faces, startf, startn) {
|
|||
seen[dd_fingerprint(nextdd)] = true;
|
||||
}
|
||||
|
||||
// dumb!
|
||||
// top five of the temperate circle
|
||||
const a1 = dds[1];
|
||||
for( const a of dds.slice(1, 12) ) {
|
||||
// go around all of the arctic circle and grow all faces
|
||||
|
||||
// 1, 12, 20, 12, 30 = 75
|
||||
// 0 1 13, 33, 45
|
||||
|
||||
for( const a of dds.slice(1, 13) ) {
|
||||
for( const i of [ 6, 7, 8, 9, 10 ] ) {
|
||||
const [ nextdd, ncolours ] = follow_and_colour(
|
||||
nodes, links, faces, colours, a, a[i]
|
||||
|
@ -705,32 +707,63 @@ function arctic_two(nodes, links, faces, startf, startn) {
|
|||
}
|
||||
}
|
||||
|
||||
// // bottom five of the temperate circle
|
||||
// const a12 = dds[12];
|
||||
// for( const i of [ 6, 7, 8, 9, 10 ] ) {
|
||||
// const [ nextdd, ncolours ] = follow_and_colour(
|
||||
// nodes, links, faces, colours, a1, a1[i]
|
||||
// );
|
||||
// add_colours(colours, ncolours);
|
||||
// dds.push(nextdd);
|
||||
// }
|
||||
// meridians = 45
|
||||
|
||||
// // will be weird
|
||||
// for( const dd of dds.slice(2, 12) ) {
|
||||
// const [ nextdd, ncolours ] = follow_and_colour(
|
||||
// nodes, links, faces, colours, dd, dd[6]
|
||||
// );
|
||||
// add_colours(colours, ncolours);
|
||||
// dds.push(nextdd);
|
||||
// }
|
||||
for( const a of dds.slice(1, 13) ) {
|
||||
const [ nextdd, ncolours ] = follow_and_colour(
|
||||
nodes, links, faces, colours, a, a[11]
|
||||
);
|
||||
const fp = dd_fingerprint(nextdd);
|
||||
if( !(fp in seen) ) {
|
||||
add_colours(colours, ncolours);
|
||||
dds.push(nextdd);
|
||||
seen[fp] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// for( const dd of dds.slice(2, 7) ) {
|
||||
// const [ nextdd, ncolours ] = follow_and_colour(
|
||||
// nodes, links, faces, colours, dd, dd[6]
|
||||
// );
|
||||
// add_colours(colours, ncolours);
|
||||
// dds.push(nextdd);
|
||||
// }
|
||||
// the 30 equatorials?
|
||||
for( const a of dds.slice(13, 46) ) {
|
||||
for( const i of [ 6, 7, 8, 9, 10 ] ) {
|
||||
const [ nextdd, ncolours ] = follow_and_colour(
|
||||
nodes, links, faces, colours, a, a[i]
|
||||
);
|
||||
const fp = dd_fingerprint(nextdd);
|
||||
if( !(fp in seen) ) {
|
||||
add_colours(colours, ncolours);
|
||||
dds.push(nextdd);
|
||||
seen[fp] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for( const a of dds.slice(33, 76) ) {
|
||||
for( const i of [ 6, 7, 8, 9, 10 ] ) {
|
||||
const [ nextdd, ncolours ] = follow_and_colour(
|
||||
nodes, links, faces, colours, a, a[i]
|
||||
);
|
||||
const fp = dd_fingerprint(nextdd);
|
||||
if( !(fp in seen) ) {
|
||||
add_colours(colours, ncolours);
|
||||
dds.push(nextdd);
|
||||
seen[fp] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// this should get the rest or explode!
|
||||
for( const a of dds ) {
|
||||
for( const i of [ 6, 7, 8, 9, 10 ] ) {
|
||||
const [ nextdd, ncolours ] = follow_and_colour(
|
||||
nodes, links, faces, colours, a, a[i]
|
||||
);
|
||||
const fp = dd_fingerprint(nextdd);
|
||||
if( !(fp in seen) ) {
|
||||
add_colours(colours, ncolours);
|
||||
dds.push(nextdd);
|
||||
seen[fp] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const labels = { 1: [], 2:[], 3:[], 4:[], 5:[] };
|
||||
|
@ -868,15 +901,12 @@ const nodes = make_120cell_vertices();
|
|||
const links = auto_detect_edges(nodes, 4);
|
||||
const faces = auto_120cell_faces(links);
|
||||
|
||||
//const dodecas = make_120cell_cells(faces);
|
||||
|
||||
//const colours = all_meridians(nodes, links, faces, faces[0], 341);
|
||||
|
||||
//console.log(JSON.stringify(colours));
|
||||
|
||||
|
||||
// note - all_meridians colours 530 of the 600 vertices - try a simple
|
||||
// algorithm to see which of the remaining 70 have 4 neighbours labeled and
|
||||
// fill in the rest that way
|
||||
const a2 = arctic_two(nodes, links, faces, faces[0], 341)
|
||||
|
||||
console.log(`got ${a2.dodecahedra.length}`);
|
||||
|
||||
console.log(JSON.stringify(a2.labels));
|
||||
|
||||
|
||||
// have tried this and they mostly have 3 with some 1s and 2ss
|
Loading…
Reference in New Issue