# Point on the square with a circle inscribed inside it

I giving a second try to this question. Hopefully, with better problem definition.

I have a circle inscribed inside a square and would like to know the point the radius touches when extended. In the figure A, we have calculated the angle(θ), C(center) , D and E. How do i calculate the (x,y) of A and B? In the case you've drawn, you already know the $$x$$ value, assuming the circle has center in $$(C_x,C_y)$$ and radius $$r$$, $$A_x=B_x=C_x+r.$$ As for the $$y,$$ a little trigonometry helps: $$A_y=C_y+r·\tan \theta.$$
If you know the coordinates of the center then you add $$r$$ to the $$x$$ coordinate and you add $$r \tan (\theta)$$ to the $$y$$ coordinate of the center to get coordinates of $$A$$
Similarly you can find coordinates of $$B$$
Describe the circle as $$\vec x=\vec m+\begin{pmatrix} r\cos(t)\\ r\sin(t) \end{pmatrix}.$$ Now consider the ray $$\vec y=\vec m+\lambda\begin{pmatrix} r\cos(t)\\ r\sin(t) \end{pmatrix}$$ with $$\lambda>0$$. You want to have the first coordinate for $$t\in(-\pi/2,\pi/2)$$ of $$\vec y$$ to be $$m_1+r$$, hence $$\lambda=1/\cos(t)$$ and the desired point is $$\vec m+\frac{1}{\cos(t)}\begin{pmatrix} r\cos(t)\\ r\sin(t) \end{pmatrix}=\begin{pmatrix} m_1+r\\ m_2+r\tan(t) \end{pmatrix}.$$