Skip to content

Instantly share code, notes, and snippets.

View Inscrutabilis's full-sized avatar

Ivan Grishulenko Inscrutabilis

  • LLC ICB Sovcombank
  • Novosibirsk, Russian Federation
View GitHub Profile
@Inscrutabilis
Inscrutabilis / GeodesicSphere.js
Created December 12, 2010 05:29
Three.js geodesic sphere primitive class
/**
* @author Inscrutabilis / mailto:[email protected]
*/
/*
* Generates a geodesic sphere geometry
* By default, it is 1x1x1 octahedron, as a first approximation to sphere
* It will return more sphere-like object if you specify iterations > 0
* But please keep in mind that it generates (4 ^ iterations) * 8 faces
* Radius argument overrides default sphere radius (1)