| 08-15-2008, 01:32 PM | #2 |
ok ... |
| 08-15-2008, 01:55 PM | #3 |
Now this is cool. |
| 08-21-2008, 02:31 PM | #4 |
Hmm, I think this variant is less informative but it would be more efficient: JASS:function ParabolaZ takes real h, real d, real x returns real return h * (d - x) * x / d endfunction |
| 08-21-2008, 02:39 PM | #5 |
This function does a parabola, but it doesn't fit with the condition of the max height. In other words: if x = d/2 then ParabolaZ(x) != h |
| 08-21-2008, 07:50 PM | #6 |
very bad ass |
| 08-22-2008, 07:48 AM | #7 | |
moyack, hmm, your function also doesn't fit that condition (or maybe I'm idiot?) Quote:
JASS:function ParabolicMovement takes real h, real d, real x returns real local real a = -4*h/d*d local real b = 4*h/d return a*x*x + b*x endfunction JASS:function ParabolaZ takes real h, real d, real x returns real return (4 * h / d) * (d - x) * (x / d) endfunction |
| 08-22-2008, 12:46 PM | #8 |
You're fucking right, I've just checked my calculations and I miss a sign in the process.... definitely I have to sleep more often. thank you very much for your comments. +rep |
| 08-27-2008, 04:32 PM | #9 |
I did something similar a long time ago, you can see it from the link, but basically it does the exact same thing as this and it's what I've been using for about 3 years now, while I was coding using GUI http://www.hiveworkshop.com/forums/f...formula-18324/ I think his is just broken up a little more, and in an actual function but if it does the trick, it's good. |
| 08-27-2008, 05:33 PM | #10 | |
Quote:
|
| 08-29-2008, 03:55 PM | #11 | |
Quote:
AND i did this 3 years ago. Seriously though, I wonder how he came up with this; I had tried for a long time to get this, but to no avail. It figured it out when I was screwing around with my calculator one day... |
| 08-29-2008, 05:39 PM | #12 |
You can easily derive the formula in the first point by working backwards from the fundamental principles of kinematics with relation to the max height and max range formulas. You just have to assume the application of the parabola is for projectile motion is all, which is dead on with what it's generally used for. |
| 08-29-2008, 06:32 PM | #13 | |
Quote:
I came to this result as follows: H(x) = parabolic function D = Max dist that the parabolic movement must move h = Max height that the parabolic should achieve (1) H(x) = Ax^2 + Bx + C (2) H(0) = 0 => A0^2 + B0 + C = 0 => C=0 (3) H(D) = 0 => AD^2 + BD = 0 => B=-AD (4) H(D/2) = h => A(D/2)^2 + B(D/2) = h Let's replace B in the equation (4) with the result obtained in (3) and we'll obtain the following: (5) A(D/2)^2 - AD(D/2) = h => A(D^2/4) - AD^2/2 = h => A(D^2/4) - 2(AD^2/4) = h => -(AD^2/4) = h => A= -4h/D^2 Now let's replace in the result obtained in equation (3) the value of A and we'll obtain the value of B: B=-AD => B=-(-4h/D^2)*D => B= 4h/D Now, just replace the values of A and B in the parabolic function and voila!! let's play with our function. |
| 08-29-2008, 06:39 PM | #14 |
Clever thought process, I would've approached it from a physics standpoint since that's how I work, but okay. <3 |
| 08-29-2008, 06:53 PM | #15 |
Very much a school way of solving it :P Given three points on a parabola, find the equation of the parabola. Physics principles would probably be less work though. |
