oznog wrote: > I am trying to implement the use of bazooka into AI. > > I calculate the trajectory of the bullet, but the equations are not > really simple to solve: > > the parametric coordinates are: > > x(t) = -m/k * (v0x + W/m)(exp(-k/m * t) -1) -W/m *t + x0 > y(t) = -m/k * (v0y + g)(exp(-k/m * t) -1) -g*t +y0 > > where x0 y0 are the coordinates of the origine of movement (the shooter) > k is the air visosity, m is the bullet mass, W the wind value, t is the > time. > v0x=(e^kt/m)ktW+m(W-e^(kt/m)W+e^(kt/m)k(x-x0))/(-1+e^(kt/m)m^2) v0y=(g(m-e^(kt/m)m+e^(kt/m)kt)+e^(kt/m)k(y-y0))/(-1+e^(kt/m)m)
These equations come from solving for v0x and v0y in mathematica. I'm not sure if they are useful or not though. Question: don't we already know the speed of the bullet as it leaves the weapon? I'm still recovering from having my motherboard fail on me (which is why I haven't done anything or been on IRC for the last month or two), and am having trouble getting to the source (even over the web), but if I remember correctly a velocity is given to each bullet. Can't this be broken into x and y velocities? Also, sorry for the double / triple posts here, it seems as if my email client is doing something very wrong. *sigh* I should have this all sorted out sometime soon and be able to start working on wormux again. > > As we are trying to guess the trajectory to shoot the enemy, we know > the x and y of the target. > > So what is missing is v0x and v0y (speed on x and y of the bullet when > leaving the weapon) > > I think it would be really simple to ask something like mathlab or > mapple for the exact solution, so if someone has something like that > around... > > On another hand, I am not really sure of my calculations so please > feel free to correct me. > > SG _______________________________________________ Wormux-dev mailing list Wormux-dev@gna.org https://mail.gna.org/listinfo/wormux-dev