Gaming World Forums
General Category => General Talk => Topic started 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
-
x^2 - 8000x = 0 i think
-
nah thats the wrong way up.
-
y=-0.00000000060(x-4000)2+1 seems to do the job for me
-
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
-
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.
-
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:
-
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.
-
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:
-
we should have a "help me with my homework" forum.
-
we should have a "help me with my homework" forum.
or you could actually learn it like everyone else
-
quadratic formula
-
or you could actually learn it like everyone else
uuuh wait. who made this thread? :fogetshifty:
-
uuuh wait. who made this thread? :fogetshifty:
i didn't see anywhere that he said this was for school
-
i didn't see anywhere that he said this was for school
i need it for my game
-
maybe his game is for his homework.
or maybe his homework is for his game.
-
Wouldn't this go in tech help if it was for your game?
-
i didn't see anywhere that he said this was for school
exactly it's work he's doing at home
-
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:
-
It's practice for when you're an old man
-
It's practice for when he's an old man
cccccccombo breaker