The main problem with this sort of program is writting the routine that will make the transition smooth.
You can't directly tie in the x,y pixel position into the formulae. (If you do, the movement will be stutterish - the drawn pixels will jump instead a seamless translation.)
IMHO you should make a time based formulae and then make a function that outputs the current x,y pixel positions to draw.
(For 2D, 2 perpendicular accelerations will do. Since we're already using them, let them be x and y.
All posible 2D accelerations can be modeled as the sum of an x and y axis acceleration.)
The unit of acceleration should be pixel/second^2 while velocity should be pixel/second.
You *will* be using fraction values.
You should store the real position and the drawn position. The later will be made by converting the real pos. into an integer value
That way:
// (r - for real) r.pos is a record with two float values: x and y
// (d - for drawn) d.pos is also a record with two integers: x and y
// t is a time function that outputs time in seconds, if you have a function that outputs time in ms (milliseconds) than divide the value by 1000.
r.pos.x = r.pos.x + (vel.x * t) + (a.x/2*t*t)
r.pos.y = r.pos.y + (vel.y * t) + (a.y/2*t*t)
vel.x = vel.x + (a.x * t)
vel.y = vel.y + (a.y *t)
//These funtions handle the change of position
//vel holds the x,y velocity values
//a holds the x,y acceleration values
d.pos.x = cint(r.pos.x)
d.pos.y = cint(r.pos.y)
When the a.x, a.y values are not 0 the object will either accelerate of decelerate. You don't need a separate fucntion for either one.
If a.x * vel.x > 0 then it's accelerating on the x axis
If a.x * vel.y < 0 then it's decelerating on the x axis
If a.x * vel.y = 0 then it's either moving steadly (acceleration = 0) or the object has momentarily stopped on the screen (vel = 0)