Compare commits
1 Commits
main
...
feature-12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36d3eaff93 |
@ -1,12 +1,7 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
## v1.2 - 18/1/2026
|
||||
|
||||
Added a second visualisation of the 120-cell's 5-cells without the 120-cell links
|
||||
and with more colours added so you can get a sense of the individual 5-cells.
|
||||
|
||||
## v1.1 - 1/1/2026
|
||||
## v1.1 - 1/1/2025
|
||||
|
||||
The 120-cell now includes a visualisation of its inscribed 5-cells, which honestly
|
||||
looks like less of a mess than I expected it to.
|
||||
|
||||
94
cellindex.js
94
cellindex.js
@ -949,6 +949,100 @@ export const CELL120_CELL5 = {
|
||||
541
|
||||
]
|
||||
},
|
||||
"some_cell5s": {
|
||||
"1": [
|
||||
27,
|
||||
28,
|
||||
264,
|
||||
309,
|
||||
275
|
||||
],
|
||||
"2": [
|
||||
223,
|
||||
76,
|
||||
238,
|
||||
84,
|
||||
225
|
||||
],
|
||||
"3": [
|
||||
253,
|
||||
44,
|
||||
283,
|
||||
304,
|
||||
42
|
||||
],
|
||||
"4": [
|
||||
419,
|
||||
112,
|
||||
197,
|
||||
578,
|
||||
521
|
||||
],
|
||||
"5": [
|
||||
339,
|
||||
14,
|
||||
384,
|
||||
382,
|
||||
337
|
||||
],
|
||||
"6": [
|
||||
331,
|
||||
4,
|
||||
335,
|
||||
390,
|
||||
386
|
||||
],
|
||||
"7": [
|
||||
427,
|
||||
160,
|
||||
551,
|
||||
146,
|
||||
557
|
||||
],
|
||||
"8": [
|
||||
265,
|
||||
60,
|
||||
64,
|
||||
295,
|
||||
246
|
||||
],
|
||||
"9": [
|
||||
473,
|
||||
100,
|
||||
495,
|
||||
213,
|
||||
462
|
||||
],
|
||||
"10": [
|
||||
393,
|
||||
6,
|
||||
328,
|
||||
397,
|
||||
326
|
||||
],
|
||||
"11": [
|
||||
539,
|
||||
164,
|
||||
439,
|
||||
561,
|
||||
142
|
||||
],
|
||||
"12": [
|
||||
511,
|
||||
122,
|
||||
456,
|
||||
595,
|
||||
181
|
||||
],
|
||||
"13": [
|
||||
555,
|
||||
154,
|
||||
152,
|
||||
545,
|
||||
429
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -9,11 +9,12 @@ export const get_colours = (basis) => {
|
||||
const luminance = hslb['color'][2];
|
||||
const scheme = new ColorScheme;
|
||||
scheme.from_hue(hue).scheme("tetrade").distance(0.75);
|
||||
const scolours = scheme.colors();
|
||||
const colours = [ ...scolours, ...scolours, ...scolours, ...scolours, ...scolours, ...scolours, ...scolours, ...scolours ];
|
||||
const colours = scheme.colors().slice(1, 9);
|
||||
colours.reverse();
|
||||
const hsl = colours.map((c) => Color("#" + c).hsl());
|
||||
const resaturated = hsl.map((hslc) => hslc.saturationl(saturation).rgbNumber());
|
||||
resaturated.unshift(basis);
|
||||
console.log(resaturated);
|
||||
return resaturated;
|
||||
}
|
||||
|
||||
|
||||
@ -437,7 +437,7 @@ function coherent_5cells_r(cell120, all5, c5s, c50) {
|
||||
|
||||
|
||||
|
||||
function coherent_5cells(cell120, all5) {
|
||||
function coherent_5cells(cell120, all5d) {
|
||||
// pick a starting point, collect coherent 5_cells, continue till
|
||||
// there aren't any new ones
|
||||
|
||||
@ -452,41 +452,68 @@ function coherent_5cells(cell120, all5) {
|
||||
|
||||
|
||||
|
||||
function coherent_all() {
|
||||
|
||||
|
||||
const cell120 = POLYTOPES.cell120_inscribed();
|
||||
const all5 = gather_5cells(cell120);
|
||||
|
||||
const cell120 = POLYTOPES.cell120_inscribed();
|
||||
const all5 = gather_5cells(cell120);
|
||||
const c5s = coherent_5cells(cell120, all5);
|
||||
|
||||
const c5s = coherent_5cells(cell120, all5);
|
||||
|
||||
const celli = c5s.map((c5) => [ "1", "2", "3", "4", "5" ].map((l) => c5[l]));
|
||||
const celli = c5s.map((c5) => [ "1", "2", "3", "4", "5" ].map((l) => c5[l]));
|
||||
|
||||
|
||||
// check it because I don't believe it yet
|
||||
// check it because I don't believe it yet
|
||||
|
||||
const vertex_check = {};
|
||||
const vertex_check = {};
|
||||
|
||||
for( const c5 of celli ) {
|
||||
for( const l in c5 ) {
|
||||
const v = c5[l];
|
||||
if( v in vertex_check ) {
|
||||
console.log(`Double count vertex ${v}`);
|
||||
for( const c5 of celli ) {
|
||||
for( const l in c5 ) {
|
||||
const v = c5[l];
|
||||
if( v in vertex_check ) {
|
||||
console.log(`Double count vertex ${v}`);
|
||||
}
|
||||
vertex_check[v] = 1;
|
||||
}
|
||||
vertex_check[v] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for( let i = 1; i < 601; i++ ) {
|
||||
if( !vertex_check[i] ) {
|
||||
console.log(`v ${i} missing`);
|
||||
for( let i = 1; i < 601; i++ ) {
|
||||
if( !vertex_check[i] ) {
|
||||
console.log(`v ${i} missing`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const idict = {};
|
||||
for( let i = 1; i < 121; i++ ) {
|
||||
idict[i] = celli[i - 1];
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(idict, null, 2));
|
||||
}
|
||||
|
||||
|
||||
const idict = {};
|
||||
for( let i = 1; i < 121; i++ ) {
|
||||
idict[i] = celli[i - 1];
|
||||
|
||||
function coherent_one_set() {
|
||||
|
||||
|
||||
const cell120 = POLYTOPES.cell120_inscribed();
|
||||
const all5 = gather_5cells(cell120);
|
||||
|
||||
const c5ns = cell5_tetras(cell120, all5, all5[0]);
|
||||
|
||||
|
||||
const celli = c5ns.map((c5) => [ "1", "2", "3", "4", "5" ].map((l) => c5[l]));
|
||||
|
||||
|
||||
const idict = {};
|
||||
|
||||
for( let i = 0; i < celli.length; i++ ) {
|
||||
idict[i + 1] = celli[i];
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(idict, null, 2));
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(idict, null, 2));
|
||||
|
||||
coherent_one_set();
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
<script type="module" src="/main.js"></script>
|
||||
<div id="description"></div>
|
||||
<div id="release_notes"></div>
|
||||
<div id="info"><a href="#" id="show_notes">release 1.2</a> |
|
||||
<div id="info"><a href="#" id="show_notes">release 1.1</a> |
|
||||
|
||||
by <a target="_blank" href="https://mikelynch.org/">Mike Lynch</a> |
|
||||
<a target="_blank" href="https://git.tilde.town/bombinans/fourdjs">source</a></div>
|
||||
|
||||
9
main.js
9
main.js
@ -1,15 +1,6 @@
|
||||
import * as THREE from 'three';
|
||||
|
||||
const RELEASE_NOTES = `
|
||||
<p><b>v1.2 - 18/1/2026</b></p>
|
||||
|
||||
<p>Added a second visualisation of the 120-cell's 5-cells without the 120-cell links and with more colours added so you can get a sense of the individual 5-cells.</p>
|
||||
|
||||
<p><b>v1.1 - 1/1/2026</b></p>
|
||||
|
||||
<p>The 120-cell now includes a visualisation of its inscribed 5-cells, which honestly
|
||||
looks like less of a mess than I expected it to.</p>
|
||||
|
||||
<p><b>v1.0 - 16/11/2025</b></p>
|
||||
|
||||
<p>It's been <a target="_blank" href="https://mikelynch.org/2023/Sep/02/120-cell/">two years</a> since
|
||||
|
||||
74
polytopes.js
74
polytopes.js
@ -475,7 +475,7 @@ export const cell120_inscribed = () => {
|
||||
|
||||
export const cell120_inscribed_cell5 = () => {
|
||||
const nodes = make_120cell_vertices();
|
||||
const links = [];
|
||||
const links = auto_detect_edges(nodes, 4);
|
||||
|
||||
for( const cstr in CELLINDEX.INDEX120 ) {
|
||||
label_nodes(nodes, CELLINDEX.INDEX120[cstr], Number(cstr));
|
||||
@ -483,29 +483,76 @@ export const cell120_inscribed_cell5 = () => {
|
||||
|
||||
links.map((l) => l.label = 0);
|
||||
|
||||
const CELL5S = CELLINDEX.CELL120_CELL5.cell5s;
|
||||
|
||||
for( const c5 in CELL5S ) {
|
||||
const nodes5 = nodes.filter((n) => CELL5S[c5].includes(n.id));
|
||||
const links5 = auto_detect_edges(nodes5, 5);
|
||||
links5.map((l) => l.label = Number(c5));
|
||||
links.push(...links5);
|
||||
}
|
||||
|
||||
const show_links = Array.from({ length: 128 }, (_, i) => i);
|
||||
|
||||
return {
|
||||
name: '120 5-cells',
|
||||
name: '120-cell-5-cell',
|
||||
nodes: nodes,
|
||||
links: links,
|
||||
options: [
|
||||
{ name: "none", links: show_links},
|
||||
],
|
||||
description: `The 120 5-cells from the 120-cell, without the latter's links. This colouring is pretty arbitrary, being based on the algorithm which partitioned the nodes: a later version will have something that's based on the symmetries of the 600-cells which each of the 5-cells has its nodes in.`,
|
||||
{ name: "5-cells", links: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] },
|
||||
],
|
||||
description: `The 120-cell with one of its 5-cells.`,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const cell120_inscribe_cell5_subset = () => {
|
||||
const nodes = make_120cell_vertices();
|
||||
const links = auto_detect_edges(nodes, 4);
|
||||
|
||||
for( const cstr in CELLINDEX.INDEX120 ) {
|
||||
label_nodes(nodes, CELLINDEX.INDEX120[cstr], Number(cstr));
|
||||
}
|
||||
|
||||
links.map((l) => l.label = 0);
|
||||
|
||||
const CELL5S = CELLINDEX.CELL120_CELL5.some_cell5s;
|
||||
const link5s = [];
|
||||
const nodes_subset = [];
|
||||
|
||||
for( const c5 in CELL5S ) {
|
||||
const nodes5 = nodes.filter((n) => CELL5S[c5].includes(n.id));
|
||||
const cell5links = auto_detect_edges(nodes5, 5);
|
||||
cell5links.map((l) => l.label = 8);
|
||||
link5s.push(...cell5links);
|
||||
for( const n5 of nodes5 ) {
|
||||
nodes_subset.push(n5);
|
||||
}
|
||||
}
|
||||
|
||||
// now add the links of the inscribed 600-cells which have the
|
||||
// node subset in them
|
||||
|
||||
const link_subset = (l) => {
|
||||
const source = nodes_subset.filter((n) => n.id === l.source);
|
||||
const target = nodes_subset.filter((n) => n.id === l.target);
|
||||
return source.length === 1 && target.length === 1;
|
||||
};
|
||||
|
||||
for( const p of [ 1, 2, 3, 4, 5 ]) {
|
||||
const nodes600 = nodes.filter((n) => n.label === p);
|
||||
const links600 = auto_detect_edges(nodes600, 12);
|
||||
links600.map((l) => l.label = p);
|
||||
for( const link of links600 ) {
|
||||
if( link_subset(link) ) {
|
||||
link5s.push(link);
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(link5s);
|
||||
|
||||
return {
|
||||
name: '120-cell 5-cell subset',
|
||||
nodes: nodes_subset,
|
||||
links: link5s,
|
||||
options: [
|
||||
{ name: "none", links: [ 0, 1, 2, 3, 4, 5, 8 ]},
|
||||
],
|
||||
description: `Showing the subset of 5-cells in one icosahedron`,
|
||||
}
|
||||
}
|
||||
|
||||
function partition_coord(i, coords, invert) {
|
||||
const j = invert ? -i : i;
|
||||
@ -922,6 +969,7 @@ export const build_all = () => {
|
||||
cell600_layered(),
|
||||
cell120_inscribed(),
|
||||
cell120_inscribed_cell5(),
|
||||
cell120_inscribe_cell5_subset(),
|
||||
cell120_layered()
|
||||
];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user