Find an equation describing the midpoints of a rectangle bounding a circle I'm not sure best how to describe this problem, but here it is:
I need to find an equation describing the midpoints of a rectangle bounding a circle:
The equation for the circle is:
$$(x-200)^2 + (y-200)^2 = 200^2$$
The lines describing the rectangle are:
$$\begin{align}
x&=0\\
x&=800\\
y&=0\\
y&=600\\
\end{align}$$
I need an equation describing the midpoints between any lines perpendicular to the gradient of the circle, and the rectangle boundary it touches. Any help would be appreciated.

 A: Here's a simplified, generic version of the problem.
Center a circle of radius $r$ a the origin, and consider the movable point $A$ on line $x=a$. Let $\alpha$ be the angle that $\overline{OA}$ makes with the $x$-axis, and let $A^\prime$ be the point where $\overline{OA}$ meets the circle.

Then we can write
$$A = (a, a\tan\alpha) \qquad A^\prime = ( r \cos\alpha, r \sin\alpha )$$
so that the midpoint of $\overline{AA^\prime}$ is
$$M = \frac12(A+A^\prime) = \frac{1}{2}\left(\; a + r \cos\alpha, \; a \tan\alpha + r \sin\alpha \;\right)$$
Likewise, we have
$$N = \frac{1}{2}\left(\; b \tan\beta + r\sin\beta,\; b + r\cos\beta\;\right)$$
I'm unaware of any specific name given to this locus of midpoints. However, the curve resembles the Witch of Maria Agnesi.

In your case, we have $r = 200$ and center the circle at $O(r,r)$. Since $a$ and $b$ are the distances from the circle's center to the lines, we also have $a = 800-r = 600$ and $b = 600 - r = 400$. Finally, we'll need to translate the points $M$ and $N$ upward and rightward by $r$:
$$\begin{align}
M &= (200,200) + \frac{1}{2}\left(\;600 + 200\cos\alpha,\;600\tan\alpha + 200\sin\alpha\;\right) \\
&= \left(\;500+100\cos\alpha,\;200+300\tan\alpha+100\sin\alpha\;\right) \\[4pt]
N &= \left(\;200+200\tan\beta+100\sin\beta,\;400+100\cos\beta\;\right)
\end{align}$$
Presumably, you want to jump from the $M$ curve to the $N$ curve at the point where they intersect; this point corresponds to $A$ and $B$ coinciding at $Z$, so that
$$\tan\alpha = \frac{b}{a} =\frac{1}{\tan\beta}$$ 
Finding the formulas for the counterpart curves for the other two sides of the bounding rectangle is left as an exercise to the reader.
