.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!


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

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