# How to draw right triangle whose hypotenuse is side of square and whose side is tangent to a circle?

Given a circle whose center (P) is at center of a square, and using pencil, compass, and straight-edge, how can I create a right triangle whose hypotenuse is side of square and whose side is tangent to the circle?

I can get side to be tangent to the circle and I get the sides to be right angles but I'm not able to get both right angle and tangent. This is not homework.

-

Let $ABCD$ be the given square, $P$ the centre of the circle. The circle with diameter $AP$ intersects the circle in a point $Q$. The line $AQ$ intersects the circle with diameter $AB$ in a point $R$. Then $ABR$ is a rectangular triangle with hypothenuse $AB$ and with $AR$ tangent to the given circle.