Indexing for 5-cell

experiments-120-cell
Mike Lynch 2023-08-04 15:56:21 +10:00
parent b96fa62a08
commit ec56fdd75b
2 changed files with 6 additions and 6 deletions

View File

@ -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));
}

View File

@ -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},