Suppose I have $2$ points $A,B$, and a line $\ell$. Something like this:
I want to find a circle that passes through both points $A$ and $B$ and whose diameter also passes through the given line $\ell$. Playing around with Geogebra, I use the "Circle through $3$ points" option trough $A$ and $B$ and some other point $C$, and from what I can tell, it seems to me that I can always find a third point on $\ell$ to satisfy the desired requirements:
However, I only seem to be able to do this by trial and error, and moving the third point $C$ by hand until it seems to fit.
I know that, analytically, if I say that \begin{align*} A &= (x_A,y_A) \\ B &= (x_B,y_B) \\ \ell &: \{y = mx +b\} \end{align*} I can find the coordinates for the center of the circle and it's radius by solving the system of equations $$ \begin{cases} (x_A-h)^2 +(y_A-k)^2 = r^2\\ (x_B-h)^2 +(y_B-k)^2 = r^2\\ k = mh+b \end{cases} $$ for $h,k$ and $r$. However, WolframAlpha gives some pretty ugly solutions to the system (as seen here). To avoid this, I was wondering if there was a constructive way of finding this circle, maybe based on drawing lines and circles akin to how Euclid would do it. I gave it a shot but couldn't seem to find any simple way of doing this. Does anyone know if there's a simple way to construct this circle? Thank you!


Saying that the diameter lies on a given line segment means that the center is on that line. If A and B are points on the circle then the line segment between them is a chord and its perpendicular bisector also passes through the center of the circle.
So construct the perpendicular bisector of AB. The point where it crosses the given line is the center of the circle. Set the leg of compasses at that point and draw the circle through A and B.