How do I transpose an ellipse function to stretch the ellipse into curved space?

Solution 1:

Suppose your parabola is given by $$y=a x^2+b x + c$$ Its derivative is $y'=2 a x + b$. A vector perpendicular to your parabola at the point $(x,y)$ is thus $$(-2 a x - b,1)$$ Let us normalize this vector $$\vec{n}=\frac{(-2 a x - b,1)}{\sqrt{(2 a x + b)^2+1}}$$ The curves at distance $d$ from your parabola (green in your figure) are thus $$(x,a x^2+b x + c)+d\vec{n}$$ The above formula transforms cartesian-like coordinates $(x,d)$ into the transformed space $$T(x,d)=(x,a x^2+b x + c)+d\vec{n}$$ All we need to do is feed the ellipse expression to this transformation $$T(r_1\cos(\theta)+r_1,r_2\sin(\theta)+r_2)$$ this gives a curve with the desired characteristics.

Example: Transformed ellipse also showing transformed minor and major axis

This curve touches the straight lines at their midpoints. It also touces the top and bottom curve once, but not at their exact midpoint. If you want a curve that touches the bottom curves at its precise midpoint, you need to parametrize your parabola by its arc length, which is not possible in terms of elementary functions.

Solution 2:

As others have noted, this is really just a deformation or change-of-coordinates problem. Our ellipse is defined in a rectangular cartesian coordinate system, and we want to map it to another system where coordinates are distance along the parabola and normal distance away from the parabola.

These kinds of deformations are common in high-end CAD systems. However, as @Wouter pointed out, the equation of the deformed ellipse is the composition of the original ellipse equation and the change-of-variables transformation, so it's an ugly thing that no CAD system can represent exactly (as far as I know). So, the CAD system will typically give you a spline approximation of the true deformed shape. This is perfectly OK, of course, as long as the approximation is more accurate than your manufacturing tolerances.

The picture below shows the result I got in my favorite CAD system.I didn't use the same numbers as you, but that doesn't matter. The point is to see what can be achieved with standard built-in functions in typical CAD systems.

enter image description here

More info in these answers.