I have the following scenario:
- There's two different points in a 2D plane;
- Both points are circles and haves X and Y coordinates and radius;
- The X and Y coordinates of the points refers to the middle of each circle;
- I know the distance between both centers through d=√((x2 – x1)² + (y2 – y1)²);
Now i need to discover what X and Y values one of this points needs to reach to get nearest as possible (in a straigth line) from the other one WIHOUT intersecting each other.
For easier comprehension:
Red: PointA;
Green: PointB;
Blue: PointC (I need to discover this X and Y position);
I've tried:
d=√((x2 – x1)² + (y2 – y1)²); Cx = Bx - (d/2);
Cy = By - (d/2);
and
Cx = Ax - (d/2); Cy = Ay - (d/2);
But it's wrong.
Is there any way to find out this?

Draw a line segment between the the centers of the two circles. This line segment has a distance of $\sqrt {(x_2 - x_1)^2 + (y_2 - y_1)^2 }$. This line segment intersects
So this segment is composed of three subsegments:
Do you see now, what the distance of $P_1P_2$ should be?