UNPKG

d3-geo-polygon

Version:

Clipping and geometric operations for spherical polygons.

18 lines (16 loc) 315 B
// TODO generate on-the-fly to avoid external modification. const octahedron = [ [0, 90], [-90, 0], [0, 0], [90, 0], [180, 0], [0, -90] ]; export default [ [0, 2, 1], [0, 3, 2], [5, 1, 2], [5, 2, 3], [0, 1, 4], [0, 4, 3], [5, 4, 1], [5, 3, 4] ].map((face) => face.map((i) => octahedron[i]));