I am trying to create a parabola function that mimics projectile trajectory. It will input the following:
- 2 xy coordinates (the starting projectile position and the landing projectile position)
- Height of the throw
And will output the following:
- A parabola where the turning point is at the height.
- The parabola should also intersect the starting and ending throwing positions.
How can I go about doing this?
I attached a picture to illustrate what I am trying to do.

So in this case. The inputs will be (-1, 1), (1, 3.5) and 4 as the height of the throw
For any point $(x, y)$ on a parabola with vertex $(h, k)$, we have the proportion $(x-h)^2\propto(y-k)$, or $|x-h|\propto\sqrt{|y-k|}$. Since we know what $y_1$, $y_2$ and $k$ are, we can find some possibilities for $h$.
We have: $|x_1 - h| \propto \sqrt{|y_1-k|}$ and $|x_2 - h| \propto \sqrt{|y_2-k|}$. This then gives two possibilities: $x_1-h$ has the opposite sign of $x_2-h$, or they have the same sign. We'll cover the first, first, assuming WLOG that $x_2>x_1$.
We know that $x_2 - h + h - x_1 = x_2 - x_1$; Also, that $h$ will be, proportionally, $|x_1 - h| / (x_2 - x_1)$ along that part. But that's $|x_1 - h| / \left(|x_1-h| + |x_2-h|\right)$, and we can calculate all those. $$t=\frac{\sqrt{|y_1-k|}}{\sqrt{|y_1-k|}+\sqrt{|y_2-k|}}$$ $$h = (1-t)x_1+tx_2$$ For us, this gives $$t=\frac{2}{2+\sqrt{\frac{3}{2}}}=\frac{8-2\sqrt{6}}{5}\approx0.62$$ and $$h=\frac{11-4\sqrt{6}}{5}\approx 0.24$$ Which, ultimately, gives us the parabola $$y=-\frac{11+4\sqrt{6}}{8}x^2+\frac{5}{4}x+\sqrt{\frac{3}{2}}+\frac{29}{8}$$
In the same fashion we can use
$$t=\frac{\sqrt{|y_1-k|}}{\sqrt{|y_1-k|}-\sqrt{|y_2-k|}}$$ to get $$t=\frac{2}{2-\sqrt{\frac{3}{2}}}=\frac{8+2\sqrt{6}}{5}\approx2.58$$ $$h=\frac{11+4\sqrt{6}}{5}\approx 4.16$$ $$y=-\frac{11-4\sqrt{6}}{8}x^2+\frac{5}{4}x-\sqrt{\frac{3}{2}}+\frac{29}{8}$$
Here those are graphed. The narrower one uses the first $t$ and $h$.