Given a circle $C_1$, its diameter $AB$ and a Point anywhere on the plane $X$ form a method to draw perpendicular to line $AB$ passing through $X$ using only a straight edge.
I solved cases where $X$ is NOT on the circle or the line $AB$ itself with relative ease.
So my question is how to do it if $X$ lies on the circle or $AB$
How I did the first part (if $X$ not on circle or $AB$):
1. Draw $AX$ intersecting circle at $C$
2. Draw $BX$ intersecting circle at $D$
3. Draw $AD$ and $BC$ intersecting at $F$
4. $XF$ is the required perpendicular
This works because altitudes always pass through orthocenter. But this fails if $X=C,D,A,B$. How to do in those cases?