# 'Concentric' parabolas — two parabolas that have a constant vector distance

I am trying to 'draw' a two-dimensional path in the shape of a semi circle with thickness d in the xy-plane. The way I would like to do this is to have two parabolas, $f(x) = ax^2$ and $g(x)= bx^2 +cx + d$, and have the semi circle be defined by the area in between the parabolas. I've attached a terse picture if this is unclear: I have tried a vector approach:

$\vec{F} = x\hat{x}+ax^2\hat{y}$ -- vector form of $f(x)$

$\vec{G} = x\hat{x}+(bx^2+cx+d)\hat{y}$ -- vector form of $g(x)$

Assume $a$ is known. I've imposed the following constraints:

i) $|\vec{F}-\vec{G}| = d \ \ \forall \ \ x$

ii)$f(x_0)=g(x_0) \to ax_0^2=bx_0^2 +cx_0+d$

With these constraints, i) ensures constant path width, I believe, and ii) ensures the ends of the semi circle to be 'flat' in the y direction

Clearly the constant in $g(x)$ is $d$, as it must be to satisfy i) for $x=0$. Further algebra in finding $b,c$ has not yielded me any apparent results after plotting - I'm finding that b and c are functions of x that result in $g(x)$ being non-quadratic.

Can anyone help me out? What did I do wrong? Is this even possible?

