lib/sphere/to-cg.js
function barycenterVerticesAndFaces(sphere, options, done) {

  var n         = sphere._Fields.length,
      positions = new Float32Array(n * 3),
      indices   = sphere._interfieldTriangles,
      colors    = new Float32Array(indices.length * 3);

  for (let f = 0; f < sphere._Fields.length; f += 1) {

    let field = sphere._Fields[f],
        f_φ   = sphere._positions[2 * f + 0],
        f_λ   = sphere._positions[2 * f + 1],
        color = options.colorFn.call(field);

    positions[f * 3 + 0] = cos(f_φ) * cos(f_λ); // x
    positions[f * 3 + 2] = cos(f_φ) * sin(f_λ); // z
    positions[f * 3 + 1] = sin(f_φ); // y

    colors[f * 3 + 0] = color.r;
    colors[f * 3 + 1] = color.g;
    colors[f * 3 + 2] = color.b;

  }

  // normals are exactly positions, as long as radius is 1
  var normals = positions.slice(0);

  if (done) done.call(null, null, {
    positions,
    normals,
    indices,
    colors
  });

}
function barycenterVerticesAndFaces(sphere, options, done) {

  var n         = sphere._Fields.length,
      positions = new Float32Array(n * 3),
      indices   = sphere._interfieldTriangles,
      colors    = new Float32Array(indices.length * 3);

  for (let f = 0; f < sphere._Fields.length; f += 1) {

    let field = sphere._Fields[f],
        f_φ   = sphere._positions[2 * f + 0],
        f_λ   = sphere._positions[2 * f + 1],
        color = options.colorFn.call(field);

    positions[f * 3 + 0] = cos(f_φ) * cos(f_λ); // x
    positions[f * 3 + 2] = cos(f_φ) * sin(f_λ); // z
    positions[f * 3 + 1] = sin(f_φ); // y

    colors[f * 3 + 0] = color.r;
    colors[f * 3 + 1] = color.g;
    colors[f * 3 + 2] = color.b;

  }

  // normals are exactly positions, as long as radius is 1
  var normals = positions.slice(0);

  if (done) done.call(null, null, {
    positions,
    normals,
    indices,
    colors
  });

}
Creates edges **between field barycenters** and returns an array of vertices
and a corresponding array of faces to use in three.js. Bear in mind, this is
not necessarily the most accurate representation of the model.

@param sphere
@param [options]
@param done