.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   RACC (http://forums.bots-united.com/forumdisplay.php?f=11)
-   -   BotAim 2 announced. Best aiming ever. (http://forums.bots-united.com/showthread.php?t=3330)

Pierre-Marie Baty 06-01-2005 03:25

Re: BotAim 2 announced. Best aiming ever.
 
mommy

KWo 06-01-2005 09:44

Re: BotAim 2 announced. Best aiming ever.
 
Quote:

Originally Posted by @$3.1415rin
As always with differential equations, we search a function x which fits in that equation above, where that relation is true. This is usually done by searching the solution of the homogenous DEq, in our case that's m x'' + k x' + d x = 0. You can solve this with an exponential approach, i.e. you set x = exp( l * t ), put it into the hom DEq and divide by exp ( l * t ). This way we get a quadratic expression for l : m l^2 + k l + d = 0 which can be easily solved : l = -k/2m +- Sqrt( k^2 - 4 d m )/2m

I guess it may get confused Pierre a bit, so I'll try to explain it a bit more. :)
1. (f(g(t)))'=(f'(g(t)))*g'(t)
2. (exp(t))'=exp(t)
3. (l*t)'=l(t)'=l

Well, when we know this we can try find x'' and x' from Aspirin's equation (I mean this m x'' + k x' + d x = 0)


x'=(exp(l*t))'=(exp(l*t))*(l*t)'=(exp(l*t))*l=l*ex p(l*t)
x''=(x')'=(l*(exp(l*t))'=l*(exp(l*t))'=l*x'=l*l*(e xp(l*t))=(l^2)*exp(l*t)

so
m*x''=m*(l^2)*exp(l*t)
k*x'=k*l*exp(l*t)
d*x=d*exp(l*t)
and
m*(l^2)*exp(l*t)+k*l*exp(l*t)+d*exp(l*t)=0
then divide all equation by exp(l*t)

finally
m*(l^2)+k*l+d=0


I hope now it will be more clear for Pierre. 8)

[EDIT]
Cleared a bit more - according to Aspirin's suggestion
[/EDIT]


stefanhendriks 06-01-2005 10:10

Re: BotAim 2 announced. Best aiming ever.
 
noooo, too much math... brain explodes. Don't you ever do that again when i am just awake and want to relax and read some post asp! :D

*eek*

;)

@$3.1415rin 07-01-2005 22:31

Re: BotAim 2 announced. Best aiming ever.
 
:| didnt want to intimidate anyone ...

MarD 08-01-2005 01:15

Re: BotAim 2 announced. Best aiming ever.
 
Heyyo,

Hmm, very interesting PMB, I tested it out too, and yeah, it's very interesting. The ability to change the spring and damping and adjust it to the framerate will make this definately very good for a bot. Lol, it makes me think of the Q3A bot on 'Bring It On' difficulty where its view would spaz like crazy once it locked onto an enemy. May not look realistic yes, but at least it wasn't cpu-intensive eh? :P

Pierre-Marie Baty 08-01-2005 06:08

Re: BotAim 2 announced. Best aiming ever.
 
actually I'm starting to understand your math stuff, guys... just that I didn't know that one could solve diff eqs using exp stuff ; for us in electronics, when we have to solve a DEq of some sort, we turn it into the Laplace transform, or else the Z transform depending of its nature... solving DEqs with the Laplace transform is so fuckin'easy, I wonder why you math nerds feel the need to go the complicated way all the time... :|

@$3.1415rin 08-01-2005 09:19

Re: BotAim 2 announced. Best aiming ever.
 
I think solving those equations using laplace, fourier, whatever transformations wouldn't be simpler to explain here, since there is quite some more theory behind it. and I thought that exp approach would be the std way to go with such simple DEqs :)

Rifleman 08-01-2005 11:08

Re: BotAim 2 announced. Best aiming ever.
 
math ... yeah , I still how I fail me math test :D

KWo 08-01-2005 13:39

Re: BotAim 2 announced. Best aiming ever.
 
Yeah - this exp is a standard way tosolve this type of DEq equations. There are some kiknds of equations and for them You should use some standard solution (You need to remembere them or look into some math manual). The same like for Integrators from some more complicated functions - there are some standard ways to solve them, too.
About Laplace - yeah - You can see the same equation, something like:

m+ k/s +d/(s^2)=0 => m*s^2+k*s+d=0

with the same result like with this Aspirin's way, but Yeah - it needs much more theory to show and explain here. ;)

@$3.1415rin 12-01-2005 19:57

Re: BotAim 2 announced. Best aiming ever.
 
having m < 1 or k > 1 results often in 'going' crazy, because just using the DEq iteratively you'd get too big changes. maybe one'd need to solve the DEq, and get the coefficients from the current 'initial conditions' to calculate the next few frames. then we'd be save from oscillations, although it won't be that easy, especially with that special solution. the general wouldnt be a problem, but that one ...


All times are GMT +2. The time now is 19:02.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.