An ellipse defined on the 2D plane is given by the equation:
$$\sqrt{(x-a_1)^2 + (y-b_1)^2} + \sqrt{(x-a_2)^2 + (y-b_2)^2} = c,$$
where $(a_1, b_1), (a_2,b_2)$ are the foci and $c$ is some real number greater or equal than the distance between the foci. The ellipse is the set of points $(x,y)$ that satisfy the equation. Suppose that I have built the foci and $c$ so that the ellipse is bound by the square $-1\le x,y \le 1$. Now, suppose that I want the ellipse to fit into a rectangle enclosed by $y_{min}, y_{max}, x_{min}, x_{max}$. To do this I can map the points $(x,y)$ to new coordinates: $$y' = \frac{(1-y)y_{min} + (1+y)y_{max}}{2}.$$
Note that if $y$ takes the minimum initial value, i.e. -1, then $y'=y_{min}$, as desired. Similarly when $y$ takes the maximum value, i.e. 1. The same happens with $x$: $$x' = \frac{(1-x)x_{min} + (1+x)x_{max}}{2}.$$
My problem is that the components of foci $(a_1, b_1), (a_2,b_2)$ DO NOT transform under the same transformation (i.e. $a_1'\neq \frac{1}{2}[(1-a_1)x_{min} + (1+a_1)x_{max}]$). How do I get the new foci?
I tried pluging $y',x'$ into the ellipse equation, but failed.