public static double[] tangents_between_circles(double cx0, double cy0, double r0, double cx1, double cy1, double r1) {
		double[] result = NONE;
		double dxySQ = (cx0 - cx1) * (cx0 - cx1) + (cy0 - cy1) * (cy0 - cy1);

		if (dxySQ <= (r0-r1)*(r0-r1)) return result;

		double d = Math.sqrt(dxySQ);
		double vx = (cx1 - cx0) / d;
		double vy = (cy1 - cy0) / d;

		double[] temp = new double[16];
		int np = 0;
		double c, h, nx, ny;
		for (int sign1 = +1; sign1 >= -1; sign1 -= 2) {
			c = (r0 - sign1 * r1) / d;
			if (c*c > 1) continue;

			h = Math.sqrt(Math.max(0.0, 1.0 - c*c));

			for (int sign2 = +1; sign2 >= -1; sign2 -= 2) {
				nx = vx * c - sign2 * h * vy;
				ny = vy * c + sign2 * h * vx;

				temp[np++] = cx0 + r0 * nx;
				temp[np++] = cy0 + r0 * ny;
				temp[np++] = cx1 + sign1 * r1 * nx;
				temp[np++] = cy1 + sign1 * r1 * ny;
			}
		}
		if(np > 0){
			result = new double[np];
			System.arraycopy(temp, 0, result, 0, np);
		}

		return result;
	}