feature-120-cell-layers #7
							
								
								
									
										2
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.js
									
									
									
									
									
								
							| @ -62,7 +62,7 @@ for( const face_m of face_ms ) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| const STRUCTURES = [ POLYTOPES.cell120_inscribed() ]; | const STRUCTURES = POLYTOPES.build_all(); | ||||||
| 
 | 
 | ||||||
| const STRUCTURES_BY_NAME = {}; | const STRUCTURES_BY_NAME = {}; | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										21
									
								
								polytopes.js
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								polytopes.js
									
									
									
									
									
								
							| @ -133,6 +133,15 @@ export const tesseract = () => { | |||||||
| 
 | 
 | ||||||
| 	scale_nodes(nodes, Math.sqrt(2) / 2); | 	scale_nodes(nodes, Math.sqrt(2) / 2); | ||||||
| 	const links = auto_detect_edges(nodes, 4); | 	const links = auto_detect_edges(nodes, 4); | ||||||
|  | 	links.map((l) => { l.label = 0 }); | ||||||
|  | 
 | ||||||
|  | 	for( const p of [ 1, 2 ] ) { | ||||||
|  | 		const nodes16 = nodes.filter((n) => n.label === p); | ||||||
|  | 		const links16 = auto_detect_edges(nodes16, 6); | ||||||
|  | 		links16.map((l) => l.label = p); | ||||||
|  | 		links.push(...links16); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| 	return { | 	return { | ||||||
| 		name: 'tesseract', | 		name: 'tesseract', | ||||||
| @ -142,10 +151,10 @@ export const tesseract = () => { | |||||||
| 			node_size: 0.02, | 			node_size: 0.02, | ||||||
| 			link_size: 0.02 | 			link_size: 0.02 | ||||||
| 		}, | 		}, | ||||||
| 		base: {}, |  | ||||||
| 		options: [ | 		options: [ | ||||||
| 			[ 'One inscribed 16-cell', {} ], | 			{ name: 'normal', links: [ 0 ] }, | ||||||
| 			[ 'Both inscribed 16-cells', {} ], | 			{ name: 'one 16-cell', links: [ 0, 1 ] }, | ||||||
|  | 			{ name: 'both 16-cells', links: [ 0, 1, 2 ] }, | ||||||
| 		], | 		], | ||||||
| 	}; | 	}; | ||||||
| } | } | ||||||
| @ -785,3 +794,9 @@ export const dodecahedron_inscribed = () => dodecahedron_some_inscribed([1]); | |||||||
| export const dodecahedron_all_inscribed = () => dodecahedron_some_inscribed([1,2,3,4,5]); | export const dodecahedron_all_inscribed = () => dodecahedron_some_inscribed([1,2,3,4,5]); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | export const build_all = () => { | ||||||
|  | 	return [ | ||||||
|  | 		tesseract(), | ||||||
|  | 	 	cell120_inscribed() | ||||||
|  | 	 	]; | ||||||
|  | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user