feature-120-cell-more-inscriptions #24

Merged
bombinans merged 20 commits from feature-120-cell-more-inscriptions into main 2026-01-01 07:27:01 +00:00
3 changed files with 41 additions and 31 deletions
Showing only changes of commit f5afdff3bb - Show all commits

View File

@ -105,12 +105,10 @@ export const LAYERS120 = {
}; };
export const CELL120_CELL5 = { export const CELL120_CELL5 = {
"1": [ 258, 1, 510, 304, 431 ], "1": [ 1, 93, 37, 157 ],
"2": [ 185, 93, 222, 295, 372 ],
} }
// Schoute's partition via https://arxiv.org/abs/1010.4353 // Schoute's partition via https://arxiv.org/abs/1010.4353
export const PARTITION600 = { export const PARTITION600 = {

View File

@ -199,7 +199,6 @@ function try_120_5_cells_fails(cell120, cells, l) {
console.log("overlap"); console.log("overlap");
console.log(c); console.log(c);
return true; return true;
} }
} }
return false; return false;
@ -269,27 +268,24 @@ function node_dist(cell120, aid, bid) {
return dist(a, b); 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) { function find_adjoining_5cells(cell120, all5, v1, v2) {
const v = cell120.nodes[0]; const DIST600 = round_dist(node_dist(cell120, v1.id, v2.id));
console.log("Start vertex:"); const v15s = all5.filter((c5) => c5[v1.label] === v1.id);
console.log(v); const v25s = all5.filter((c5) => c5[v2.label] === v2.id);
const v5s = all5.filter((c5) => c5[v.label] === v.id); let p = 0;
console.log(`Vertex ${v.id} belongs to these 5-cells:`); const c5pairs = [];
console.log(v5s); for( const v5a of v15s ) {
const n600s = neighbours600(cell120, v.id); for( const v5b of v25s ) {
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 ) {
let match = true; let match = true;
const d = {}; const d = {};
for( const label in v5a ) { for( const label in v5a ) {
@ -299,19 +295,35 @@ function follow_600(cell120, all5) {
} }
} }
if( match ) { if( match ) {
console.log("--- pair ---"); c5pairs.push([ v5a, v5b ]);
console.log(v5a);
console.log(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 cell120 = POLYTOPES.cell120_inscribed();
const all5 = gather_5cells(cell120); const all5 = gather_5cells(cell120);
follow_600(cell120, all5); const tetra = tetra_600_cell(cell120, all5);
console.log(tetra);

View File

@ -473,14 +473,14 @@ export const cell120_inscribed_cell5 = () => {
const links = []; const links = [];
for( const p of [ 1, 2 ]) { /* for( const p of [ 1, 2 ]) {
const nodes600 = nodes.filter((n) => n.label === p); const nodes600 = nodes.filter((n) => n.label === p);
const links600 = auto_detect_edges(nodes600, 12); const links600 = auto_detect_edges(nodes600, 12);
links600.map((l) => l.label = p); links600.map((l) => l.label = p);
links.push(...links600); 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 nodes5 = nodes.filter((n) => CELLINDEX.CELL120_CELL5[c5].includes(n.id));
const links5 = auto_detect_edges(nodes5, 4); const links5 = auto_detect_edges(nodes5, 4);
links5.map((l) => l.label = 0); links5.map((l) => l.label = 0);