code: function circleCircleIntersection(p1, p2) {
          var d = distance(p1, p2),
              r1 = p1.radius,
              r2 = p2.radius;
  
          // if to far away, or self contained - can't be done
          if ((d >= (r1 + r2)) || (d <= Math.abs(r1 - r2))) {
              return [];
          }
  
          var a = (r1 * r1 - r2 * r2 + d * d) / (2 * d),
              h = Math.sqrt(r1 * r1 - a * a),
              x0 = p1.x + a * (p2.x - p1.x) / d,
              y0 = p1.y + a * (p2.y - p1.y) / d,
              rx = -(p2.y - p1.y) * (h / d),
              ry = -(p2.x - p1.x) * (h / d);
  
          return [{x: x0 + rx, y : y0 - ry },
                  {x: x0 - rx, y : y0 + ry }];
      }
docs: Given two circles (containing a x/y/radius attributes),
  returns the intersecting points if possible.
  note: doesn't handle cases where there are infinitely many
  intersection points (circles are equivalent):, or only one intersection point