Skip to content

Function: tileSizeToSubdivisions()

ts
function tileSizeToSubdivisions(radius, tileSize): number;

Derives the hexasphere subdivision count needed to make each tile match tileSize on the surface of a sphere of the given radius.

The relation follows from the Goldberg polyhedron tile count: N = (4π r²) / tileSize² and N = 10·f² + 2 where f is the subdivision frequency returned.

Parameters

ParameterTypeDescription
radiusnumberSphere radius in world units.
tileSizenumberTarget tile edge length in world units.

Returns

number

Subdivision frequency (≥ 2).

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