.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   OT: Looking for a good physics site (http://forum.shrapnelgames.com/showthread.php?t=35774)

Fyron August 18th, 2007 04:50 AM

Re: OT: Looking for a good physics site
 
Why are you randomly rewriting the equation? The way to solve a quadratic equation has already been posted..

Why are you starting with a complete set of values, including time and distance, that you plug in to verify the refactored equations? Where are they coming from?

narf poit chez BOOM August 18th, 2007 12:47 PM

Re: OT: Looking for a good physics site
 
If you thought that was random, you need to look again. I was de-rusting my algebra skills. I know I wasn't using the method that was posted; that was not the point. I was working off the theory that if 'T' is used to solve the equation, then some permutation of the equation could be used to solve for T.

I did not start with a distance value. I calculated it. I use a complete set of values for the simple reason that I can use them to see if the refactored equation is the correct one.

Fyron August 18th, 2007 01:30 PM

Re: OT: Looking for a good physics site
 
Getting T^3 as the only factor with T out of a quadratic polynomial looks entirely random to me.

Jack Simth August 18th, 2007 02:35 PM

Re: OT: Looking for a good physics site
 
Google is your friend.

Looks like someone already did the work.

narf poit chez BOOM August 18th, 2007 02:51 PM

Re: OT: Looking for a good physics site
 
@Fyron: Hence why I need to de-rust my algebra skills. It's the circle of maaaaath...

@Jack: I did try google. More than once.

narf poit chez BOOM August 18th, 2007 03:26 PM

Re: OT: Looking for a good physics site
 
Well, I read it and I get the general idea...

Would these be the equations to use? (After removing the 'Z' terms)
<font class="small">Code:</font><hr /><pre>0 = ( (1/4) * (Tax2 + Tay2 + Taz2 - Pam2) ) * t4 +
( Tax * Tvx + Tay * Tvy + Taz * Tvz - Pam * Pvm ) * t3 +
( Tax * Tpx + Tvx2 + Tay * Tpy + Tvy2 +
Taz * Tpz + Tvz2 - Pam * Ppm - Pvm2 ) * t2 +
( 2 * ( Tvx * Tpx + Tvy * Tpy + Tvz * Tpz - Pvm * Ppm ) ) * t +
( Tpx2 + Tpy2 + Tpz2 - Ppm2 )</pre><hr />

<font class="small">Code:</font><hr /><pre>P't2 = ( Pam2 * Rbt2 + 2 * Pam * Pvm * Rbt + Pvm2 ) * t2 +
( 2 * Pam * Ppm * (Pam * Rbt + Pvm) - Pam2 * Rbt3 - Pam * Pvm * Rbt2 ) * t +
( (1/4) * Pam2 * Rbt4 - Pam * Ppm * Rbt2 + Ppm2 )</pre><hr />

narf poit chez BOOM August 18th, 2007 04:44 PM

Re: OT: Looking for a good physics site
 
Yaay, the .dll works! Thank you Jack, thank you Fyron, thank you SJ, thank you everyone else who helped!

(Now, I just have to figure out how to modify the .dll for a matching intercept...)

Renegade 13 August 18th, 2007 08:23 PM

Re: OT: Looking for a good physics site
 
I remember now why I hate math! http://forum.shrapnelgames.com/image...ies/tongue.gif

AngleWyrm August 19th, 2007 04:33 AM

Re: OT: Looking for a good physics site
 
Quote:

narf poit chez BOOM said:I was working off the theory that if 'T' is used to solve the equation, then some permutation of the equation could be used to solve for T.

Given: D = (1/2) * A * T^2 + V * T + P

T = (-V +/- Sqrt(2AD-2AP+V^2) )/A

A = 5
T = 3
P = 50
V = 15
D = 117.5

3=(-15 +/- Sqrt(2x5x117.5 - 2x5x50 + 15^2))/5
3=(-15 +/- Sqrt(1175 - 500 + 225))/5
3=(-15 +/- Sqrt(900))/5
3=( -15 +/- 30 )/5
3=( 15 or -45 )/5
3=( 3 or -9)

Also:
V = ((D-P)/T) - AT/2
P = D - (T(AT+2V))/2
A = -( (2(-D+P+TV))/T^2 )

--
Mathematica: The new calculator

narf poit chez BOOM August 20th, 2007 06:59 AM

Re: OT: Looking for a good physics site
 
Thanks!

Baron Munchausen August 20th, 2007 07:34 PM

Re: OT: Looking for a good physics site
 
I sent an email to MM, suggesting he read this thread. Here is his comment:
Quote:


They're on the right track, but the basic problem is not spelled out. Is
this person looking for the intercept point, or angle and velocity for one
of the ships? If this is a missile seeking against another, are their
restrictions on the missile's movement? He needs to provide quite a bit more
information.


I'm guessing that he means you need different formulas for different aspects of this problem.

narf poit chez BOOM August 21st, 2007 11:53 AM

Re: OT: Looking for a good physics site
 
Well, I'm looking for the straight-line direction for the ship to accelerate in, at its current acceleration, to intercept another ship with the potential for both velocity and acceleration.

But I do have an (Uncommented) .dll for that now.

AngleWyrm August 23rd, 2007 11:48 PM

Re: OT: Looking for a good physics site
 
Here's a doc on missile maneuvers that seems relevant:
Proportional Navigation Against Time-Varying Target Maneuvers (pdf). It's rocket science. It's better than predecessors, but does contain a simplifying assumption: "The autopilot and seeker response is assumed to be instantaneous and the missile angle of attack is assumed to be negligibly small."

Also may be worth looking into Augmented Proportional Navigation.

narf poit chez BOOM August 24th, 2007 01:57 AM

Re: OT: Looking for a good physics site
 
Thanks.

narf poit chez BOOM August 24th, 2007 11:15 PM

Re: OT: Looking for a good physics site
 
What's a good image registration code for PHPBB2 and how would I install it? I'm getting a ton of spammers on my forum.


All times are GMT -4. The time now is 01:05 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.