x^2-curve
You get the velocity by deriving the formula:
Position
F(x) = x2
Speed
dF(x) = 2x
Acceleration
ddF(x) = 2
But if you want to do a ballistic course of a shell you might consider something like this:
Fire location
Pos = (x,y)
Fire speed
Spd = (dx, dy)
Then you move the shell iteratively by this algorithm
Edited by - Spellbound on 2/28/00 10:26:14 AM
I have corrected the error that webspynner_99 mentions below.
Edited by - Spellbound on 3/1/00 6:41:22 AM
Position
F(x) = x2
Speed
dF(x) = 2x
Acceleration
ddF(x) = 2
But if you want to do a ballistic course of a shell you might consider something like this:
Fire location
Pos = (x,y)
Fire speed
Spd = (dx, dy)
Then you move the shell iteratively by this algorithm
- Update location
Pos = Pos + t*Spd; - If collision then exit loop
- Update speed
Spd.dy += t*GravityConst;
Spd.dx += t*Wind; - Goto 1
Edited by - Spellbound on 2/28/00 10:26:14 AM
I have corrected the error that webspynner_99 mentions below.
Edited by - Spellbound on 3/1/00 6:41:22 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement