Start with a unit square and designate two points, A and B. A is the midpoint of the left side. B is the top-right corner.
I want to draw a circular arc through those two points. The arc must pass perpendicularly through A and diagonally through B. In other words the tangent of the circle at point A is perpendicular to the left side of the square, and the tangent of the circle at point B forms a 45-degree angle with the top side of the square.
This necessarily means the radius to A coincides with the left side, and the radius to B forms a 45-degree angle against the top side.
The question is, what is the radius of the circle? When I draw it out, it appears to be either 1.5 or $\sqrt{2}$. This is pretty weird and I can't figure out what is the truth.
EDIT: Okay, so apparently this circle is impossible to construct with the conditions I specified. But this is even more distressing. I need a curve that goes through both points and is tangent the way I want. What would be the smoothest curve? Would the radius of curvature just change linearly from 1.5 to 1.414...?
If you're curious, this arose from designing a train game. This particular piece of curved track has to connect a straight track coming from the left with a straight track going to the top-right. There must be a smooth curve to connect this and I want to know how to describe it. I will also need to know the length of the curve in order to have a track cost based on reality.
Edit 2: Thanks to Rahul for the solution that still uses a circle. The circle passes perpendicularly through the square's left midpoint and also lies tangent to the square's diagonal. Then just continue on in a straight line that will pass through the top-right corner at a 45-degree angle.
It took me a while to find r in terms of the square side length but I think I've got it now that I realize there is another r by symmetry on the bottom.
$a = b + c = h + \frac{1}{2}$
$b + h = \frac{1}{2}$
$r^2 = 2(h + \frac{1}{2})^2$ and $h + \frac{1}{2} = \frac{r}{\sqrt{2}}$
From my knowledge of sine and cosine, I can see that $h$ is just $1 - \sin{45^o} = 1 - \frac{\sqrt{2}}{2} \approx 0.293$, therefore:
$r = \sqrt{2}(h + \frac{1}{2}) = \sqrt{2}(\frac{3}{2} - \frac{\sqrt{2}}{2}) = \frac{3\sqrt{2} - 2}{2} = \frac{3\sqrt{2}}{2} - 1 \approx 1.121$
I wasn't convinced that $b = h$ and $c = \frac{1}{2}$ even though they look pretty close in the diagram. And after checking, I find them different.
$b + h = \frac{1}{2}$
$b = \frac{1}{2} - 1 + \frac{\sqrt{2}}{2} = \frac{\sqrt{2} - 1}{2} \approx 0.207$
$z = b\sqrt{2} \approx 0.293$
So the length of the whole path is the arc + z:
$\frac{1}{8}2\pi r + \sqrt{2}\frac{\sqrt{2} - 1}{2} = \frac{\pi}{4} (\frac{3\sqrt{2}}{2} - 1) + \frac{2 - \sqrt{2}}{2} \approx 1.174$
...which makes sense because we're connecting a midpoint with a corner, so it should be a little longer than 1.


The problem is, your last drawing is lying to you. You have the notion that the point that's the center of your circle will be one unit directly above the top-left corner, but that's not actually the case. (The problem, incidentally, comes where you say 'the tangent at $B$ forms a 45-degree angle with the top side of the square'; that's not correct for the unique circular arc that crosses horizontally through $A$ and passes through $B$.)
In fact, you can work the other way, and figure out exactly how far above that point your center (we'll call it $O$) does have to be: let that distance (from $O$ to the corner) be $x$. Then the condition that $OA$ is a radius says that the radius is $x+\frac12$; and the condition that $OB$ is a radius says that the radius is $\sqrt{1+x^2}$. Now, for it to actually be a circle, these two things have to be equal; in other words, $x+\frac12 = \sqrt{1+x^2}$. Can you figure out what $x$ has to be from those two conditions?