I have another simple matplotlib example, based on the parabola post from the other day (here). The conclusion from that post was that any function:
can be manipulated to the form:
That is, the parabola is just
y = a(x)2translated to have a different vertex. I didn't do a systematic examination or anything, but here is one example in Python.
a, b, and cand returns the vertex
(x0, y0)as well as a numpy array containing
|x - x0| <= 4, and a second one containing
f(x)for each value of
We plot two sets of three parabolas, each set has one for each of
a = 1, 2 and 3. One set is at the origin (cyan, blue and purple). The second set (magenta, salmon and red) has
c = 3and:
x0 = -b/2ais the same for each parabola in the second set, they all have the same axis of symmetry. The only difference (besides the shape parameter
y0, which can be calculated either from plugging
a, b, c and x0into the standard form, or by using the fact that
Using the second method, I get:
We ought to be able to solve for b and c to put the parabola anywhere on the x,y-plane..