Compare commits

..

2 Commits

Author SHA1 Message Date
Mike Lynch
93d8a31f71 Next layer is done 2026-02-05 18:02:22 +11:00
Mike Lynch
e809e72083 routine to find the shared neighbours of n vertices for the next layer 2026-02-05 12:15:10 +11:00
2 changed files with 57 additions and 1 deletions

View File

@ -140,6 +140,21 @@ export const CELL600_METAMAP = {
306: 103, 306: 103,
207: 99, 207: 99,
573: 15, 573: 15,
565: 25,
513: 29,
285: 77,
324: 61,
231: 57,
487: 73,
413: 59,
425: 63,
378: 79,
388: 27,
543: 75,
289: 31,
}; };
export const CELL120_CELL5 = { export const CELL120_CELL5 = {

View File

@ -134,6 +134,19 @@ export function face_vertices(shape, f1, f2, f3) {
return ns; return ns;
} }
export function shared_neighbours(shape, nodes) {
let ns = shape.nodes.map((n) => n.id);
for( const n of nodes ) {
ns = neighbours_in_subset(shape, ns, n);
}
return ns;
}
export function layer_neighbours(cell600, layer) { export function layer_neighbours(cell600, layer) {
console.log("Layer neighbours"); console.log("Layer neighbours");
for( const n of layer ) { for( const n of layer ) {
@ -171,6 +184,25 @@ export const ARCTIC_FACES = ARCTIC_I_FACES.map((f) => {
return f.map((nid) => CELLINDEX.CELL600_METAMAP[nid]); return f.map((nid) => CELLINDEX.CELL600_METAMAP[nid]);
}); });
export const TEMPERATE_PENTAGONS_I = [
[ 499, 179, 471, 367, 131 ],
[ 131, 367, 165, 313, 449 ],
[ 131, 449, 185, 258, 499 ],
[ 499, 258, 140, 274, 179 ],
[ 179, 274, 527, 95, 471 ],
[ 471, 95, 347, 165, 367 ],
[ 347, 573, 105, 313, 165 ],
[ 313, 105, 585, 185, 449 ],
[ 185, 585, 306, 140, 258 ],
[ 140, 306, 207, 527, 274 ],
[ 527, 207, 573, 347, 95 ],
[ 105, 573, 207, 306, 585 ],
]
export const TEMPERATE_PENTAGONS = TEMPERATE_PENTAGONS_I.map((f) => {
return f.map((nid) => CELLINDEX.CELL600_METAMAP[nid])
});
export function layer_two(cell600, centre, faces) { export function layer_two(cell600, centre, faces) {
@ -181,6 +213,15 @@ export function layer_two(cell600, centre, faces) {
} }
export function layer_three(shape, pentagons) {
for ( const pentagon of pentagons ) {
console.log(pentagon);
const s = shared_neighbours(shape, pentagon);
console.log(s);
console.log("\n");
}
}
/*const cell600 = make_one_600cell(); /*const cell600 = make_one_600cell();
const layered = insc600_layers(cell600); const layered = insc600_layers(cell600);