I seem to have done it
This commit is contained in:
parent
7bf5adcb3a
commit
8cc2622ae4
185
cellindex.js
185
cellindex.js
@ -184,6 +184,53 @@ export const CELL600_METAMAP = {
|
||||
581: 67,
|
||||
592: 66,
|
||||
593: 71,
|
||||
|
||||
|
||||
38: 2,
|
||||
98: 96,
|
||||
120: 34,
|
||||
126: 100,
|
||||
149: 14,
|
||||
156: 20,
|
||||
174: 40,
|
||||
200: 90,
|
||||
210: 102,
|
||||
218: 56,
|
||||
226: 64,
|
||||
252: 44,
|
||||
263: 92,
|
||||
272: 110,
|
||||
279: 38,
|
||||
284: 76,
|
||||
296: 26,
|
||||
311: 98,
|
||||
320: 36,
|
||||
325: 60,
|
||||
334: 52,
|
||||
342: 112,
|
||||
350: 94,
|
||||
362: 104,
|
||||
383: 74,
|
||||
389: 30,
|
||||
400: 42,
|
||||
414: 48,
|
||||
420: 62,
|
||||
438: 108,
|
||||
440: 58,
|
||||
448: 12,
|
||||
458: 24,
|
||||
474: 80,
|
||||
488: 106,
|
||||
494: 16,
|
||||
512: 28,
|
||||
514: 54,
|
||||
530: 22,
|
||||
546: 78,
|
||||
550: 50,
|
||||
558: 32,
|
||||
566: 46,
|
||||
580: 18,
|
||||
600: 10,
|
||||
};
|
||||
|
||||
export const CELL120_CELL5 = {
|
||||
@ -1128,6 +1175,144 @@ export const CELL120_CELL5 = {
|
||||
|
||||
};
|
||||
|
||||
// my application of Schoute's partition onto one inscribed 600-cell of the
|
||||
// 120-cell, which is why this is only 120 out of 600 vertices. This is used
|
||||
// to give a coherent colour scheme to the inscribed 5-cells
|
||||
|
||||
export const CELL120_CELL5_LABELS {
|
||||
"1": [
|
||||
27,
|
||||
38,
|
||||
140,
|
||||
149,
|
||||
156,
|
||||
165,
|
||||
234,
|
||||
239,
|
||||
241,
|
||||
248,
|
||||
300,
|
||||
301,
|
||||
448,
|
||||
449,
|
||||
458,
|
||||
471,
|
||||
494,
|
||||
499,
|
||||
527,
|
||||
530,
|
||||
573,
|
||||
580,
|
||||
585,
|
||||
600
|
||||
],
|
||||
"2": [
|
||||
74,
|
||||
87,
|
||||
126,
|
||||
131,
|
||||
185,
|
||||
200,
|
||||
218,
|
||||
223,
|
||||
226,
|
||||
231,
|
||||
313,
|
||||
320,
|
||||
388,
|
||||
389,
|
||||
393,
|
||||
400,
|
||||
427,
|
||||
438,
|
||||
444,
|
||||
453,
|
||||
525,
|
||||
532,
|
||||
543,
|
||||
546
|
||||
],
|
||||
"3": [
|
||||
258,
|
||||
263,
|
||||
274,
|
||||
279,
|
||||
306,
|
||||
311,
|
||||
356,
|
||||
357,
|
||||
369,
|
||||
376,
|
||||
403,
|
||||
406,
|
||||
413,
|
||||
414,
|
||||
419,
|
||||
420,
|
||||
473,
|
||||
474,
|
||||
487,
|
||||
488,
|
||||
511,
|
||||
512,
|
||||
513,
|
||||
514
|
||||
],
|
||||
"4": [
|
||||
48,
|
||||
49,
|
||||
105,
|
||||
120,
|
||||
207,
|
||||
210,
|
||||
252,
|
||||
253,
|
||||
284,
|
||||
285,
|
||||
324,
|
||||
325,
|
||||
339,
|
||||
342,
|
||||
347,
|
||||
350,
|
||||
490,
|
||||
503,
|
||||
539,
|
||||
550,
|
||||
558,
|
||||
563,
|
||||
572,
|
||||
581
|
||||
],
|
||||
"5": [
|
||||
61,
|
||||
68,
|
||||
95,
|
||||
98,
|
||||
174,
|
||||
179,
|
||||
265,
|
||||
272,
|
||||
289,
|
||||
296,
|
||||
331,
|
||||
334,
|
||||
362,
|
||||
367,
|
||||
378,
|
||||
383,
|
||||
425,
|
||||
440,
|
||||
460,
|
||||
469,
|
||||
555,
|
||||
566,
|
||||
592,
|
||||
593
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Schoute's partition via https://arxiv.org/abs/1010.4353
|
||||
|
||||
|
||||
@ -273,8 +273,110 @@ export function equator(i600, b600, apices) {
|
||||
|
||||
export function antipode(shape, nid) {
|
||||
const n0 = shape.nodes.filter((n) => n.id === nid)[0];
|
||||
if( !n0 ) {
|
||||
throw new Error(`antipodes error: couldn't find node ${nid} in shape`);
|
||||
}
|
||||
const dists = shape.nodes.map((n) => [ dist(n, n0), n ]);
|
||||
dists.sort((a, b) => b[0] - a[0]);
|
||||
return dists[0][1].id;
|
||||
return dists[0][1];
|
||||
}
|
||||
|
||||
|
||||
export function check_antipodes() {
|
||||
const c600 = base_600cell();
|
||||
const seen = {};
|
||||
c600.nodes.map((n) => {
|
||||
const a = antipode(c600, n.id);
|
||||
if( !seen[a.id] && !seen[n.id] ) {
|
||||
seen[a.id] = true;
|
||||
seen[n.id] = true;
|
||||
console.log(`${n.id} - ${n.label} / ${a.id} - ${a.label}`);
|
||||
if( n.label !== a.label ) {
|
||||
console.lot("MISMATCH");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function meta600_label(b600, iid) {
|
||||
const bid = CELLINDEX.CELL600_METAMAP[iid];
|
||||
const bn = b600.nodes.filter((n) => bid === n.id);
|
||||
return bn[0].label;
|
||||
}
|
||||
|
||||
|
||||
export function map_antipodes() {
|
||||
const b600 = base_600cell();
|
||||
const i600 = make_one_600cell();
|
||||
const already = [];
|
||||
const antimap = {};
|
||||
for( const inid in CELLINDEX.CELL600_METAMAP ) {
|
||||
const bnid = CELLINDEX.CELL600_METAMAP[inid];
|
||||
const banti = antipode(b600, Number(bnid));
|
||||
const ianti = antipode(i600, Number(inid));
|
||||
if( CELLINDEX.CELL600_METAMAP[ianti.id] ) {
|
||||
//console.log(`Anti ${ianti.id} is already mapped`);
|
||||
already.push(ianti.id);
|
||||
const l1 = meta600_label(b600, inid);
|
||||
const l2 = meta600_label(b600, Number(ianti.id));
|
||||
//console.log(`labels: ${l1} ${l2}`);
|
||||
} else {
|
||||
antimap[ianti.id] = banti.id;
|
||||
}
|
||||
}
|
||||
console.log(JSON.stringify(antimap, null, 2));
|
||||
}
|
||||
|
||||
|
||||
export function check_metamap_completeness() {
|
||||
const b600 = base_600cell();
|
||||
const i600 = make_one_600cell();
|
||||
const labels = {};
|
||||
const bids = {};
|
||||
const mm = CELLINDEX.CELL600_METAMAP;
|
||||
for( const i of i600.nodes ) {
|
||||
if( i.id in mm ) {
|
||||
const ml = meta600_label(b600, i.id);
|
||||
if( !(ml in labels) ) {
|
||||
labels[ml] = [];
|
||||
}
|
||||
labels[ml].push(i.id);
|
||||
bids[mm[i.id]] = 1;
|
||||
} else {
|
||||
console.log(`inscribed node ${i.id} is not in metamap`);
|
||||
}
|
||||
}
|
||||
for( const b of b600.nodes ) {
|
||||
if( !(b.id in bids) ) {
|
||||
console.log(`base mode ${b.id} is not mapped`);
|
||||
}
|
||||
}
|
||||
for ( const label in labels ) {
|
||||
console.log(`label ${label} has ${labels[label].length} nodes`);
|
||||
}
|
||||
}
|
||||
|
||||
// this gives a mapping from cell-120-ids of one inscribed 600-cell to the
|
||||
// metamap labels, which I can then [checks notes] use to colour the 5-cells.
|
||||
|
||||
export function metamap_to_labels() {
|
||||
const b600 = base_600cell();
|
||||
const i600 = make_one_600cell();
|
||||
const labels = {
|
||||
1: [],
|
||||
2: [],
|
||||
3: [],
|
||||
4: [],
|
||||
5: [],
|
||||
};
|
||||
for( const inode of i600.nodes ) {
|
||||
const ml = meta600_label(b600, inode.id);
|
||||
labels[ml].push(inode.id);
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(labels, null, 2));
|
||||
}
|
||||
|
||||
|
||||
metamap_to_labels();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user