• ??? The region between two parabolas is not a semicircle. The distance between two parabolas is not constant. – Robert Israel Jul 14 '16 at 17:53
• I suspect Matt means "half-annulus" by the word "semicircle", (just as some people use "circle" to indicate the thing we'd probably call a "disk" or "ball") but the rest of your point is spot-on. :) – John Hughes Jul 14 '16 at 17:54
• Would either of you gentlemen have a suggestion for a simple way to do this, then? – Matt Jul 14 '16 at 18:05
• I'd plot $$x = r\cos t, y = r\sin t + r \\ x = (r-1)\cos t, y = (r-1)\sin t + r$$ for $-\pi \le t \le 0$. That'll give you two curve that look a lot like the ones you've drawn, but the region between them will actually be a semicircular strip. – John Hughes Jul 14 '16 at 18:27
• I don't know what you're up to, but I once needed to solve almost this exact problem while writing a physics engine for a game. My solution was just to first subdivide the parabola if it had significant curvature from start to end. Then, for each segment, I took three points, and found the three points a distance of $d$ away from those along a normal to the parabola and found a parabola interpolating those. With some fiddling with the specfics, it seemed to work. (Admittedly, there were some weird issues with the physics engine, but I think they were unrelated) – Milo Brandt Jul 14 '16 at 22:20

## 4 Answers

It's a theorem that two curves whose distance from each other is a nonzero constant cannot both be parabolas with $a \ne 0$, so you're never going to be able to solve your equations.

In fact, the fact that you couldn't solve them is more or less a proof of this fact.

If you'd like a proof, I can provide details, but I'm guessing you just want to know that you can stop working on this approach.

Proof that the offset curve for (at least one) parabola is not a parabola:

Look at $y = x^2$. At a point $P = (a, a^2)$ of this curve, the tangent vector is $(1, 2a)$, so the normal vector is $n = (-2a, 1)$, which has squared length $1 + 4a^2$. Thus the point $P + rn$, where $r = \frac{1}{\sqrt{1 + 4a^2}}$, is distance 1 from the parabola. The coordinates of this point are $$(a, a^2) + r(-2a, 1) = (a(1-2r), a^2 - r)$$ Calling these $X$ and $Y$, the question becomes "are there constants $A,B,C$ with $AX^2 + BX + C = Y$?"

For $a = 0$, we have $(X, Y) = (0, 1)$.

For $a = 1$, we have $(X, Y) = ((1-2\sqrt{5}), 1-\sqrt{5})$.

For $a = -1$, we have $(X, Y) = (-(1-2\sqrt{5}), 1-\sqrt{5})$.

The first of these tells us that if there are values $A,B,C$ as needed, then $C = 1$. The second and third say that $$A(1-2\sqrt{5})^2 + B(1-2\sqrt{5}) + C = A(-(1-2\sqrt{5})^2) + B(-(1+2\sqrt{5})) + C,$$ hence that $2B(1-2\sqrt{5}) = 0$, so $B = 0$.

But when added, they say that $$A(1-2\sqrt{5})^2 + C + A(-(1-2\sqrt{5})^2) + C = 2(1-\sqrt{5})$$ Dividing by two, we get $$Au + C = u,$$ where $u = 1 - 2\sqrt{5}$.

But $C = 1$, so $$A(u-1) = 1\\ A = \frac{1}{u-1}= \frac{1}{2\sqrt{5}}.$$

Thus the offset curve, if it's a quadratic must be $$(**) Y = A\frac{1}{2\sqrt{5}} X^2 + 1.$$

Now look at $a = 2$; this gives us the point $$(X, Y) = (a(1-2r), a^2 - r) = (2(1-2\sqrt{17}), 4 - \sqrt{17}).$$

If we plug these into equation (**), we don't get an equality, however, so we must conclude that the only quadratic consistent with the values for $a = -1, 0, 1$ is inconsistent with the value for $a = 2$. Hence there's no quadratic whose graph contains all distance-1 offset points for $y = x^2$.

There's a cuter visual proof, which is that if you just draw the offset curve for distance 1.5 (I think), it turns out to have a self-intersection; such a curve is clearly not the graph of any quadratic!

• Yes, this was a 'go or no-go' post. Interesting theorem. Out of curiosity I would like to see a nicer proof for this than the struggle from my pen and paper! Thank you for the response. – Matt Jul 14 '16 at 17:57
• Note that if $f(x)=x^2$ and $g(x)=x^2+2$, then they are a constant distance (i.e., 2 units) in the $x$ direction, that is, vertically. I assume you want to measure $d$ in some other direction, like horizontally or at 135º. In that case, it cannot be done with parabolas. – scott Jul 14 '16 at 18:10
• @scott: I think you mean "vertically". – John Hughes Jul 14 '16 at 18:25
• @Matt: see post-comment additions for two proofs of the "no offset" claim. – John Hughes Jul 14 '16 at 18:26
• @JohnHughes, yes I meant in the $y$ direction, vertically. – scott Jul 14 '16 at 18:51

To illustrate the nice description of achille hui, especially of the cusp also mentioned by John Hughes, which definitely shows the offset curve is not a parabola: Image from mathpages.com.

The locus of points at a fixed normal distance to a given curve is known as its parallel curve (or offset curve for the CAD folks). For parabola, the parallel curve has two branches (one on each sides). Instead of parabolas, they are rational curves of degree $6$.

For the parabola $\mathcal{P} : y = a x^2$, one can parametrize it as

$$(0,\infty) \ni s \quad\mapsto\quad (x,y) = \left(\frac{s-s^{-1}}{4a}, \frac{(s-s^{-1})^2}{16a}\right) \in \mathcal{P}$$

At any point $(x,y)$ on $\mathcal{P}$, the normal vector is in the direction of $(-2ax,1)$.

For $d < \frac{1}{2a}$, the two parallel curves at a normal distance $d$ from $\mathcal{P}$ have following parametrization:

\begin{align}(X,Y) &= (x,y) \pm d \left(\frac{-2ax}{\sqrt{1+(2ax)^2}}, \frac{1}{\sqrt{1+(2ax)^2}}\right)\\ &= \left(\frac{s-s^{-1}}{4a} \mp d \frac{s-s^{-1}}{s+s^{-1}}, \frac{(s-s^{-1})^2}{16a} \pm d \frac{2}{s+s^{-1}}\right) \end{align} Please note that when $d \ge \frac{1}{2a}$, the parametrization for the branch below $\mathcal{P}$ continue to work. However, the parametrization for the branch above $\mathcal{P}$ develop a cusp at $X = 0$, the actual locus is piecewise smooth there.

Using parametric equation of a parabola (equation $y = a x^2$) for point coordinates and slope is advantageous.

$$x = \frac{t} {2 a}, y = \frac{t^2}{4a}, y^{\prime} = t =\tan \phi$$

$$\sin \phi = \frac{t}{\sqrt{1+t^2}} ;\, \cos \phi = \frac{1}{\sqrt{1+t^2}};\,$$

Parametric equation of a parallel/ offset / equi-normal distance point in terms of $t$ after plugging in the above:

$$x_1 = x-d \sin \phi , y_1 = y + d \cos \phi$$

It is not another parabola, but a sixth degree polynomial as mentioned by achille hui.

In metal cutting ( you did not ask this, but) on a CNC machine/lathe using a spherical cutter of radius $d$ it is advantageous to derive and integrate its differential equation numerically as that way we can get the profile for uniform x- increments of cutter center. Using a sixth degree equation or using parametric form as above is more cumbersome.

• +1 Very clever method. I was just working on a virtually identical question and I arrived at a very similar solution using the equation of the normal to the curve, but it was less straightforward than using trig. – A-Level Student May 3 at 15:04