diff --git a/permute_testbed.js b/permute_testbed.js index 09c109c..8976bc2 100644 --- a/permute_testbed.js +++ b/permute_testbed.js @@ -349,7 +349,7 @@ function auto_120cell_faces(links) { for( const face of shared ) { const fp = fingerprint(face); if( !seen[fp] ) { - faces.push({ id: id, nodes: face }); + faces.push({ id: id, edge: edge.id, v1: edge.source, v2: edge.target, fingerprint: fp, nodes: face }); id++; seen[fp] = true; } @@ -360,6 +360,9 @@ function auto_120cell_faces(links) { + + + const cell120 = () => { const nodes = make_120cell_vertices(); const links = auto_detect_edges(nodes, 4); @@ -786,5 +789,17 @@ function naive_label_120cell(nodes, links, n) { const nodes = make_120cell_vertices(); const links = auto_detect_edges(nodes, 4); +const faces = auto_120cell_faces(links); +console.log('links'); + +for( const link of links ) { + console.log(link); +} + +console.log('faces'); + +for( const face of faces ) { + console.log(face); +} diff --git a/polytopes.js b/polytopes.js index 3454590..f9437df 100644 --- a/polytopes.js +++ b/polytopes.js @@ -368,6 +368,28 @@ function naive_label_120cell(nodes, links, n) { } +function manual_label_120cell(nodes, links) { + + const faces = auto_120cell_faces(links); + const cfaces = [ 1, 2, 4, 145, 169 ]; + + const ns = new Set(); + + for( const fid of cfaces ) { + const face = faces.filter((f)=> f.id === fid ); + console.log(face); + if( face.length > 0 ) { + for ( const nid of face[0].nodes ) { + ns.add(nid); + } + } + } + + + label_nodes(nodes, Array.from(ns), 4); + +} + @@ -376,7 +398,7 @@ export const cell120 = () => { const nodes = make_120cell_vertices(); const links = auto_detect_edges(nodes, 4); - naive_label_120cell(nodes, links); + manual_label_120cell(nodes, links); return { nodes: nodes,