Re: A math question. [message #256998 is a reply to message #256827] |
Thu, 03 May 2007 09:31   |
 |
Jerad2142
Messages: 3814 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
Doitle wrote on Wed, 02 May 2007 15:04 |
Here you go.
R = d + v*cos(theta)*(v*sin(theta)+SqRt(v^2*.5*(1-cos(2theta))-(2*A*(0-h)))/A)
I'm pretty sure that's the Master Projectile Equation I derived back in Highscool. I still had the prgoram I made for the TI that ran the equation. Basically here's the breakdown. V = your muzzle velocity. Theta is the angle off the horizontal. A is your accelleration constant (e.g. g=9.81m/s^2) H is your initial height. D is your initial X displacement. (How far back from the edge of the cliff you are.
Hope that helps. If you can't make sense of it I'll go put it into math type to make it look a bit prettier.
|
*Glares* theta!!! Sin, cos, and tan are annoying enough, you have to put in theta. But in all seriousness I can not remember how to derive theta (it seems like it was sin's or cos's reciprocal, but I do not remember).
And the square root of "(v^2*.5*(1-cos(2theta))"
"D is your initial X displacement. (How far back from the edge of the cliff you are." Where does distance come into play?
But besides those few things it looks like it will work, now all I have to do is make the computer calculate it 10 times every second and we will be good (just kidding, I am not out to kill everyones computers). But Thanks for your help so far Doitle, you get me through this and I will make sure to give you credit.
gamemodding wrote on Wed, 02 May 2007 14:32 | Mabe a homing missile that is shot straight up into the air?
|
Thats what I use to do, its good, until the artillery shell starts chasing you (or curving up trying to get jets). And if you make it so it doesn't track that much, it always comes up short. So that is what drove me to actually want to make a formula.
Visit Jerad's deer sweat shop
[Updated on: Thu, 03 May 2007 09:36] Report message to a moderator
|
|
|
|
|
|
|
|