`v(s)`

which accurately describes the `v(s`_{1})=v_{1}

and `v(s`_{2})=v_{2}

with the known/given gradients
`v'(s`_{1})=m_{1}

and `v'(s`_{2})=m_{2}

.
(Note: The `v(s)=v`_{1}+s·m_{1}+s²(3Δv/Δs-2m_{1}-m_{2})/Δs-s³(2Δv/Δs-m_{1}-m_{2})/Δs²

with `Δv=v`_{2}-v_{1}

and `Δs=s`_{2}-s_{1}

-- Eas programming code: -- EMIP constants: dv v2-v1 dsi 1/(s2-s1) a (3*dv*dsi-2*m1-m2)*dsi b (m1+m2-2*dv*dsi)*dsi^2 -- EMIP rendering: v v1+s*(m1+s*(a+s*b))

`v(s`_{1})=v_{1}

and `v(s`_{2})=v_{2}

we will work with `v(0)=0`

and `v(s`_{2}-s_{1})=v_{2}-v_{1}

.
And to make it even handier, we will define `Δs=s`_{2}-s_{1}

and `Δv=v`_{2}-v_{1}

and therefore write for short `v(0)=0`

and `v(Δs)=Δv`

.
Now how are we gonna solve the actual problem?
We will `v'(s)=m`_{1}·F_{1}(s)+m_{2}·F_{2}(s)

with `F`_{1}(0)=1

to `F`_{1}(Δs)=0

and `F`_{2}(0)=0

to `F`_{2}(Δs)=1

.
For the `F`_{2}(s)=s/Δs

:
And the `F`_{1}(s)=1-s/Δs

:
So we now have `v'(s)=m`_{1}·(1-s/Δs)+m_{2}·s/Δs.

(Just set s to 0 vs Δs to see that indeed v'(0)=m`v(Δs)=Δv`

`v'(Δs/2)=m`_{M}

.
We now need to `v'(s)=m`_{1}·F_{1}(s)+m_{2}·F_{2}(s)+m_{M}·F_{M}(s)

.
And in order not to destroy our `F`_{M}(0)=0

and `F`_{M}(Δs/2)=1

and `F`_{M}(Δs)=0

.
The following sketch shows the simplemost function's `F`_{M}(s)=1-(2s/Δs-1)²

.
(Test it again with s=0, s=Δs/2, and s=Δs.)
Using this we `v'(s)=m`_{1}·(1-s/Δs)+m_{2}·(s/Δs)+m_{M}·(1-(2s/Δs-1)²)

.
If you `m`_{M}+(m_{1}+m_{2})/2

instead. That, however, is `v'(s)=m`_{1}+s⋅(m_{2}-m_{1}+4m_{M})/Δs-s²⋅4m_{M}/Δs²

`∫x`^{n}δx = x^{(n+1)}/(n+1)+C

.
Since we defined that `v(s)=s·m`_{1}+s²⋅(m_{2}-m_{1}+4m_{M})/2Δs-s³⋅4m_{M}/3Δs²

`v(Δs)=Δs·m`_{1}+Δs²⋅(m_{2}-m_{1}+4m_{M})/2Δs-Δs³⋅4m_{M}/3Δs²
v(Δs)=Δs⋅(m_{1}+(m_{2}-m_{1}+4m_{M})/2-4m_{M}/3)
v(Δs)=Δs⋅(m_{1}/2+m_{2}/2+2m_{M}/3)

`v(Δs)=Δv=Δs⋅(m`_{1}/2+m_{2}/2+2m_{M}/3)

.
Now we can `m`_{M}=3(2Δv/Δs-m_{1}-m_{2})/4

.
Which we can ```
v(s)=
s·m
```_{1}
+s²(m_{2}-m_{1}+3(2Δv/Δs-m_{1}-m_{2}))/2Δs
-s³(2Δv/Δs-m_{1}-m_{2})/Δs²

This formula now contains `v(s)=v`_{1}+s·m_{1}+s²(3Δv/Δs-2m_{1}-m_{2})/Δs-s³(2Δv/Δs-m_{1}-m_{2})/Δs²

```
n=1..c-2 :
d=((x
```_{n+1}-x_{n-1})²+(y_{n+1}-y_{n-1})²+(z_{n+1}-z_{n-1})²)^{1/2}
m_{x,n}=(x_{n+1}-x_{n-1})/d
m_{y,n}=(y_{n+1}-y_{n-1})/d
m_{z,n}=(z_{n+1}-z_{n-1})/d
d=((x_{1}-x_{0})²+(y_{1}-y_{0})²+(z_{1}-z_{0})²)^{1/2}
f=2/d
m_{x,0}=f⋅(x_{1}-x_{0})-m_{x,1}
m_{y,0}=f⋅(y_{1}-y_{0})-m_{y,1}
m_{z,0}=f⋅(z_{1}-z_{0})-m_{z,1}
d=((x_{c-1}-x_{c-2})²+(y_{c-1}-y_{c-2})²+(z_{c-1}-z_{c-2})²)^{1/2}
f=2/d
m_{x,c-1}=f⋅(x_{c-1}-x_{c-2})-m_{x,c-2}
m_{y,c-1}=f⋅(y_{c-1}-y_{c-2})-m_{y,c-2}
m_{z,c-1}=f⋅(z_{c-1}-z_{c-2})-m_{z,c-2}

```
n=c-1..1 :
x
```_{2n}=x_{n} ; y_{2n}=y_{n} ; z_{2n}=z_{n}
d_{2n}=d_{n}
m_{x,2n}=m_{x,n} ; m_{y,2n}=m_{y,n} ; m_{z,2n}=m_{z,n}

```
n=1
i=1..c-1 :
d=((x
```_{n+1}-x_{n-1})²+(y_{n+1}-y_{n-1})²+(z_{n+1}-z_{n-1})²)^{1/2}
f=d/4
x_{n}=(x_{n-1}+x_{n+1}+f⋅(m_{x,n-1}-m_{x,n+1}))/2
y_{n}=(y_{n-1}+y_{n+1}+f⋅(m_{y,n-1}-m_{y,n+1}))/2
z_{n}=(z_{n-1}+z_{n+1}+f⋅(m_{z,n-1}-m_{z,n+1}))/2
n+2

`c`_{new}=(c_{old}-1)⋅2+1

.
(Each of the five visible walls has a different function when you move your **mouse pointer** over it. When the mouse pointer is **outside** the image, the **normal random** animation is displayed again.)

IMIP might be used not only for (published 2024-09-22)
All **images** and **animations** on this page
are **rendered live** by my own programming language
**Eas** (Easy Application Script). See E →Molaskes.info/Eas.