# How to draw an parabolic path between two points

I have two sets of points and i want draw an parabolic arc between two points and also to find the intermediate points which the parabolic path is drawn.... In the above image you can see the curve path on two sides....since it is an image,i can't trace out the exact curve..i can get the starting,middle and end point of the one side of the curve.Is it possible to draw the curve and also get the each points of the curve...

• Perhaps you could be more specific and/or give an example? In the real plane, a parabola is uniquely determined by three points (non-collinear if you want to avoid degenerate parabolas) and you can find this parabola via interpolation. If you have "two sets of points" I would imagine you might have more than three total in which case there may not be a parabola that traverses all of them. – Fixee Sep 9 '11 at 5:55
• I don't think I understand. There are an infinite family of parabolas between two given points and they can be solved for easily, but what else is being asked here? – anon Sep 9 '11 at 5:56
• i have updated my qn..... – Anish Sep 9 '11 at 6:02
• In general a parabola has the equation $a x^2 + 2 b x y + c y^2 + d x + e y + f = 0$ where $ac = b^2$, $a^2 + c^2 > 0$ and $d^2 + e^2 > 0$. There are 5 degrees of freedom here, but since we can multiply the equation by a nonzero constant the curve has 4 degrees of freedom. Specifying any two distinct points in the plane for the parabola to pass through still leaves 2 degrees of freedom, i.e. a 2-parameter family of parabolas through the two points. So which of these infinitely many parabolas do you want? – Robert Israel Sep 9 '11 at 6:03
• If i know the 3 points(starting,middle and ending point).is it possible to trace the curve... – Anish Sep 9 '11 at 6:09

From the diagram it looks as if you may be looking for a parabola with a horizontal line of symmetry and vertical directrix. This would have equation $(y-b)^2 = 4a(x-c)$. If you know three points, this gives you three equations in three unknowns ($a$, $b$ and $c$ being required - or $a$,$b$ and $d$ if you put $ac=d$).

The orientation would be an important extra piece of information, which is why many of the comments are asking you to be precise and specific about what you require, rather than leaving us to assume things which you have not stated. If the orientation is not known, then you will find a family of possible solutions - the comments already given point the direction to seeing this.

I will assume that the drawing is symmetric around the horizontal axis y and the vertical axis x. The points $A(x_1, y_1), C(x_0, y_0)$ and $B$ are known, $x_0 = 0$. The equation of the parabola is $$y(x) = a x^2 + c$$ From $$y(0) = y_0$$ $$y(x_1) = a x_1^2 + c$$ we get the coefficients $a, c$ and hence the equation of the parabola is $$y(x) = \frac{y_1 - y_0}{x_1^2} x^2 + y_0$$ I draw this parabola in red and the parabola reflected at the x-axis in green, using the open source program Octave, which corresponds to Matlab:

% parabola equation y = a * x^2 + y0
x0 = 0;  y0 = 0.1;
x1 = 10; y1 = 1;
a = (y1 - y0) / (x1 * x1)

% because y is horizontal axis and x is vertical axis
% draw like this:
x = [-x1 : 0.1 : x1]';  % draw range of x
y = a * x.^2 + y0; % equation of parabola
plot(y, x, 'r')    % draw red parabola
hold on
plot(-y, x, 'g')   % draw green parabola
hold off