Given a point on a circle, find it on a given square Math is not my forte so I apologize. I have a seemingly simple problem and I'm unable to figure out the formula for this.
I'd describe the problem as given the center point of a circle and a point on the edge of the circle, find the same point on a square with the same length as the diameter of the circle.

The filled in points in this image are the ones I'm trying to find.
As an addition, I'd love some online resources on where I can learn how to do this kind of math and intuitively find the answer for myself in the future. Cheers.


You are looking for trigonometric functions. Good news is you need very simple ones. Here is a recap:
In the figure above, suppose the radius of the circle is 1. The horizontal diameter (in cyan) is called the cosine axis, and the vertical diameter (in magenta) the sine axis. Corresponding to each point $P$ on the circle are two points $X$ and $Y$ on the cosine and sine axes, respectively. For angle $\widehat a$ between $OA$ and $OP$ we have
$$cos (a) = OX \quad , \quad sin(a) = OY$$
The vertical line (in red) that is tangent to the circle at point $A$ is called the tangent axis, and the horizontal line (in blue) that is tangent to the circle at $B$ is called the cotangent axis. Now you can see that your task has to do with these two axes. In the example shown in the figure above, you are looking for point $Q$, which is on the tangent axis. The length $AQ$ is $tan(a)$. Point $Q$ is on the tangent axis if angle $\widehat a$ is between $-45^o$ and $45^o$ . If angle $\widehat a$ is between $45^o$ and $135^o$ then the point $Q$ falls on the cotangent axis and you will want to have $cot(a)$ . For other angles you can easily find the coordinates of point $Q$ by symmetry.
So, if angle $\widehat a$ is given, then depending on its value you are looking for $\pm tan(a)$ or $\pm cot(a)$ . If instead of $\widehat a$ , the coordinates $x$ and $y$ of $P$ are given, then you should only note that
$$x = cos(a) \quad , \quad y = sin(a)$$
$$\frac yx = tan(a) \quad , \quad \frac xy = cot(a)$$
and when $\widehat a = 45^o$ , $\; x=y \;$  and  $\; tan(a) = 1 \;$ .
