code: function() {
      // get max viz. length.
      var r = this.getRadius();
      // get max depth.
      var depth = 0, max = Math.max, config = this.config;
      this.graph.eachNode(function(node) {
        depth = max(node._depth, depth);
      }, "ignore");
      depth++;
      // node distance generator
      var genDistFunc = function(a) {
        return function(node) {
          node.scale = r;
          var d = node._depth + 1;
          var acum = 0, pow = Math.pow;
          while (d) {
            acum += pow(a, d--);
          }
          return acum - config.offset;
        };
      };
      // estimate better edge length.
      for ( var i = 0.51; i <= 1; i += 0.01) {
        var valSeries = (1 - Math.pow(i, depth)) / (1 - i);
        if (valSeries >= 2) { return genDistFunc(i - 0.01); }
      }
      return genDistFunc(0.75);
    }
docs: /*
  
  createLevelDistanceFunc
  
  Returns the levelDistance function used for calculating a node distance
  to its origin. This function returns a function that is computed
  per level and not per node, such that all nodes with the same depth will have the
  same distance to the origin. The resulting function gets the
  parent node as parameter and returns a float.