
(in this image, the 15 cells with positive X, Y, and Z coordinates are highlighted.)
Determining which sector (the ico_id) a point lies inThe idea is to detect which of the 120 "sectors" a point is in. The sign of the x/y/z coordinates indicated which of the 8 octants the point is in.
Then the absolute values of the coordinates can be taken, and only 15 sectors remain. Then we check all half-planes that separate sectors (this is just involves taking a dot product with the point and a normal to the plane, and checking if the result is positive). Then it's possible to take a weighted sum of the results of these tests to assign an "id" to the sector. The weights are chose such that each sector has a unique integer "id" in the set {0, 1, 2, ..., 14}. Combining the id with the octant can provide an "ico_id" to all 120 sectors with values {0, 1, ..., 119}.
The ico_id allows easy lookup of sector informationThe attributes unique to each sector (like "matrix", neighbors, which icosahedron face it belongs to, which dodecahedron face it belongs to) are stored in hard-coded look-up tables.

The sector with ico_id == 58 is the "identity" sector. The "matrix" for each sector will transform that sector to coincide with sector 58. For example, sector 59's matrix is just a reflection on the X axis (see image above).
That's the basic idea so far. I plan to work on some example shaders and evolve the "API" from there.