How to find optimal points through a series of circles?

27 Views Asked by At

So if you have n circles with radius and center. Let's call these circles C_1, C_2, ..., C_n. Then how could I find the series of points that is the shortest path from the perimeter on C_1, to the perimeter on C_2, and so on until C_n. Here n=4 so how could I finde the points G,H,K,I such that |f|+|g|+|h| is a short as possible

1

There are 1 best solutions below

0
On

In your figure you have four points $G(x_1,y_1)$, $H(x_2,y_2)$, $I(x_3,y_3)$ and $K(x_4,y_4)$ and four circles given by equations $$f_i(x,y)=(x-a_i)^2+(y-b_i)^2=r_i^2$$ you want to minimize the function $$g(x_1,x_2,x_3,x_4,y_1,y_2,y_3,y_4)=(x_1-x_2)^2+(y_1-y_2)^2+(x_2-x_3)^2+(y_2-y_3)^2+(x_3-x_4)^2+(y_3-y_4)^2$$ (which is the sum of the squared distances of the four points) subject to the constraints $$\begin{cases} f_1(x_1,y_1)=r_1^2 \\ f_2(x_2,y_2)=r_2^2 \\ f_3(x_3,y_3)=r_3^2 \\ f_4(x_4,y_4)=r_4^2 \end{cases}$$

this can be done using the method of Lagrange multipliers. You can easily generalize to $n$ points.