feature-120-cell-more-inscriptions #24
1
explore_120
Normal file
1
explore_120
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
@ -304,26 +304,67 @@ function find_adjoining_5cells(cell120, all5, v1, v2) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function tetra_600_cell(cell120, all5) {
|
function tetras(cell120, all5, v) {
|
||||||
// find a tetrahedron on one of the 600-cells
|
// given a vertex v, find all of the 600-cell tetras it's on
|
||||||
|
|
||||||
const v1 = cell120.nodes[0];
|
const n600s = neighbours600(cell120, v.id);
|
||||||
const n600s = neighbours600(cell120, v1.id);
|
// need to find all sets of three neighbours which are neighbours: there
|
||||||
const v2id = n600s[0];
|
// should be 20 of these because they're faces of an icosahedron
|
||||||
const n2600s = neighbours600(cell120, v2id);
|
console.log(v.id);
|
||||||
|
const tetras = new Set;
|
||||||
|
for( const v2id of n600s ) {
|
||||||
// find mutual neighbours of the first two
|
// find mutual neighbours of the first two
|
||||||
const mutuals = n2600s.filter((nid) => nid != v2id && nid != v1.id && n600s.includes(nid));
|
const n2600s = neighbours600(cell120, v2id);
|
||||||
// find mutuals which are mutuals of each other
|
const mutuals = n2600s.filter((nid) => {
|
||||||
|
return nid != v2id && nid != v.id && n600s.includes(nid)
|
||||||
|
});
|
||||||
|
for( const nm of mutuals ) {
|
||||||
|
const nnms = neighbours600(cell120, nm);
|
||||||
|
const mutuals2 = nnms.filter((nid) => {
|
||||||
|
return nid != nm && nid != v2id && nid != v.id && mutuals.includes(nid)
|
||||||
|
});
|
||||||
|
for( const m2 of mutuals2 ) {
|
||||||
|
const t = [ v.id, v2id, nm, m2 ];
|
||||||
|
t.sort((a, b) => a - b);
|
||||||
|
const tstr = t.join(',');
|
||||||
|
tetras.add(tstr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(tetras);
|
||||||
|
}
|
||||||
|
/* // find mutuals which are mutuals of each other
|
||||||
const m0 = mutuals[0];
|
const m0 = mutuals[0];
|
||||||
const mn = neighbours600(cell120, m0);
|
const mn = neighbours600(cell120, m0);
|
||||||
const mm = mn.filter((nid) => nid != m0 && mutuals.includes(nid));
|
const mm = mn.filter((nid) => nid != m0 && mutuals.includes(nid));
|
||||||
return [ v1.id, v2id, m0, mm[0] ];
|
return [ v1.id, v2id, m0, mm[0] ];
|
||||||
|
}*/
|
||||||
|
|
||||||
|
function str5cell(c5) {
|
||||||
|
return ["1","2","3","4","5"].map((l) => String(c5[l]).padStart(3, '0')).join('-');
|
||||||
|
}
|
||||||
|
|
||||||
|
function tetra_sets(cell120, all5, tetra) {
|
||||||
|
// given a tetrahedron on a 600-cell, find the sets of adjacent 5-cells on
|
||||||
|
// all of the pairs
|
||||||
|
// this is ass-backwards. Need to find tetras on the other 4 vertices of a 5-cell
|
||||||
|
|
||||||
|
const vs = tetra.map((tid) => cell120node(cell120, tid));
|
||||||
|
const pairs = [[0,1], [0,2], [0, 3], [1, 2], [1, 3], [2, 3]];
|
||||||
|
for( const p of pairs ) {
|
||||||
|
const v1 = vs[p[0]];
|
||||||
|
const v2 = vs[p[1]];
|
||||||
|
const c5pairs = find_adjoining_5cells(cell120, all5, v1, v2);
|
||||||
|
console.log(v1.id, v2.id);
|
||||||
|
console.log(c5pairs.map((p) => str5cell(p[0]) + " " + str5cell(p[1])));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const cell120 = POLYTOPES.cell120_inscribed();
|
const cell120 = POLYTOPES.cell120_inscribed();
|
||||||
const all5 = gather_5cells(cell120);
|
const all5 = gather_5cells(cell120);
|
||||||
|
|
||||||
const tetra = tetra_600_cell(cell120, all5);
|
const v1 = cell120.nodes[0];
|
||||||
|
|
||||||
console.log(tetra);
|
tetras(cell120, all5, v1);
|
||||||
|
tetras(cell120, all5, cell120.nodes[1]);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user