.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old August 17th, 2007, 06:47 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: OT: Looking for a good physics site

...I'm missing something here. You're saying the positions must be equal, but at the same time they start unequal.

Huh? Unknown and unequal are not the same thing.

...I have no idea what you just said.

http://en.wikipedia.org/wiki/Zero_of_a_function
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #2  
Old August 17th, 2007, 06:58 PM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default Re: OT: Looking for a good physics site

I'm missing something. Probably something obvious. Are you saying the function backtracks from where the positions are equal to where they are at start?

Ok, so occasionally the formula will return zero.

Perhaps it would help if you looked at my code? It could help us figure out the difference between what I think I should be doing versus what I should actually be doing.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
Reply With Quote
  #3  
Old August 17th, 2007, 07:18 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: OT: Looking for a good physics site

The two final positions are variables, and unknown. But they are equal to each other by definition, since equal positions is the definition of interception.
Knowing that they are both equal reduces the number of unknowns by one (Instead of positionA and positionB, you have two copies of positionIntercept). This allows you to solve for Time. If the interception is impossible, Time will end up being an imaginary number.
Reply With Quote
  #4  
Old August 17th, 2007, 07:24 PM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default Re: OT: Looking for a good physics site

Ok, thanks, that makes sense.

One of the problems is that it tends to flicker between thinking it is unsolveable and having an intercept angle. (I have a bit of code that gives it an angle of '0' if it's unsolveable). That's one reason I posted the code.

You guys are great, you know that, right?
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
Reply With Quote
  #5  
Old August 17th, 2007, 07:37 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: OT: Looking for a good physics site

That would happen when you are just barely able to intercept it.

One thing to note is that if you try to burn at 100% power up to halfway, and then decelerate at 100% power the rest of the way... then you have NO ACCEL left over to correct for rounding errors.

You should probably have the ship try to use 90% of its maximum accel, and try more thrust if that isn't enough...
If both ships are of equal accel, you've got to just head for it and hope the target isn't actively trying to avoid you.
Reply With Quote
  #6  
Old August 17th, 2007, 07:41 PM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default Re: OT: Looking for a good physics site

That's a good suggestion. And it would fit in with how engine sare generally operated - Few are run at 100% power.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
Reply With Quote
  #7  
Old August 17th, 2007, 07:30 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: OT: Looking for a good physics site

Ok, so occasionally the formula will return zero.

If one of the zeros/x-intercepts of the equation occurs at 0,0, then sure... The formula always returns two zeros/x-intercepts; that is the entire purpose of it.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #8  
Old August 17th, 2007, 07:32 PM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default Re: OT: Looking for a good physics site

Oh, you mean it returns an intercept that is zero relative to the target.

Ok, so it should work. Now I just have to figure out why my implementation doesn't.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
Reply With Quote
  #9  
Old August 17th, 2007, 07:47 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: OT: Looking for a good physics site

Oh, you mean it returns an intercept that is zero relative to the target.

No, I don't mean that. I mean every quadratic function has 2 zeros/roots/x-intercepts. They are only a function of where the graph of the quadratic equation in question crosses the x axis. There will usually be two such locations, due to quadratic polynomial equations being parabolas and all (a parabola that has its vertex on the x axis will have both root solutions equal to each other).

The concept of zeros/roots/x-intercepts is unrelated to the problem of calculating where two ships should intercept each other in space. There is a lot of overlapping terminology, which is probably the root (hehehe) of the confusion. The zeros/roots/x-intercepts of the particular function we derived happen to be the time values (T) when the two objects will be in the same location at once, which is why they are useful for the solution.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #10  
Old August 17th, 2007, 08:02 PM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default Re: OT: Looking for a good physics site

Ah. So I was in the general area.

So...Can I get a hint on where I'm implementing it wrong?
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 12:44 PM.


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