From e809e72083bab4905606ce31cd89c0ba88eb621c Mon Sep 17 00:00:00 2001 From: Mike Lynch Date: Thu, 5 Feb 2026 12:15:10 +1100 Subject: [PATCH] routine to find the shared neighbours of n vertices for the next layer --- label_inscribed_600cell.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/label_inscribed_600cell.js b/label_inscribed_600cell.js index 600fc11..d2b3910 100644 --- a/label_inscribed_600cell.js +++ b/label_inscribed_600cell.js @@ -134,6 +134,21 @@ export function face_vertices(shape, f1, f2, f3) { return ns; } + +export function shared_neighbours(shape, nodes) { + // for f1/f2/f3 forming a triangular face, return the two vertices of the + // adjacent tetrahedra + + 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) { console.log("Layer neighbours"); for( const n of layer ) {