Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Gaming > Development Programming Algorithms > Re: Analytical ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 590 of 680
Post > Topic >>

Re: Analytical Firing Solution...

by nathan@[EMAIL PROTECTED] (Nathan Mates) Oct 28, 2006 at 02:28 AM

In article <1161998230.973977.157640@[EMAIL PROTECTED]
>,
m0rdred <idlerstyle@[EMAIL PROTECTED]
> wrote:
>Ok but to use newton's method I need a function in terms of theta right
>and then it's derivative also in terms of theta, correct?  If so, am I
>on the right track for the initial function of theta?  If not, where am
>I going wrong.  Law of Cosines would be helpful but I don't know two of
>the sides right?  I know the vector between theEnemy's ****p and
>theTarget, so I know magnitude/distance and angle to it.  But I don't
>know what the resulting vector will be for the ****p once I have shot
>the projectile because it is a function of time.  Nor do I know the
>magnitude of the resulting vector of the projectile once launched
>because it is a function of time as well.  Am I just too confused? ;)

   Take it as an iterative solution. Given ****ps at p1 (launcher) & p2
(target) with velocities v1 & v2, and a missile velocity vM, you can
do this in refinements. Initially, guess that time, e.g. t0, is
(p2-p1)/vM (the time it'd take the missile to get from one ****p to the
other, if both were stationary). Then, figure out how long it'd take
with movement: t1 = ((p2 + v2*t0) - p1) / vM. (That assumes only
linear movement, which is fine for now). t1 will probably be a bit
different than t0. But, do it again: t2 = ((p2 + v2 * t1) - p1) / vM.
Keep doing that until your t numbers don't change much-- this should
converge on things.

Nathan Mates

--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
 
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A.
Heinlein
 




 4 Posts in Topic:
Analytical Firing Solution...
"m0rdred" <i  2006-10-27 14:52:53 
Re: Analytical Firing Solution...
nathan@[EMAIL PROTECTED]   2006-10-27 23:36:39 
Re: Analytical Firing Solution...
"m0rdred" <i  2006-10-27 18:17:11 
Re: Analytical Firing Solution...
nathan@[EMAIL PROTECTED]   2006-10-28 02:28:09 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 19:24:57 CDT 2008.