<p>Since this is linear interpolation it boils down to solving a linear equation</p>
<p><span class="math-container">$y = a + b t$</span></p>
<p>You can substitute the following <span class="math-container">$y = y_s$</span>, <span class="math-container">$a = y_1$</span>(intercept) and <span class="math-container">$b = y_2 - y_1$</span> (slope) to get the following</p>
<p><span class="math-container">$$y_s = y_1 + t(y_2 - y_1)$$</span>
<span class="math-container">$$y_s - y_1 = t(y_2 - y_1)$$</span>
<span class="math-container">$$\frac{y_s - y_1}{y_2 - y_1} = t$$</span></p>
<p>The same thing happens for points where you can write</p>
<p><span class="math-container">$$D = A + (B-A)t$$</span></p>
<p><span class="math-container">$$ (D-A) = (B-A)\cdot t$$</span>
<span class="math-container">$$ (D-A)^2 = ((B-A)\cdot t)^2$$</span>
<span class="math-container">$$ \sqrt{(D-A)^2} = \sqrt{((B-A)\cdot t)^2}$$</span>
<span class="math-container">$$ \sqrt{(D-A)^2} = \sqrt{(B-A)^2 \cdot t^2}$$</span>
<span class="math-container">$$ \sqrt{(D-A)^2} = \sqrt{(B-A)^2} \cdot\sqrt{ t^2}$$</span>
<span class="math-container">$$ |D-A| = |B-A| \cdot t$$</span>
<span class="math-container">$$ t = \frac{|D-A|}{|B-A|}$$</span></p>

CC BY-SA 4.0
2021-01-13T13:47:44.350Z
But how could the slope be y2- y1 slope is : change in y over change in x i.e  ∆y/∆x
anuj goyal
CC BY-SA 4.0
2021-01-14T11:13:21.387Z
actually the slope in this case is ∆y/∆t
Reynolds
CC BY-SA 4.0
2021-01-13T13:28:23.660Z
2021-01-13T16:50:41.103Z
2021-01-13T16:50:41.103Z
Reynolds
<p>I<sub>4</sub>=I<sub>1</sub>  ( 1-t ) + t.I<sub>2</sub>  ; from parametric equation of line</p>
<p>I4=I1 - I1.t + t. I2</p>
<p>I4=I1+ t (I2-I1)
Let's take line AB apart from triangle</p>
<p><img src="https://i.sstatic.net/cqxtR.jpg" alt="enter image description here" />
below in the equation I multiply t<sup>2</sup> to numerator an denominator</p>

CC BY-SA 4.0
2021-01-14T19:31:49.517Z
2021-02-26T09:25:16.783Z
2021-02-26T09:25:16.783Z
anuj goyal
<p>Here in my book they have shown interpolation using parametric equation of line but I am unable to figure out how do they found out t=|y1-ys|/y1-y2 , t=|AD|/|AB| , t=|CE|/CB ,t=|EP|/|DE| here is the  pic <a href="https://i.sstatic.net/njcYV.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/njcYV.jpg" alt="enter image description here" /></a></p>
<p><img src="https://i.sstatic.net/5URZg.jpg" alt="enter image description here" /></p>

CC BY-SA 4.0
2021-01-15T22:24:17.237Z
I prefer to think that linear interpolation is a weighted average with linked weights so that  $p_i = t p_1 + (1 - t) p_2$ because this is easier in vector form and also motivated by vector drawings. Obviously its the same thing but expressed differently.
joojaa
<interpolation>
How to do linear interpolation?
anuj goyal
# How to do linear interpolation?

(Asked by: username_0 on 2021-01-13)

Here in my book they have shown interpolation using parametric equation of line but I am unable to figure out how do they found out t=|y1-ys|/y1-y2 , t=|AD|/|AB| , t=|CE|/CB ,t=|EP|/|DE| here is the pic [![enter image description here](https://i.sstatic.net/njcYV.jpg)](https://i.sstatic.net/njcYV.jpg)

![enter image description here](https://i.sstatic.net/5URZg.jpg)

**Tags:** interpolation

> **Comments:**
> **username_1**: I prefer to think that linear interpolation is a weighted average with linked weights so that  $p_i = t p_1 + (1 - t) p_2$ because this is easier in vector form and also motivated by vector drawings. Obviously its the same thing but expressed differently.  

---

## 2 answers

### Answer by username_2 on 2021-01-13. Score: 0 | Accepted answer

Since this is linear interpolation it boils down to solving a linear equation

$y = a + b t$

You can substitute the following $y = y\_s$, $a = y\_1$(intercept) and $b = y\_2 - y\_1$ (slope) to get the following

$$y\_s = y\_1 + t(y\_2 - y\_1)$$
$$y\_s - y\_1 = t(y\_2 - y\_1)$$
$$\frac{y\_s - y\_1}{y\_2 - y\_1} = t$$

The same thing happens for points where you can write

$$D = A + (B-A)t$$

$$ (D-A) = (B-A)\cdot t$$
$$ (D-A)^2 = ((B-A)\cdot t)^2$$
$$ \sqrt{(D-A)^2} = \sqrt{((B-A)\cdot t)^2}$$
$$ \sqrt{(D-A)^2} = \sqrt{(B-A)^2 \cdot t^2}$$
$$ \sqrt{(D-A)^2} = \sqrt{(B-A)^2} \cdot\sqrt{ t^2}$$
$$ |D-A| = |B-A| \cdot t$$
$$ t = \frac{|D-A|}{|B-A|}$$

> **Comments:**
> **username_0**: But how could the slope be y2- y1 slope is : change in y over change in x i.e  ∆y/∆x  
> **username_2**: actually the slope in this case is ∆y/∆t  

---

### Answer by username_0 on 2021-01-14. Score: -1

I4=I1 ( 1-t ) + t.I2 ; from parametric equation of line

I4=I1 - I1.t + t. I2

I4=I1+ t (I2-I1)
Let's take line AB apart from triangle

![enter image description here](https://i.sstatic.net/cqxtR.jpg)
below in the equation I multiply t2 to numerator an denominator


---

