Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » General Discussions » General Discussion » A math question.
Re: A math question. [message #256998 is a reply to message #256827] Thu, 03 May 2007 09:31 Go to previous messageGo to next message
Jerad2142 is currently offline  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.


[Updated on: Thu, 03 May 2007 09:36]

Report message to a moderator

Re: A math question. [message #257043 is a reply to message #256998] Thu, 03 May 2007 12:23 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3814
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Jerad Gray wrote on Thu, 03 May 2007 10:31

*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).


Ignore I said that, half an hour later I realized that theta was just the name of the angle.


Re: A math question. [message #257175 is a reply to message #255878] Thu, 03 May 2007 21:21 Go to previous messageGo to next message
Doitle is currently offline  Doitle
Messages: 1723
Registered: February 2003
Location: Chicago, IL
Karma: 0
General (1 Star)
Moderator/Captain

I'm not positive what you mean about the distance coming into play.

D = your initial displacement from the so called origin.

R = the Range, how far the shot travels horizontally.

So lets say you knew that from a certain point, the origin, an enemy was 40m away. You knew that you were 13m from the origin. You would plug in 13 for d and 40m for R. Then plug in your muzzle velocity for V and your gravitational constant for A and you could solve the angle neccesary to peg that enemy.


http://www.n00bstories.com/image.fetch.php?id=1285726594
Re: A math question. [message #257418 is a reply to message #257175] Sat, 05 May 2007 10:07 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3814
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
So is the 13m the length of the muzzle?

R = d + v*cos(theta)*(v*sin(theta)+SqRt(v^2*.5*(1-cos(2theta))-(2*A*(0-h)))/A)

I am trying to solve for the angel, shouldn't R and A switch spots?


[Updated on: Sat, 05 May 2007 10:11]

Report message to a moderator

Re: A math question. [message #257452 is a reply to message #255878] Sat, 05 May 2007 14:41 Go to previous messageGo to next message
Doitle is currently offline  Doitle
Messages: 1723
Registered: February 2003
Location: Chicago, IL
Karma: 0
General (1 Star)
Moderator/Captain

Theta is the angle not A. A is your graviational accelleration constant, for example g=9.81. I will solve it for Theta for you so you can just straight plug in. The d is not really used in your application.

http://www.n00bstories.com/image.fetch.php?id=1285726594
Re: A math question. [message #259321 is a reply to message #257452] Fri, 18 May 2007 09:58 Go to previous message
Jerad2142 is currently offline  Jerad2142
Messages: 3814
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Thanks for the help, I was just confusing myself, now all I have to do is plug and play.

Previous Topic: Ohh. Emm. Gee.
Next Topic: Anti Web blocker site?
Goto Forum:
  


Current Time: Wed Feb 19 00:30:31 MST 2025

Total time taken to generate the page: 0.00828 seconds