1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-30 03:30:34 +02:00
This commit is contained in:
Pomax
2020-09-11 18:06:55 -07:00
parent a9d0b9bb10
commit a626c2c8cb
13 changed files with 20 additions and 18 deletions

View File

@@ -682,7 +682,7 @@ function Bezier(3,t):
<graphics-element title="Quadratic interpolations" width="275" height="275" src="./chapters/control/lerp.js" data-degree="3">
<fallback-image>
<span class="view-source">Scripts are disabled. Showing fallback image.</span>
<img width="275px" height="275px" src="images\chapters\control\71d891b569460c79765670d3f49d2da9.png" />
<img width="275px" height="275px" src="images\chapters\control\42328a6806cce466a84762d24a0bf7f2.png" />
<label>Quadratic interpolations</label>
</fallback-image>
<input type="range" min="0" max="1" step="0.01" value="0" class="slide-control" />
@@ -691,7 +691,7 @@ function Bezier(3,t):
<graphics-element title="Cubic interpolations" width="275" height="275" src="./chapters/control/lerp.js" data-degree="4">
<fallback-image>
<span class="view-source">Scripts are disabled. Showing fallback image.</span>
<img width="275px" height="275px" src="images\chapters\control\3b627846198c0cb3c542fe13cb923029.png" />
<img width="275px" height="275px" src="images\chapters\control\d77c40cdea1037003e9d8aafea57f9a2.png" />
<label>Cubic interpolations</label>
</fallback-image>
<input type="range" min="0" max="1" step="0.01" value="0" class="slide-control" />
@@ -700,7 +700,7 @@ function Bezier(3,t):
<graphics-element title="15th degree interpolations" width="275" height="275" src="./chapters/control/lerp.js" data-degree="15">
<fallback-image>
<span class="view-source">Scripts are disabled. Showing fallback image.</span>
<img width="275px" height="275px" src="images\chapters\control\2cc2f0127510f2700656c2f894b36674.png" />
<img width="275px" height="275px" src="images\chapters\control\50ae7279f2827b557f76379c80d00a83.png" />
<label>15th degree interpolations</label>
</fallback-image>
<input type="range" min="0" max="1" step="0.01" value="0" class="slide-control" />
@@ -745,7 +745,7 @@ function Bezier(3,t):
for(k=0; k&lt;=n; k++):
sum += w[k] * binomial(n,k) * (1-t)^(n-k) * t^(k)
return sum</code></pre>
<p>And now for the extremely optimized versions:</p>
<p>And now for the optimized versions:</p>
<pre><code>function Bezier(2,t,w[]):
t2 = t * t
mt = 1-t