bringing back 24-cell indexing

experiments-120-cell
Mike Lynch 2023-08-04 15:21:02 +10:00
parent 1a12c82a5d
commit d8b5d4eacb
1 changed files with 10 additions and 4 deletions

View File

@ -125,17 +125,23 @@ export const tesseract = () => {
const CELL24_INDEXING = {
x: { y: 'RED', z: 'BLUE', w: 'GREEN' },
y: { z: 'GREEN', w: 'BLUE' },
z: { w: 'RED' }
x: { y: 0, z: 2, w: 1 },
y: { z: 1, w: 2 },
z: { w: 0 }
};
export const cell24 = () => {
const nodes = PERMUTE.coordinates([0, 0, 1, 1], 0);
for( const n of nodes ) {
const axes = ['x', 'y', 'z', 'w'].filter((a) => n[a] !== 0);
n.label = CELL24_INDEXING[axes[0]][axes[1]];
}
index_nodes(nodes);
const links = auto_detect_edges(nodes, 6);
const links = auto_detect_edges(nodes, 8);
return {
nodes: nodes,