Linear Interpolation

Post any maths and/or physics related questions here.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Linear Interpolation

Postby Guest » Fri Dec 10, 2004 7:56 pm

I was hoping someone could help me understand why it is the following formula for linear interpolation works, I mean I have tried it and it works, but I'd like to really understand what is going on in it..

You have your two coords, (x1, y1) and (x2, y2)

x and y are points inbetween (x1, y1) and (x2, y2)


y = y1 + (y2 - y1) / (x2 - x1) * (x - x1)


So what is actually occuring here? I'm really confused.
Guest
 

Postby tomcant » Fri Dec 10, 2004 9:00 pm

y = y1 + (y2 - y1) / (x2 - x1) * (x - x1)

rearranged gives:

y - y1 = m(x - x1)

You must have seen this before? It is derived from y = mx + c ...
If it wasn't for C, we would be using BASI, PASAL and OBOL.
User avatar
tomcant
 
Posts: 3101
Joined: Tue Sep 23, 2003 1:56 am
Location: Colchester, UK

Postby Guest » Fri Dec 10, 2004 9:06 pm

ah thanks, I must have had a brainfart. Couldn't quite relate the formula to y = mx + c, or jsut wasn't thinking straight.
Guest
 


Return to Maths & Physics

Who is online

Users browsing this forum: No registered users and 1 guest