diff --git a/cellindex.js b/cellindex.js index 48838bb..4a07c10 100644 --- a/cellindex.js +++ b/cellindex.js @@ -105,12 +105,10 @@ export const LAYERS120 = { }; export const CELL120_CELL5 = { - "1": [ 258, 1, 510, 304, 431 ], - "2": [ 185, 93, 222, 295, 372 ], + "1": [ 1, 93, 37, 157 ], } - // Schoute's partition via https://arxiv.org/abs/1010.4353 export const PARTITION600 = { diff --git a/explore_120cell.js b/explore_120cell.js index 474d301..af0a0de 100644 --- a/explore_120cell.js +++ b/explore_120cell.js @@ -161,9 +161,9 @@ export function gather_5cells(cell120) { } function audit_5cells(cells) { - // this verifies that for each label (a 600-cell set), each of its + // this verifies that for each label (a 600-cell set), each of its // vertices is in exactly 7 5-cells. It checks out. - + ['1','2','3','4','5'].map((l) => { const sets = {}; for( const cell of cells ) { @@ -199,7 +199,6 @@ function try_120_5_cells_fails(cell120, cells, l) { console.log("overlap"); console.log(c); return true; - } } return false; @@ -269,27 +268,24 @@ function node_dist(cell120, aid, bid) { return dist(a, b); } +function print_row(v1, v2, p, v5) { + console.log(`${v1.id},${v2.id},${p},${v5[1]},${v5[2]},${v5[3]},${v5[4]},${v5[5]}`); +} + +// for a pair of vertices which are on the same inscribed 600 cell, +// this returns all 7 pairs of 5-cells which contain v1 and v2 and +// which are also evenly spaced (ie every pair of vertices on the +// same 600-cell is one edge apart) -function follow_600(cell120, all5) { - const v = cell120.nodes[0]; - console.log("Start vertex:"); - console.log(v); - const v5s = all5.filter((c5) => c5[v.label] === v.id); - console.log(`Vertex ${v.id} belongs to these 5-cells:`); - console.log(v5s); - const n600s = neighbours600(cell120, v.id); - const n600id = n600s[0]; - const n600 = cell120node(cell120, n600id); - console.log("One 600-cell neighbour:"); - console.log(n600); - const DIST600 = round_dist(node_dist(cell120, v.id, n600id)); - const nv5s = all5.filter((c5) => c5[v.label] === n600id); - console.log(`Vertex ${n600id} belongs to these 5-cells:`); - console.log(nv5s); - console.log("Distances for each pair of 5-cells from the two sets:"); - for( const v5a of v5s ) { - for( const v5b of nv5s ) { +function find_adjoining_5cells(cell120, all5, v1, v2) { + const DIST600 = round_dist(node_dist(cell120, v1.id, v2.id)); + const v15s = all5.filter((c5) => c5[v1.label] === v1.id); + const v25s = all5.filter((c5) => c5[v2.label] === v2.id); + let p = 0; + const c5pairs = []; + for( const v5a of v15s ) { + for( const v5b of v25s ) { let match = true; const d = {}; for( const label in v5a ) { @@ -299,19 +295,35 @@ function follow_600(cell120, all5) { } } if( match ) { - console.log("--- pair ---"); - console.log(v5a); - console.log(v5b); + c5pairs.push([ v5a, v5b ]); } } } + return c5pairs; } +function tetra_600_cell(cell120, all5) { + // find a tetrahedron on one of the 600-cells + + const v1 = cell120.nodes[0]; + const n600s = neighbours600(cell120, v1.id); + const v2id = n600s[0]; + const n2600s = neighbours600(cell120, v2id); + // find mutual neighbours of the first two + const mutuals = n2600s.filter((nid) => nid != v2id && nid != v1.id && n600s.includes(nid)); + // find mutuals which are mutuals of each other + const m0 = mutuals[0]; + const mn = neighbours600(cell120, m0); + const mm = mn.filter((nid) => nid != m0 && mutuals.includes(nid)); + return [ v1.id, v2id, m0, mm[0] ]; +} const cell120 = POLYTOPES.cell120_inscribed(); const all5 = gather_5cells(cell120); -follow_600(cell120, all5); +const tetra = tetra_600_cell(cell120, all5); + +console.log(tetra); diff --git a/polytopes.js b/polytopes.js index dd1f328..cc26b25 100644 --- a/polytopes.js +++ b/polytopes.js @@ -473,14 +473,14 @@ export const cell120_inscribed_cell5 = () => { const links = []; - for( const p of [ 1, 2 ]) { +/* for( const p of [ 1, 2 ]) { const nodes600 = nodes.filter((n) => n.label === p); const links600 = auto_detect_edges(nodes600, 12); links600.map((l) => l.label = p); links.push(...links600); } - for( const c5 in CELLINDEX.CELL120_CELL5 ) { +*/ for( const c5 in CELLINDEX.CELL120_CELL5 ) { const nodes5 = nodes.filter((n) => CELLINDEX.CELL120_CELL5[c5].includes(n.id)); const links5 = auto_detect_edges(nodes5, 4); links5.map((l) => l.label = 0);