UPDATE:
What I want is that given two points A and B, which are not in a straight line, I want a method thats gives me m and n. M and N are a couple of variables that adds to the previous coordinates. Therefore A' is (x0+m, y0+n). This method is going to be called a lot of times, to finally create a sinusoidal trajectory.
My main problem is that I don't really know how to put a sin equation with slope.
I would be grateful if you could help me out with the pseudocode of the method thats obtains m and n values. This method has access to the actual coordinates.
Thank you very much.
OLD POST:
Ok...if I didn't explain my self... I have a particle in a point A (X0, Y0) and I want to move it in a small increment toward point B (X1, Y1). So my new point will be A' which will be at coordinates (X0+m, Y0+n).
I'm totally blocked trying to find a way of obtaining m and n in order to form a sinusoidal wave that moves from one point to another.
Please, notice that it moves in very small intervals, I mean m and n are really small. For example, if the distance between A and B is 1000px, the values for m and n would be between 1 and 5 px.
Thank you very much.