Compare commits

..

2 Commits

Author SHA1 Message Date
bombinans 01a12bfe2a Merge pull request 'Added model of snub 24-cell' (#13) from feature-snub-24-cell into main
Reviewed-on: #13
2024-04-06 22:11:46 +00:00
Mike Lynch 9d303afaa0 Added model of snub 24-cell 2024-04-07 08:10:26 +10:00
1 changed files with 29 additions and 1 deletions

View File

@ -301,7 +301,7 @@ function auto_120cell_faces(links) {
function make_120cell_vertices() { export function make_120cell_vertices() {
const phi = 0.5 * (1 + Math.sqrt(5)); const phi = 0.5 * (1 + Math.sqrt(5));
const r5 = Math.sqrt(5); const r5 = Math.sqrt(5);
const phi2 = phi * phi; const phi2 = phi * phi;
@ -617,7 +617,34 @@ export const cell600_layered = () => {
} }
export const snub24cell = () => {
const nodes600 = make_600cell_vertices();
const links600 = auto_detect_edges(nodes600, 12);
const nodes = nodes600.filter((n) => n.label != 1);
const links = links600.filter((l) => {
const sn = node_by_id(nodes, l.source);
const tn = node_by_id(nodes, l.target);
return sn && tn;
});
console.log(nodes);
links.map((l) => l.label = 0);
return {
name: 'snub 24-cell',
nodes: nodes,
links: links,
geometry: {
node_size: 0.02,
link_size: 0.02
},
options: [ { name: "--" } ],
}
}
@ -694,6 +721,7 @@ export const build_all = () => {
cell16(), cell16(),
tesseract(), tesseract(),
cell24(), cell24(),
snub24cell(),
cell600(), cell600(),
cell600_layered(), cell600_layered(),
cell120_inscribed(), cell120_inscribed(),