Gaming World Forums

General Category => General Talk => Topic started by: JMickle on March 21, 2009, 06:53:32 pm

Title: quadratic equation
Post by: JMickle on March 21, 2009, 06:53:32 pm
can someone tell me the equation for a quadratic curve that has roots at 0 and 8000 and a peak at (4000,1)?

i'm dumb and cant do it but i need it for my game
Title: quadratic equation
Post by: esiann on March 21, 2009, 07:04:31 pm
x^2 - 8000x = 0 i think
Title: quadratic equation
Post by: JMickle on March 21, 2009, 07:05:43 pm
nah thats the wrong way up.
Title: quadratic equation
Post by: JMickle on March 21, 2009, 07:11:27 pm
y=-0.00000000060(x-4000)2+1 seems to do the job for me
Title: quadratic equation
Post by: Guana on March 21, 2009, 07:20:32 pm
can someone tell me the equation for a quadratic curve that has roots at 0 and 8000 and a peak at (4000,1)?

i'm dumb and cant do it but i need it for my game

My calculator gives

(-1/16000000)*x^2 + 1/2000*x = 0
Title: quadratic equation
Post by: Randy Moist on March 21, 2009, 08:44:24 pm
My calculator gives

(-1/16000000)*x^2 + 1/2000*x = 0

Yea this one works. Roots are where y=0 (crosses the x axis) so you should be able to plug in 0 and 8000 and get 0 back.
y=-0.00000000060(x-4000)2+1 seems to do the job for me
This one doesn't work because you get something like .96(?) when plugging in 8000


It's been awhile since I've done this stuff but plugging in all the points comes out right using _Guana's and I think if the roots and peak are right you can assume the rest of the curve is.
Title: quadratic equation
Post by: JMickle on March 21, 2009, 08:48:19 pm
i drew the one i got on my calculator and it gets kinda near, which is good enough, but it turns out GM can't handle numbers as long as that so neither equation really works.

i just used 2 straight line graphs instead and it works fine.

thanks for the help anyway  :fogetsmile:
Title: quadratic equation
Post by: Bisse on March 21, 2009, 11:15:32 pm
You guys should give him the proper method to solve it instead of just doing it once for him. Here's the method for solving it, assume this equation:

f(x) = c * (x - 0)(x - 8000)

You can see that this gives 0 when entering any of your two roots, without picking up your calculator or even a pen.
Solve c by exchanging x with 4000 and f(x) with 1. This would give you:

c = (1 - 0)(1 - 8000) / 4000

In the future, exchange the numbers for the roots and the peak as you need to.
Title: quadratic equation
Post by: JMickle on March 21, 2009, 11:35:22 pm
yeah i knew the roots thing, but i had no idea how i could change the peak properly so i did trial and error to get a graph close to what i needed.

I used a -x2 graph and added 4000 coz thats where i wanted the peak, then moved it up and divided it until it passed around about (0,0).

I'll use that method in future, thanks.  :fogetsmile:
Title: quadratic equation
Post by: YourHero on March 21, 2009, 11:38:14 pm
we should have a "help me with my homework" forum.
Title: quadratic equation
Post by: JMickle on March 21, 2009, 11:44:46 pm
we should have a "help me with my homework" forum.

or you could actually learn it like everyone else
Title: quadratic equation
Post by: Parker on March 22, 2009, 01:14:56 am
quadratic formula
Title: quadratic equation
Post by: YourHero on March 22, 2009, 01:20:30 am
or you could actually learn it like everyone else

uuuh wait. who made this thread?  :fogetshifty:
Title: quadratic equation
Post by: Vellfire on March 22, 2009, 01:21:12 am
uuuh wait. who made this thread?  :fogetshifty:

i didn't see anywhere that he said this was for school
Title: quadratic equation
Post by: JMickle on March 22, 2009, 01:30:30 am
i didn't see anywhere that he said this was for school

i need it for my game
Title: quadratic equation
Post by: YourHero on March 22, 2009, 01:53:09 am
maybe his game is for his homework.

or maybe his homework is for his game.
Title: quadratic equation
Post by: Boulvae on March 22, 2009, 01:59:08 am
Wouldn't this go in tech help if it was for your game?
Title: quadratic equation
Post by: Frisky SKeleton on March 22, 2009, 04:16:30 am
i didn't see anywhere that he said this was for school

exactly it's work he's doing at home
Title: quadratic equation
Post by: JMickle on March 22, 2009, 11:49:30 am
Wouldn't this go in tech help if it was for your game?

well its not specific problem with coding or the game maker or whatever so i thought i'd put it here

AND WHY IS EVERYONE TALKING ABOUT ME INSTEAD OF TO ME.   :fogethuh:
Title: quadratic equation
Post by: big ass skelly on March 22, 2009, 12:59:00 pm
It's practice for when you're an old man
Title: quadratic equation
Post by: JMickle on March 22, 2009, 03:27:01 pm
It's practice for when he's an old man

cccccccombo breaker