docs: function computeControlPoint(source, target, direction, offset) {
    const midPoint = [(source[0] + target[0]) / 2, (source[1] + target[1]) / 2];
    const dx = target[0] - source[0];
    const dy = target[1] - source[1];
    const normal = [dy, -dx];
    const length = Math.sqrt(Math.pow(normal[0], 2.0) + Math.pow(normal[1], 2.0));
    const normalized = [normal[0] / length, normal[1] / length];
    return [
      midPoint[0] + normalized[0] * offset * direction,
      midPoint[1] + normalized[1] * offset * direction
    ];
  }