successfully traversed a great circle

experiments-120-cell
Mike Lynch 2023-08-26 16:02:48 +10:00
parent 3b806c3796
commit f4176b9ced
2 changed files with 94 additions and 13 deletions

View File

@ -370,28 +370,88 @@ function manual_label_120cell(nodes, links) {
}
function semiautomatic_label_120cell(nodes, links) {
const COLOURS = {
1: [ 313, 157, 461, 505 ],
2: [ 1, 153, 29, 105 ],
3: [ 317, 409, 265, 109 ],
4: [ 221, 337, 25, 509 ],
5: [ 217, 413, 457, 361 ]
};
for( const col in COLOURS ) {
label_nodes(nodes, COLOURS[col], col);
function meridian_label_120cell(nodes, links) {
const DODECAS = [
[
313, 1, 317, 221, 217, 417,
341, 421, 165, 161, 465, 469,
37, 269, 33, 113, 117, 517,
365, 513
],
[
513, 365, 517, 117, 113, 577,
15, 581, 565, 561, 397, 399,
85, 389, 81, 301, 303, 213,
293, 209
],
[
301, 209, 293, 213, 303,
211, 309, 294, 311, 215,
310, 210, 214, 312, 295,
212, 302, 304, 216, 296
],
[
304, 302, 212, 296, 216, 400,
398, 84, 392, 88, 16, 580,
564, 568, 584, 368, 516, 116,
120, 520
],
[
368, 516, 116, 120, 520, 272,
36, 468, 472, 40, 164, 420,
344, 424, 168, 220, 316, 4,
320, 224
],
[
316, 4, 320, 224, 220, 412,
340, 416, 160, 156, 460, 464,
32, 268, 28, 108, 112, 512,
364, 508
],
[
508, 364, 512, 112, 108, 572,
14, 576, 560, 556, 394, 396,
80, 388, 76, 298, 300, 208,
292, 204
],
[
300, 298, 204, 292, 208,
206, 202, 306, 291, 308,
290, 305, 203, 207, 307,
289, 201, 297, 299, 205
],
[
299, 297, 201, 289, 205, 395,
393, 73, 385, 77, 13, 569,
553, 557, 573, 361, 505, 105,
109, 509
],
[
361, 505, 105, 109, 509, 265,
25, 457, 461, 29, 153, 409,
337, 413, 157, 217, 313, 1,
317, 221
]
]
let col = 1;
for( const dd of DODECAS ) {
label_nodes(nodes, dd, 5);
col++;
if( col > 5 ) {
col = 1;
}
}
}
export const cell120 = () => {
const nodes = make_120cell_vertices();
const links = auto_detect_edges(nodes, 4);
semiautomatic_label_120cell(nodes, links);
meridian_label_120cell(nodes, links);
return {
nodes: nodes,

View File

@ -479,6 +479,27 @@ function colour_one_dodecahedron(faces, face, node, p) {
}
// go along a meridian
function meridian(faces, startf, startn) {
const dds = [ face_plus_to_dodecahedron(faces, startf, startn) ];
while( dds.length < 10 ) {
const dd = dds[dds.length - 1];
const nextf = dd[11]; // opposite to startf
const neighbours = find_adjacent_faces(faces, nextf);
const nextnbors = neighbours.filter((f) => !dd.includes(f));
const nextdd = faces_to_dodecahedron(faces, nextf, nextnbors[0]);
dds.push(nextdd);
}
return dds;
}