Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Education > Math > Re: Determine q...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 4051 of 4322
Post > Topic >>

Re: Determine quadratic polynomial

by "[Mr.] Lynn Kurtz" <kurtz@[EMAIL PROTECTED] > May 2, 2008 at 07:12 PM

On Fri, 02 May 2008 17:27:18 +0200, Robert Larsen
<robert@[EMAIL PROTECTED]
> wrote:

>Hi group
>
>I seem to have lost all math skills :-(
>
>I am trying to determine the coefficients of a quadratic polynomial
>given the following data:
>
>x1,y1 - One point on the curve
>x2,y2 - Another point on the curve
>y3    - The Y coordinate of the top coordinate
>
>y3 > y1 and y3 > y2
>x2 > x1
>
>I believe this should yield exactly one solution but have no idea how to
>find it. Can you help me ?
>It should be used for calculating the path for an animation in a
>computer game.
>
>Sincerely,
>Robert

I will change your notation a little for easier typing and display.
Call your first point (a,b) and your second point (c,d), and the
height of your vertex by h (what you called y3). Now you want a
quadratic equation of the form

y = px^2 + qx + r

and you want to get p, q, and r knowing a,b,c,d, and h. This leads you
to the following three equations in the unknowns p, q, and r.

pa^2 + qa + r = b
pc^2 + qc + r = d  (these come from the first two points)
-q^2 + 4pr = 4ph  (this comes from your vertex requirement).

For example if (a,b) = (0,1) and (c,d) = (3,4) and h = 5, you will
find that p = -1, q = 4, and r = 1, giving the parabola:

y = - x^2 + 4x + 1.

However, if you try to solve the equations symbolically for p, q, and
r in terms of the other variables, you invariably run into a cubic
equation. For example, put (0,1) and (3,4) in that system and leave h
unknown and try to solve it by hand to see what happens when you try
to get p, q, and r in terms of h. So it looks to me like you are going
to have to use some numerical method. It isn't as easy as it would
appear to be at first glance.

--Lynn
 




 3 Posts in Topic:
Determine quadratic polynomial
Robert Larsen <robert@  2008-05-02 17:27:18 
Re: Determine quadratic polynomial
"[Mr.] Lynn Kurtz&qu  2008-05-02 19:12:29 
Re: Determine quadratic polynomial
"AvdBerg" <N  2008-05-04 19:27:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 7:39:49 CST 2008.