Is this radius $1.5$ or $1.414$ ... or what is the smoothest/best curve to connect a midpoint with a corner?

163 Views Asked by At

enter image description here

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.

enter image description here

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.

5

There are 5 best solutions below

1
On

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?

0
On

There is no circle with all the properties you ask. As the tangent line is perpendicular to the radius at a point, having the circle meet the side at A perpendicularly requires the center of the circle to be on the extension of the left side of the square. Having the tangent at an angle of 45 degrees at the upper right corner requires the center to be on the diagonal line you have drawn with a slope of $-1$. Those two lines intersect in a point that is $1.5$ from A and $\sqrt 2$ from B. You have to decide what you want to give up. You can move A upward to $2-\sqrt 2$ and have a circle of radius $\sqrt 2$ and probably be closest to your desire.

0
On

I'm not surprised at your puzzle. What you have discovered is that the circle you want does not exist. Once you specify that it go through both $A$ and $B$ and have a horizontal tangent at $A$ (in your picture) you have enough information to draw the circle. The radius will be determined, as will the angle at $B$.

0
On

The answer is simple: you cannot draw such a circle that satisfies all you requirements.

So if you want the circle to pass point A, and have the 45 degree angle, plus the left side of the square being aligned with one of its diameter - then the circle is fixed, I.e. you could only draw one circle like that, and that circle you have does not pass through point B.

0
On

An answer to the updated question: the canonical way of connecting two points with specified tangencies is via spline curves; in particular, a cubic spline has exactly the right number of constraints involved to pass through a pair of specified points with a pair of specified velocity vectors. Interpolating splines for value and first derivative are called Hermite splines.

In this case, you could formulate the problem in terms of a parametric plane curve $\vec{f}(t) = \langle x(t), y(t)\rangle$; your conditions would then be $\vec{f}(0) = \langle 0, 0.5\rangle$, $\vec{f}(1) = \langle 1, 1\rangle$, $\dfrac{d\vec{f}}{dt}(0) = \langle 1, 0\rangle$, and $\dfrac{d\vec{f}}{dt}(1) = \left\langle \frac{\sqrt{2}}2, \frac{\sqrt{2}}2\right\rangle$. It might be even easier to cast it as a 'one-dimensional' curve $y=y(x)$, though; in that case the conditions become $y(0) = 0.5$, $y(1) = 1$, $\dfrac{dy}{dx}(0) = 0$, and $\dfrac{dy}{dx}(1)=1$.

This latter is easily solved with Wolfram Alpha (the magic phrase in this case is InterpolatingPolynomial[{{{0},0.5,0},{{1},1, 1}},x]) and in fact reveals a quadratic solution: $y=\frac12(x^2+1)$

It's easy to see that this shape has all the right properties. It's relatively straightforward to calculate the length of the curve, as well; plugging in length of y=1/2(x^2+1) from x=0 to x=1 to Alpha yields a value of $\approx 1.15$.