 With 2, it looks like a golfball
 With 3 and more, it looks like a Civilization V map
 
-Don't use it with more than 3 subdivisions
-
+Default UV mapping is homotilic.
+Homotilic : all hexagons share the same UV mapping, and all pentagons too.
+The texture is divided in two squares.
+On the left, fill the inscribed pentagon of the inscribed circle of the left square.
+On the right, fill the inscribed hexagon of the inscribed circle of the right square.
+Both polygons point upwards.
+
+Don't use it with more than 3 subdivisions.
 ¡ THIS SCALES BADLY ! O(4^n) at least
 
 Options:


###
A Geodesic Sphere Dual mesh
Its faces are 12 pentagons and the rest are hexagons.


      currentVertexBufferIndex += n * 9


    true # don't return an array, it's faster





  ### HOMOTILIC UV MAPPING HELPERS

  todo: The data about the pentagon and the hexagon should be somehow moved
  respectively to Jax.Geometry.Pentagon and Jax.Geometry.Hexagon.
  todo: shorten the referential change maths below once Ruby let me run the tests again, because these are vestigial

  ###

  _pushPentagonUV: (intoUVs) ->
    c1 = (Math.sqrt(5)-1)/4
    c2 = (Math.sqrt(5)+1)/4
    s1 = (Math.sqrt(10+2*Math.sqrt(5)))/4
    s2 = (Math.sqrt(10-2*Math.sqrt(5)))/4
    vertices = [
      [   0,   0 ] # center
      [   0,   1 ] # top
      [ -s1,  c1 ] # rotate trigwise
      [ -s2, -c2 ] # rotate trigwise
      [  s2, -c2 ] # rotate trigwise
      [  s1,  c1 ] # rotate trigwise
    ]

    # from the classical centric referential to UV referential
    o = [ 1, 1 ]
    for v in vertices
      v[1] *= -1 # invert y
      vec2.add v, v, o # add the referential offset
      v[0] *= 1/4 # scale to UV referential, X-wise
      v[1] *= 1/2 # scale to UV referential, Y-wise

    o = vertices.shift()
    @_pushTriangleFanUV o, vertices, intoUVs
    undefined


  _pushHexagonUV: (intoUVs) ->
    h = Math.sqrt(3)/2
    vertices = [
      [    0,    0 ] # center
      [    0,    1 ] # top
      [   -h,  0.5 ] # rotate trigwise
      [   -h, -0.5 ] # rotate trigwise
      [    0,   -1 ] # rotate trigwise
      [    h, -0.5 ] # rotate trigwise
      [    h,  0.5 ] # rotate trigwise
    ]

    # from the classical centric referential to UV referential
    o = [ 1, 1 ]
    for v in vertices
      v[1] *= -1 # invert y
      vec2.add v, v, o # add the referential offset
      v[0] *= 1/4 # scale to UV referential, X-wise
      v[1] *= 1/2 # scale to UV referential, Y-wise
      v[0] += 0.5 # pentagon is on the right

    o = vertices.shift()
    @_pushTriangleFanUV o, vertices, intoUVs
    undefined


  _pushTriangleFanUV: (centerVertex, fanVertices, intoUVs) ->
    len = fanVertices.length
    for i in [0...len] by 1
      v1 = fanVertices[(i+0)%len]
      v2 = fanVertices[(i+1)%len]
      intoUVs.push centerVertex..., v1..., v2...
    undefined

