Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2011-09-24 03:22:32

kroell
Member
Registered: 2011-09-24
Posts: 2

Formula to make point move along a line

Hi, I'm trying to create an animation of an object by programming it, and i need the formulas (one for X and one for Y) to move the object from point A (X1,Y1) to point B (X2,Y2), i already tried to work the distance but apparently didn't work.

________________________________
A (X1,Y1)             ?                           B(X2,Y2)

? (X3,Y3) >>> X3 = Formula?
                      Y3 = Formula?

Thanks in advance

Offline

#2 2011-09-24 09:25:22

kroell
Member
Registered: 2011-09-24
Posts: 2

Re: Formula to make point move along a line

i know the answer already... i will live it here for anybody that needs it...

to start only one function is needed,

so:

Y3 = ((Y1-Y2)/(X1-X2))*(X3-X1)+Y1

just need to give the X3 to the function, math will do the rest....

thank you!

Offline

Board footer

Powered by FluxBB