diff --git a/label_inscribed_600cell.js b/label_inscribed_600cell.js index ce19883..7b5a104 100644 --- a/label_inscribed_600cell.js +++ b/label_inscribed_600cell.js @@ -269,3 +269,12 @@ export function equator(i600, b600, apices) { } + + +export function antipode(shape, nid) { + const n0 = shape.nodes.filter((n) => n.id === nid)[0]; + const dists = shape.nodes.map((n) => [ dist(n, n0), n ]); + dists.sort((a, b) => b[0] - a[0]); + return dists[0][1].id; +} +