From ec56fdd75b8f70669a5e8854685a66f2db50c605 Mon Sep 17 00:00:00 2001 From: Mike Lynch Date: Fri, 4 Aug 2023 15:56:21 +1000 Subject: [PATCH] Indexing for 5-cell --- colours.js | 2 +- polytopes.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/colours.js b/colours.js index 1224d8f..c7b33a8 100644 --- a/colours.js +++ b/colours.js @@ -3,7 +3,7 @@ import ColorScheme from 'color-scheme'; export const get_colours = (basis) => { const scheme = new ColorScheme; const hexbasis = basis.toString(16).padStart(6, "0"); - scheme.from_hex(hexbasis).scheme("triade").variation("hard").distance(0.5); + scheme.from_hex(hexbasis).scheme("analogic").variation("hard").distance(0.5); return scheme.colors().map((cs) => parseInt('0x' + cs)); } diff --git a/polytopes.js b/polytopes.js index d54060f..1d825f8 100644 --- a/polytopes.js +++ b/polytopes.js @@ -61,11 +61,11 @@ export const cell5 = () => { const r2 = Math.sqrt(2) / 2; return { nodes: [ - {id:1, x: r2, y: r2, z: r2, w: -r2 / r5 }, - {id:2, x: r2, y: -r2, z: -r2, w: -r2 / r5 }, - {id:3, x: -r2, y: r2, z: -r2, w: -r2 / r5 }, - {id:4, x: -r2, y: -r2, z: r2, w: -r2 / r5 }, - {id:5, x: 0, y: 0, z: 0, w: 4 * r2 / r5 }, + {id:1, label: 0, x: r2, y: r2, z: r2, w: -r2 / r5 }, + {id:2, label: 1, x: r2, y: -r2, z: -r2, w: -r2 / r5 }, + {id:3, label: 2, x: -r2, y: r2, z: -r2, w: -r2 / r5 }, + {id:4, label: 3, x: -r2, y: -r2, z: r2, w: -r2 / r5 }, + {id:5, label: 4, x: 0, y: 0, z: 0, w: 4 * r2 / r5 }, ], links: [ { id:1, source:1, target: 2},