Skip to content

Function: generateHexasphere()

ts
function generateHexasphere(radius, subdivisions): HexasphereData;

Generate the hexasphere by building the dual of the subdivided icosahedron.

Algorithm:

  1. Subdivide each icosahedron face into n² triangles
  2. Project all vertices onto the unit sphere
  3. For each unique vertex, find all adjacent triangles
  4. Use the centroids of those triangles + midpoints of shared edges to form the tile boundary (hex or pent)

Parameters

ParameterType
radiusnumber
subdivisionsnumber

Returns

HexasphereData

Distribué sous la licence indiquée dans le dépôt.