diff --git a/docs/chapters/aligning/aligning.js b/docs/chapters/aligning/aligning.js index 6beca728..a11fe567 100644 --- a/docs/chapters/aligning/aligning.js +++ b/docs/chapters/aligning/aligning.js @@ -15,6 +15,7 @@ draw() { translate(this.width/2, 0); line(0,0,0,this.height); + // draw the realigned curve: this.drawRTCurve( this.rotatePoints( this.translatePoints( @@ -25,7 +26,7 @@ draw() { } translatePoints(points) { - // translate to (0,0) + // translate so that the curve starts at (0,0) let m = points[0]; return points.map(v => { return { @@ -36,7 +37,7 @@ translatePoints(points) { } rotatePoints(points) { - // rotate so that last point is (...,0) + // rotate the curve so that the point is (...,0) let degree = curve.points.length - 1; let dx = points[degree].x; let dy = points[degree].y; @@ -50,13 +51,18 @@ rotatePoints(points) { } drawRTCurve(points) { - let degree = curve.points.length - 1; - let ncurve = new Bezier(this, points); + // draw axes translate(60, this.height/2); setStroke(`grey`); - line(0,-this.height,0,this.height); - line(-60,0,this.width,0); + line(0, -this.height, 0, this.height); + line(-60, 0, this.width, 0); + + // draw transformed curve + let degree = curve.points.length - 1; + let ncurve = new Bezier(this, points); ncurve.drawCurve(); + + // and label the last point in the transformed curve setFill(`black`); text(`(0,0)`, 5,15); text(`(${points[degree].x|0},0)`, points[degree].x, -5, CENTER); diff --git a/docs/chapters/aligning/content.en-GB.md b/docs/chapters/aligning/content.en-GB.md index 8c1ac60c..58abcc37 100644 --- a/docs/chapters/aligning/content.en-GB.md +++ b/docs/chapters/aligning/content.en-GB.md @@ -40,7 +40,8 @@ If we drop all the zero-terms, this gives us: We can see that our original curve definition has been simplified considerably. The following graphics illustrate the result of aligning our example curves to the x-axis, with the cubic case using the coordinates that were just used in the example formulae: -
+ +  + -
diff --git a/docs/chapters/arclength/arclength.js b/docs/chapters/arclength/arclength.js index 2d6fd664..d12e40e4 100644 --- a/docs/chapters/arclength/arclength.js +++ b/docs/chapters/arclength/arclength.js @@ -1,57 +1,4 @@ -const Tvalues24 = [ - -0.0640568928626056260850430826247450385909, - 0.0640568928626056260850430826247450385909, - -0.1911188674736163091586398207570696318404, - 0.1911188674736163091586398207570696318404, - -0.3150426796961633743867932913198102407864, - 0.3150426796961633743867932913198102407864, - -0.4337935076260451384870842319133497124524, - 0.4337935076260451384870842319133497124524, - -0.5454214713888395356583756172183723700107, - 0.5454214713888395356583756172183723700107, - -0.6480936519369755692524957869107476266696, - 0.6480936519369755692524957869107476266696, - -0.7401241915785543642438281030999784255232, - 0.7401241915785543642438281030999784255232, - -0.8200019859739029219539498726697452080761, - 0.8200019859739029219539498726697452080761, - -0.8864155270044010342131543419821967550873, - 0.8864155270044010342131543419821967550873, - -0.9382745520027327585236490017087214496548, - 0.9382745520027327585236490017087214496548, - -0.9747285559713094981983919930081690617411, - 0.9747285559713094981983919930081690617411, - -0.9951872199970213601799974097007368118745, - 0.9951872199970213601799974097007368118745, -]; - -const Cvalues24 = [ - 0.1279381953467521569740561652246953718517, - 0.1279381953467521569740561652246953718517, - 0.1258374563468282961213753825111836887264, - 0.1258374563468282961213753825111836887264, - 0.121670472927803391204463153476262425607, - 0.121670472927803391204463153476262425607, - 0.1155056680537256013533444839067835598622, - 0.1155056680537256013533444839067835598622, - 0.1074442701159656347825773424466062227946, - 0.1074442701159656347825773424466062227946, - 0.0976186521041138882698806644642471544279, - 0.0976186521041138882698806644642471544279, - 0.086190161531953275917185202983742667185, - 0.086190161531953275917185202983742667185, - 0.0733464814110803057340336152531165181193, - 0.0733464814110803057340336152531165181193, - 0.0592985849154367807463677585001085845412, - 0.0592985849154367807463677585001085845412, - 0.0442774388174198061686027482113382288593, - 0.0442774388174198061686027482113382288593, - 0.0285313886289336631813078159518782864491, - 0.0285313886289336631813078159518782864491, - 0.0123412297999871995468056670700372915759, - 0.0123412297999871995468056670700372915759, -]; - +import { C, T } from "./ct-values.js"; setup() { this.curve = Bezier.defaultCubic(this); @@ -71,14 +18,11 @@ draw() { } computeLength(curve) { - const z = 0.5, - len = Tvalues24.length; - + const z = 0.5, len = T.length; let sum = 0; - for (let i = 0, t; i < len; i++) { - t = z * Tvalues24[i] + z; - sum += Cvalues24[i] * this.arcfn(t, curve.derivative(t)); + t = z * T[i] + z; + sum += C[i] * this.arcfn(t, curve.derivative(t)); } return z * sum; } diff --git a/docs/chapters/arclength/ct-values.js b/docs/chapters/arclength/ct-values.js new file mode 100644 index 00000000..04ce1927 --- /dev/null +++ b/docs/chapters/arclength/ct-values.js @@ -0,0 +1,55 @@ +const T = [ + -0.0640568928626056260850430826247450385909, + 0.0640568928626056260850430826247450385909, + -0.1911188674736163091586398207570696318404, + 0.1911188674736163091586398207570696318404, + -0.3150426796961633743867932913198102407864, + 0.3150426796961633743867932913198102407864, + -0.4337935076260451384870842319133497124524, + 0.4337935076260451384870842319133497124524, + -0.5454214713888395356583756172183723700107, + 0.5454214713888395356583756172183723700107, + -0.6480936519369755692524957869107476266696, + 0.6480936519369755692524957869107476266696, + -0.7401241915785543642438281030999784255232, + 0.7401241915785543642438281030999784255232, + -0.8200019859739029219539498726697452080761, + 0.8200019859739029219539498726697452080761, + -0.8864155270044010342131543419821967550873, + 0.8864155270044010342131543419821967550873, + -0.9382745520027327585236490017087214496548, + 0.9382745520027327585236490017087214496548, + -0.9747285559713094981983919930081690617411, + 0.9747285559713094981983919930081690617411, + -0.9951872199970213601799974097007368118745, + 0.9951872199970213601799974097007368118745, +]; + +const C = [ + 0.1279381953467521569740561652246953718517, + 0.1279381953467521569740561652246953718517, + 0.1258374563468282961213753825111836887264, + 0.1258374563468282961213753825111836887264, + 0.121670472927803391204463153476262425607, + 0.121670472927803391204463153476262425607, + 0.1155056680537256013533444839067835598622, + 0.1155056680537256013533444839067835598622, + 0.1074442701159656347825773424466062227946, + 0.1074442701159656347825773424466062227946, + 0.0976186521041138882698806644642471544279, + 0.0976186521041138882698806644642471544279, + 0.086190161531953275917185202983742667185, + 0.086190161531953275917185202983742667185, + 0.0733464814110803057340336152531165181193, + 0.0733464814110803057340336152531165181193, + 0.0592985849154367807463677585001085845412, + 0.0592985849154367807463677585001085845412, + 0.0442774388174198061686027482113382288593, + 0.0442774388174198061686027482113382288593, + 0.0285313886289336631813078159518782864491, + 0.0285313886289336631813078159518782864491, + 0.0123412297999871995468056670700372915759, + 0.0123412297999871995468056670700372915759, +]; + +export { C, T } diff --git a/docs/chapters/arclengthapprox/approximate.js b/docs/chapters/arclengthapprox/approximate.js index 0516f958..1f977216 100644 --- a/docs/chapters/arclengthapprox/approximate.js +++ b/docs/chapters/arclengthapprox/approximate.js @@ -16,6 +16,9 @@ draw() { setStroke("red"); curve.drawSkeleton(`lightblue`); + + // instead of running an arclength summation, we + // just... sum the lengths of our line segments. LUT.forEach((p1,i) => { if (i===0) return; let p0 = LUT[i-1]; diff --git a/docs/chapters/boundingbox/bbox.js b/docs/chapters/boundingbox/bbox.js index e47d084b..64002dea 100644 --- a/docs/chapters/boundingbox/bbox.js +++ b/docs/chapters/boundingbox/bbox.js @@ -18,6 +18,9 @@ draw() { curve.drawCurve(); curve.drawPoints(); + // Start with complete nonsense min/max values, where + // min is huge and max is tiny, so we can bring them + // down and up, respectively. let minx = Number.MAX_SAFE_INTEGER, miny = minx, @@ -28,6 +31,7 @@ draw() { noFill(); setStroke(`red`); + // For each extremum, see if that changes the bbox values. [0, ...extrema.x, ...extrema.y, 1].forEach(t => { let p = curve.get(t); if (p.x < minx) minx = p.x; @@ -37,6 +41,7 @@ draw() { if (t > 0 && t< 1) circle(p.x, p.y, 3); }); + // And we're done. setStroke(`#0F0`); rect(minx, miny, maxx - minx, maxy - miny); } diff --git a/docs/chapters/components/components.js b/docs/chapters/components/components.js index fefeeb5c..d2df38bf 100644 --- a/docs/chapters/components/components.js +++ b/docs/chapters/components/components.js @@ -1,6 +1,8 @@ let curve; setup() { + setPanelCount(3); + let type = this.parameters.type ?? `quadratic`; if (type === `quadratic`) { curve = Bezier.defaultQuadratic(this); @@ -14,11 +16,21 @@ setup() { draw() { clear(); const dim = this.height; + let pcount = curve.points.length; curve.drawSkeleton(); curve.drawCurve(); curve.drawPoints(); - translate(dim, 0); + nextPanel(); + this.drawComponentX(dim, pcount); + + resetTransform(); + nextPanel(); + nextPanel(); + this.drawComponentY(dim, pcount); +} + +drawComponentX(dim, pcount) { setStroke(`black`); line(0,0,0,dim); @@ -26,14 +38,15 @@ draw() { translate(40,20); drawAxes(`t`, 0, 1, `X`, 0, dim, dim, dim); - let pcount = curve.points.length; + // remap our curve so that y becomes our x + // coordinates, and x becomes the t intervals. new Bezier(this, curve.points.map((p,i) => ({ x: (i/(pcount-1)) * dim, y: p.x }))).drawCurve(); +} - resetTransform(); - translate(2*dim, 0); +drawComponentY(dim, pcount) { setStroke(`black`); line(0,0,0,dim); @@ -41,6 +54,8 @@ draw() { translate(40,20); drawAxes(`t`, 0,1, `Y`, 0, dim, dim, dim); + // remap our curve, leaving y as is, but + // making x be the t intervals. new Bezier(this, curve.points.map((p,i) => ({ x: (i/(pcount-1)) * dim, y: p.y diff --git a/docs/chapters/components/content.en-GB.md b/docs/chapters/components/content.en-GB.md index 1cc4773b..a3be7f07 100644 --- a/docs/chapters/components/content.en-GB.md +++ b/docs/chapters/components/content.en-GB.md @@ -10,4 +10,6 @@ If you move points in a curve sideways, you should only see the middle graph cha +  + diff --git a/docs/chapters/curvature/curvature.js b/docs/chapters/curvature/curvature.js index 1b165c43..6b892d66 100644 --- a/docs/chapters/curvature/curvature.js +++ b/docs/chapters/curvature/curvature.js @@ -19,6 +19,8 @@ draw() { curve.drawPoints(); }); + // For the "both directions" version, we also want + // to show the circle that fits our curve. if (this.parameters.omni) { let t = this.position; let curve = q; @@ -30,14 +32,16 @@ draw() { drawCurvature(curve) { let s, t, p, n, k, ox, oy; for(s=0; s<256; s++) { - setStroke(`rgba(255,127,${s},0.6)`); + // compute the curvature at `t`: t = s/255; p = curve.get(t); n = curve.normal(t); k = this.computeCurvature(curve, t) * 10000; + // and then draw it. ox = k * n.x; oy = k * n.y; + setStroke(`rgba(255,127,${s},0.6)`); line(p.x, p.y, p.x + ox, p.y + oy); // And if requested, also draw it along the anti-normal. @@ -55,6 +59,7 @@ computeCurvature(curve, t) { qdsum = d.x * d.x + d.y * d.y, dnm = qdsum ** 3/2; + // shortcut if (num === 0 || dnm === 0) return 0; return num / dnm; @@ -70,7 +75,6 @@ drawIncidentCircle(curve, t) { setFill(`rgba(200,200,255,0.4)`); setStroke(`red`); - line(p.x, p.y, rx, ry); circle(p.x, p.y, 3); circle(rx, ry, 3); diff --git a/docs/chapters/extremities/extremities.js b/docs/chapters/extremities/extremities.js index 697945e3..3dfcf51f 100644 --- a/docs/chapters/extremities/extremities.js +++ b/docs/chapters/extremities/extremities.js @@ -1,6 +1,7 @@ let curve; setup() { + setPanelCount(3); const type = this.parameters.type ?? `quadratic`; if (type === `quadratic`) { curve = Bezier.defaultQuadratic(this); @@ -19,7 +20,19 @@ draw() { curve.drawCurve(); curve.drawPoints(); - translate(dim, 0); + nextPanel(); + + this.drawComponentX(dim, degree); + + resetTransform(); + nextPanel(); + nextPanel(); + + this.drawComponentY(dim, degree); +} + + +drawComponentX(dim, degree) { setStroke(`black`); line(0,0,0,dim); @@ -27,13 +40,16 @@ draw() { translate(40,20); drawAxes(`t`, 0, 1, `X`, 0, dim, dim, dim); - this.plotDimension(dim, new Bezier(this, curve.points.map((p,i) => ({ + const B = new Bezier(this, curve.points.map((p,i) => ({ x: (i/degree) * dim, y: p.x - })))); + }))); - resetTransform(); - translate(2*dim, 0); + // this is where things differ from the previous section + this.plotDimension(dim, B); +} + +drawComponentY(dim, degree) { setStroke(`black`); line(0,0,0,dim); @@ -41,10 +57,13 @@ draw() { translate(40,20); drawAxes(`t`, 0,1, `Y`, 0, dim, dim, dim); - this.plotDimension(dim, new Bezier(this, curve.points.map((p,i) => ({ - x: (i/degree) * dim, - y: p.y - })))) + const B = new Bezier(this, curve.points.map((p,i) => ({ + x: (i/degree) * dim, + y: p.y + }))); + + // this is where things differ from the previous section + this.plotDimension(dim, B) } plotDimension(dim, dimension) { @@ -144,18 +163,27 @@ plotCubicDimension(t1, y1, t2, y2, dim, dimension, reverse) { } getRoots(v1, v2, v3) { - if (v3 === undefined) { - return [-v1 / (v2 - v1)]; - } + // is this actually a line? + if (v3 === undefined) return [-v1 / (v2 - v1)]; - const a = v1 - 2*v2 + v3, - b = 2 * (v2 - v1), - c = v1, - d = b*b - 4*a*c; + // quadratic root finding is not super complex. + const a = v1 - 2*v2 + v3; + + // no root: if (a === 0) return []; + + const b = 2 * (v2 - v1), + c = v1, + d = b*b - 4*a*c; + + // no root: if (d < 0) return []; + + // one root: const f = -b / (2*a); if (d === 0) return [f] + + // two roots: const l = sqrt(d) / (2*a); return [f-l, f+l]; } diff --git a/docs/chapters/inflections/inflection.js b/docs/chapters/inflections/inflection.js index c663b651..09b97d66 100644 --- a/docs/chapters/inflections/inflection.js +++ b/docs/chapters/inflections/inflection.js @@ -12,6 +12,7 @@ draw() { curve.drawCurve(); curve.drawPoints(); + // align our curve and let's do some root finding const p = curve.align().points, a = p[2].x * p[1].y, @@ -25,8 +26,11 @@ draw() { roots = []; - if (this.almost(x, 0) ) { - if (!this.almost(y, 0) ) { + // because of floating point maths, we can't check whether + // x or y "are" zero, because they could be some value that is + // just off from zero due to floating point compound errors. + if (approx(x, 0)) { + if (!approx(y, 0)) { roots.push(-z / y); } } @@ -36,15 +40,14 @@ draw() { sq = sqrt(det), d2 = 2 * x; - if (!this.almost(d2, 0) ) { + if (!approx(d2, 0) ) { roots.push(-(y+sq) / d2); roots.push((sq-y) / d2); } } - setStroke(`red`); - setFill(`red`); - + // Aaaan let's draw them + setColor(`red`); roots.forEach(t => { if (0 <= t && t <= 1) { let p = curve.get(t); @@ -53,7 +56,3 @@ draw() { } }); } - -almost(v1, v2, epsilon=0.00001) { - return abs(v1 - v2) < epsilon; -} diff --git a/docs/chapters/pointvectors/content.en-GB.md b/docs/chapters/pointvectors/content.en-GB.md index 2de13911..a3383299 100644 --- a/docs/chapters/pointvectors/content.en-GB.md +++ b/docs/chapters/pointvectors/content.en-GB.md @@ -3,36 +3,37 @@ If you want to move objects along a curve, or "away from" a curve, the two vectors you're most interested in are the tangent vector and normal vector for curve points. These are actually really easy to find. For moving and orienting along a curve, we use the tangent, which indicates the direction of travel at specific points, and is literally just the first derivative of our curve: \[ -\left \{ \begin{matrix} +\begin{matrix} tangent_x(t) = B'_x(t) \\ + \\ tangent_y(t) = B'_y(t) -\end{matrix} \right. +\end{matrix} \] This gives us the directional vector we want. We can normalize it to give us uniform directional vectors (having a length of 1.0) at each point, and then do whatever it is we want to do based on those directions: \[ - d = || tangent(t) || = \sqrt{B'_x(t)^2 + B'_y(t)^2} -\] - -\[ -\left \{ \begin{matrix} - \hat{x}(t) = || tangent_x(t) || - =\frac{tangent_x(t)}{ || tangent(t) || } +\begin{matrix} + d = \left \| tangent(t) \right \| = \sqrt{B'_x(t)^2 + B'_y(t)^2} \\ + \\ + \hat{x}(t) = \left \| tangent_x(t) \right \| + =\frac{tangent_x(t)}{ \left \| tangent(t) \right \| } = \frac{B'_x(t)}{d} \\ - \hat{y}(t) = || tangent_y(t) || - = \frac{tangent_y(t)}{ || tangent(t) || } + \\ + \hat{y}(t) = \left \| tangent_y(t) \right \| + = \frac{tangent_y(t)}{ \left \| tangent(t) \right \| } = \frac{B'_y(t)}{d} -\end{matrix} \right. +\end{matrix} \] The tangent is very useful for moving along a line, but what if we want to move away from the curve instead, perpendicular to the curve at some point t? In that case we want the *normal* vector. This vector runs at a right angle to the direction of the curve, and is typically of length 1.0, so all we have to do is rotate the normalized directional vector and we're done: \[ -\left \{ \begin{array}{l} +\begin{array}{l} normal_x(t) = \hat{x}(t) \cdot \cos{\frac{\pi}{2}} - \hat{y}(t) \cdot \sin{\frac{\pi}{2}} = - \hat{y}(t) \\ + \\ normal_y(t) = \underset{quarter\ circle\ rotation} {\underbrace{ \hat{x}(t) \cdot \sin{\frac{\pi}{2}} + \hat{y}(t) \cdot \cos{\frac{\pi}{2}} }} = \hat{x}(t) -\end{array} \right. +\end{array} \]
diff --git a/docs/chapters/pointvectors/pointvectors.js b/docs/chapters/pointvectors/pointvectors.js index f80499e8..b79e694f 100644 --- a/docs/chapters/pointvectors/pointvectors.js +++ b/docs/chapters/pointvectors/pointvectors.js @@ -6,6 +6,7 @@ setup() { curve = Bezier.defaultQuadratic(this); } else { curve = Bezier.defaultCubic(this); + // to show this off for Cubic curves we need to change some of the points curve.points[0].x = 30; curve.points[0].y = 230; curve.points[1].x = 75; @@ -25,24 +26,30 @@ draw() { let t = i/10.0; let p = curve.get(t); let d = this.type === `quadratic` ? this.getQuadraticDerivative(t, pts) : this.getCubicDerivative(t, pts); - - let m = sqrt(d.x*d.x + d.y*d.y); - d = { x: d.x/m, y: d.y/m }; - let n = this.getNormal(t, d); - - setStroke(`blue`); - line(p.x, p.y, p.x + d.x*f, p.y + d.y*f); - - setStroke(`red`); - line(p.x, p.y, p.x + n.x*f, p.y + n.y*f); - - setStroke(`black`); - circle(p.x, p.y, 3); + this.drawVectors(f, t, p, d); } curve.drawPoints(); } +drawVectors(f, t, p, d) { + let m = sqrt(d.x*d.x + d.y*d.y); + d = { x: d.x/m, y: d.y/m }; + let n = this.getNormal(t, d); + + // draw the tangent vector + setStroke(`blue`); + line(p.x, p.y, p.x + d.x*f, p.y + d.y*f); + + // draw the normal vector + setStroke(`red`); + line(p.x, p.y, p.x + n.x*f, p.y + n.y*f); + + // and the point these are for + setStroke(`black`); + circle(p.x, p.y, 3); +} + getQuadraticDerivative(t, points) { let mt = (1 - t), d = [ { diff --git a/docs/chapters/pointvectors3d/frenet.js b/docs/chapters/pointvectors3d/frenet.js index 61cb4805..9d5be112 100644 --- a/docs/chapters/pointvectors3d/frenet.js +++ b/docs/chapters/pointvectors3d/frenet.js @@ -4,6 +4,7 @@ import { project, projectXY, projectXZ, projectYZ } from "./projection.js"; let d, cube; setup() { + // step 1: let's define a cube to show our curve "in" d = this.width/2 + 25; cube = [ {x:0, y:0, z:0}, @@ -15,16 +16,25 @@ setup() { {x:d, y:d, z:d}, {x:0, y:d, z:d} ].map(p => project(p)); + + // step 2: let's also define our 3D curve const points = this.points = [ {x:120, y: 0, z: 0}, {x:120, y:220, z: 0}, {x: 30, y: 0, z: 30}, {x: 0, y: 0, z:200} ]; + + // step 3: to draw this curve to the screen, we need to project the + // coordinates from 3D to 2D, for which we use what is called + // a "cabinet projection". this.curve = new Bezier(this, points.map(p => project(p))); + + // We also construct handy projections on just the X/Y, X/Z, and Y/Z planes. this.cxy = new Bezier(this, points.map(p => projectXY(p))); this.cxz = new Bezier(this, points.map(p => projectXZ(p))); this.cyz = new Bezier(this, points.map(p => projectYZ(p))); + setSlider(`.slide-control`, `position`, 0); } @@ -33,21 +43,32 @@ draw() { translate(this.width/2 - 60, this.height/2 + 75); const curve = this.curve; + // Draw all our planar curve projections first this.drawCurveProjections(); + // And the "back" side of our cube this.drawCubeBack(); + // Then, we draw the real curve curve.drawCurve(`grey`); setStroke(`grey`) line(curve.points[0].x, curve.points[0].y, curve.points[1].x, curve.points[1].y); line(curve.points[2].x, curve.points[2].y, curve.points[3].x, curve.points[3].y); curve.points.forEach(p => circle(p.x, p.y, 2)); + // And the current point on that curve this.drawPoint(this.position); + // and then we can add the "front" of the cube. this.drawCubeFront(); } +drawCurveProjections() { + this.cxy.drawCurve(`#EEF`); + this.cxz.drawCurve(`#EEF`); + this.cyz.drawCurve(`#EEF`); +} + drawCubeBack() { const c = cube; @@ -64,12 +85,6 @@ drawCubeBack() { line(c[0].x, c[0].y, c[4].x, c[4].y); } -drawCurveProjections() { - this.cxy.drawCurve(`#EEF`); - this.cxz.drawCurve(`#EEF`); - this.cyz.drawCurve(`#EEF`); -} - drawPoint(t) { const {o, r, n, dt} = this.getFrenetVectors(t, this.points); @@ -78,8 +93,13 @@ drawPoint(t) { const p = project(o); circle(p.x, p.y, 3); + // Draw our axis of rotation, this.drawVector(p, vec.normalize(r), 40, `blue`, `r`); + + // our normal, this.drawVector(p, vec.normalize(n), 40, `red`, `n`); + + // and our derivative. this.drawVector(p, vec.normalize(dt), 40, `green`, `t′`); setFill(`black`) @@ -88,8 +108,6 @@ drawPoint(t) { drawCubeFront() { const c = cube; - - // rest of the cube setStroke("lightgrey"); line(c[1].x, c[1].y, c[2].x, c[2].y); line(c[2].x, c[2].y, c[3].x, c[3].y); @@ -103,13 +121,20 @@ drawCubeFront() { } getFrenetVectors(t, originalPoints) { + // The frenet vectors are based on the (unprojected) curve, + // and its derivative curve. const curve = new Bezier(this, originalPoints); const d1curve = new Bezier(this, curve.dpoints[0]); + const o = curve.get(t); const dt = d1curve.get(t); const ddt = d1curve.derivative(t); - const o = curve.get(t); - const b = vec.plus(dt, ddt); - const r = vec.cross(b, dt); + // project the derivative into the future + const f = vec.plus(dt, ddt); + // and then find the axis of rotation wrt the plane + // spanned by the currented and projected derivative + const r = vec.cross(f, dt); + // after which the normal is found by rotating the + // tangent in that plane. const n = vec.normalize(vec.cross(r, dt)); return { o, dt, r, n }; } diff --git a/docs/chapters/pointvectors3d/projection.js b/docs/chapters/pointvectors3d/projection.js index 3afd2305..7dbe7fd5 100644 --- a/docs/chapters/pointvectors3d/projection.js +++ b/docs/chapters/pointvectors3d/projection.js @@ -1,23 +1,25 @@ /** - * A cabinet projection utility + * A cabinet projection utility library */ -// Universal projector function +// Universal projector function: + function project(point3d, offset = { x: 0, y: 0 }, phi = -Math.PI / 6) { // what they rarely tell you: if you want Z to "go up", // X to "come out of the screen", and Y to be the "left/right", // we need to switch some coordinates around: - const x = point3d.y, - y = -point3d.z, - z = -point3d.x; + const a = point3d.y, + b = -point3d.z, + c = -point3d.x / 2; return { - x: offset.x + x + (z / 2) * Math.cos(phi), - y: offset.y + y + (z / 2) * Math.sin(phi), + x: offset.x + a + c * Math.cos(phi), + y: offset.y + b + c * Math.sin(phi), }; } -// and some rebuilt planar projectors +// and some planar projectors: + function projectXY(p, offset, phi) { return project({ x: p.x, y: p.y, z: 0 }, offset, phi); } @@ -30,6 +32,4 @@ function projectYZ(p, offset, phi) { return project({ x: 0, y: p.y, z: p.z }, offset, phi); } - -export { project, projectXY, projectXZ, projectYZ } - +export { project, projectXY, projectXZ, projectYZ }; diff --git a/docs/chapters/pointvectors3d/rotation-minimizing.js b/docs/chapters/pointvectors3d/rotation-minimizing.js index 5d59b7d9..86a646de 100644 --- a/docs/chapters/pointvectors3d/rotation-minimizing.js +++ b/docs/chapters/pointvectors3d/rotation-minimizing.js @@ -4,6 +4,7 @@ import { project, projectXY, projectXZ, projectYZ } from "./projection.js"; let d, cube; setup() { + // We have the same setup as for the previous graphic d = this.width/2 + 25; cube = [ {x:0, y:0, z:0}, @@ -71,6 +72,7 @@ drawCurveProjections() { } drawPoint(t) { + // The only thing different compared to the previous graphic is this call: const {o, r, n, dt } = this.getRMF(t, this.points); setStroke(`red`); @@ -102,75 +104,6 @@ drawCubeFront() { line(c[7].x, c[7].y, c[4].x, c[4].y); } -getRMF(t, originalPoints) { - const curve = new Bezier(this, originalPoints); - const d1curve = new Bezier(this, curve.dpoints[0]); - - if (!this.rmf_LUT) { - this.rmf_LUT = this.generateRMF(originalPoints, curve, d1curve); - } - - // find the frame for "t". - const last = this.rmf_LUT.length - 1; - const f = t * last; - const i = Math.floor(f); - - // intenger index, or last index: we're done. - if (f === i) return this.rmf_LUT[i]; - - // no integer index: interpolate based on the adjacent frames. - const j = i + 1, ti = i/last, tj = j/last, ratio = (t - ti) / (tj - ti); - return this.lerpFrames(ratio, this.rmf_LUT[i], this.rmf_LUT[j]); -} - -generateRMF(originalPoints, curve, d1curve) { - const frames = [] - frames.push(this.getFrenetVectors(0, originalPoints)); - - for(let i=0, steps=24; i frame[type] = vec.lerp(t, f1[type], f2[type])); - return frame; -} - drawVector(from, vec, length, color, label) { setStroke(color); setFill(`black`); @@ -189,3 +122,78 @@ drawVector(from, vec, length, color, label) { }); text(label, from.x + txt.x, from.y + txt.y); } + +// This is where things are... rather different + +getRMF(t, originalPoints) { + // If we don't have a rotation-minimizing lookup table, build it. + if (!this.rmf_LUT) { + const curve = new Bezier(this, originalPoints); + const d1curve = new Bezier(this, curve.dpoints[0]); + this.rmf_LUT = this.generateRMF(originalPoints, curve, d1curve); + } + + // find the frame for "t": + const last = this.rmf_LUT.length - 1; + const f = t * last; + const i = Math.floor(f); + + // If we're looking at an integer index, we're done. + if (f === i) return this.rmf_LUT[i]; + + // If we're not, we need to interpolate the adjacent frames + const j = i + 1, ti = i/last, tj = j/last, ratio = (t - ti) / (tj - ti); + return this.lerpFrames(ratio, this.rmf_LUT[i], this.rmf_LUT[j]); +} + +generateRMF(originalPoints, curve, d1curve) { + // Start with the frenet frame just before t=0 and shift it to t=0 + const first = this.getFrenetVectors(-0.001, originalPoints); + first.o = curve.get(0); + + // Then we construct each next rotation-minimizing fame by reflecting + // the previous frame and correcting the resulting vectors. + const frames = [first]; + for(let i=0, steps=24; i frame[type] = vec.lerp(t, f1[type], f2[type])); + return frame; +} diff --git a/docs/chapters/pointvectors3d/vector-lib.js b/docs/chapters/pointvectors3d/vector-lib.js index c7438630..bcf37800 100644 --- a/docs/chapters/pointvectors3d/vector-lib.js +++ b/docs/chapters/pointvectors3d/vector-lib.js @@ -1,71 +1,70 @@ function normalize(v) { - let z = v.z || 0; - var d = Math.sqrt(v.x*v.x + v.y*v.y + z*z); - let r = { x:v.x/d, y:v.y/d }; - if (v.z !== undefined) r.z = z/d; - return r; + let z = v.z || 0; + var d = Math.sqrt(v.x * v.x + v.y * v.y + z * z); + let r = { x: v.x / d, y: v.y / d }; + if (v.z !== undefined) r.z = z / d; + return r; } function dot(v1, v2) { - let z1 = v1.z || 0; - let z2 = v2.z || 0; - return v1.x * v2.x + v1.y * v2.y + z1 * z2; + let z1 = v1.z || 0; + let z2 = v2.z || 0; + return v1.x * v2.x + v1.y * v2.y + z1 * z2; } function scale(v, s) { - let r = { - x: s * v.x, - y: s * v.y - } - if (v.z !== undefined) { - r.z = s * v.z - } - return r; + let r = { + x: s * v.x, + y: s * v.y, + }; + if (v.z !== undefined) { + r.z = s * v.z; + } + return r; } function plus(v1, v2) { - let r = { - x: v1.x + v2.x, - y: v1.y + v2.y - }; - if (v1.z !== undefined || v2.z !== undefined) { - r.z = (v1.z||0) + (v2.z||0); - }; - return r; + let r = { + x: v1.x + v2.x, + y: v1.y + v2.y, + }; + if (v1.z !== undefined || v2.z !== undefined) { + r.z = (v1.z || 0) + (v2.z || 0); + } + return r; } function minus(v1, v2) { - let r = { - x: v1.x - v2.x, - y: v1.y - v2.y - }; - if (v1.z !== undefined || v2.z !== undefined) { - r.z = (v1.z||0) - (v2.z||0); - }; - return r; + let r = { + x: v1.x - v2.x, + y: v1.y - v2.y, + }; + if (v1.z !== undefined || v2.z !== undefined) { + r.z = (v1.z || 0) - (v2.z || 0); + } + return r; } function cross(v1, v2) { - if (v1.z === undefined || v2.z === undefined) { - throw new Error(`Cross product is not defined for 2D vectors.`); - } - return { - x: v1.y * v2.z - v1.z * v2.y, - y: v1.z * v2.x - v1.x * v2.z, - z: v1.x * v2.y - v1.y * v2.x - }; + if (v1.z === undefined || v2.z === undefined) { + throw new Error(`Cross product is not defined for 2D vectors.`); + } + return { + x: v1.y * v2.z - v1.z * v2.y, + y: v1.z * v2.x - v1.x * v2.z, + z: v1.x * v2.y - v1.y * v2.x, + }; } function lerp(t, v1, v2) { - let r = { - x: (1-t)*v1.x + t*v2.x, - y: (1-t)*v1.y + t*v2.y - }; - if (v1.z !== undefined || v2.z !== undefined) { - r.z = (1-t)*(v1.z||0) + t*(v2.z||0); - }; - return r; + let r = { + x: (1 - t) * v1.x + t * v2.x, + y: (1 - t) * v1.y + t * v2.y, + }; + if (v1.z !== undefined || v2.z !== undefined) { + r.z = (1 - t) * (v1.z || 0) + t * (v2.z || 0); + } + return r; } - -export default { normalize, dot, scale, plus, minus, cross, lerp } +export default { normalize, dot, scale, plus, minus, cross, lerp }; diff --git a/docs/chapters/reordering/reorder.js b/docs/chapters/reordering/reorder.js index 82e3102a..fc37dadf 100644 --- a/docs/chapters/reordering/reorder.js +++ b/docs/chapters/reordering/reorder.js @@ -1,17 +1,19 @@ let points = []; setup() { - const w = this.width, - h = this.height; - for (let i=0; i<10; i++) { - points.push({ - x: w/2 + random(20) + cos(PI*2 * i/10) * (w/2 - 40), - y: h/2 + random(20) + sin(PI*2 * i/10) * (h/2 - 40) - }); - } - setMovable(points); - this.bindButtons(); + const w = this.width, + h = this.height; + + // let's create a wiggle-circle by randomizing points on a circle + for (let i=0; i<10; i++) { + points.push({ + x: w/2 + random(20) + cos(PI*2 * i/10) * (w/2 - 40), + y: h/2 + random(20) + sin(PI*2 * i/10) * (h/2 - 40) + }); } + setMovable(points); + this.bindButtons(); +} bindButtons() { let rbutton = find(`.raise`); @@ -27,103 +29,105 @@ draw() { } drawCurve() { - // we can't "just draw" this curve, since it'll be an arbitrary order, - // And the canvas only does 2nd and 3rd - we use de Casteljau's algorithm: - start(); - noFill(); - setStroke(`black`); - for(let t=0; t<=1; t+=0.01) { - let q = JSON.parse(JSON.stringify(points)); - while(q.length > 1) { - for (let i=0; i 1) { + for (let i=0; i vertex(p.x, p.y)); - end(); + start(); + setStroke(`lightgrey`); + points.forEach(p => vertex(p.x, p.y)); + end(); - setStroke(`black`); - points.forEach(p => circle(p.x, p.y, 3)); + setStroke(`black`); + points.forEach(p => circle(p.x, p.y, 3)); } raise() { - const p = points, + const p = points, np = [p[0]], k = p.length; - for (let i = 1, pi, pim; i < k; i++) { - pi = p[i]; - pim = p[i - 1]; - np[i] = { - x: ((k - i) / k) * pi.x + (i / k) * pim.x, - y: ((k - i) / k) * pi.y + (i / k) * pim.y, - }; - } - np[k] = p[k - 1]; - points = np; - resetMovable(points); - redraw(); + // raising the order of a curve is lossless: + for (let i = 1, pi, pim; i < k; i++) { + pi = p[i]; + pim = p[i - 1]; + np[i] = { + x: ((k - i) / k) * pi.x + (i / k) * pim.x, + y: ((k - i) / k) * pi.y + (i / k) * pim.y, + }; + } + np[k] = p[k - 1]; + points = np; + + resetMovable(points); + redraw(); } lower() { - // Based on https://www.sirver.net/blog/2011/08/23/degree-reduction-of-bezier-curves/ + // Based on https://www.sirver.net/blog/2011/08/23/degree-reduction-of-bezier-curves/ - // TODO: FIXME: this is the same code as in the old codebase, - // and it does something odd to the either the - // first or last point... it starts to travel - // A LOT more than it looks like it should... O_o + // TODO: FIXME: this is the same code as in the old codebase, + // and it does something odd to the either the + // first or last point... it starts to travel + // A LOT more than it looks like it should... O_o - const p = points, - k = p.length, - data = [], - n = k-1; + const p = points, + k = p.length, + data = [], + n = k-1; - if (k <= 3) return; + if (k <= 3) return; - // build M, which will be (k) rows by (k-1) columns - for(let i=0; i [p.x])); - const nx = V.multiply(x); - const y = new Matrix(points.map(p => [p.y])); - const ny = V.multiply(y); + // And then we map our k-order list of coordinates + // to an n-order list of coordinates, instead: + const V = Mi.multiply(Mt); + const x = new Matrix(points.map(p => [p.x])); + const nx = V.multiply(x); + const y = new Matrix(points.map(p => [p.y])); + const ny = V.multiply(y); - points = nx.data.map((x,i) => ({ - x: x[0], - y: ny.data[i][0] - })); + points = nx.data.map((x,i) => ({ + x: x[0], + y: ny.data[i][0] + })); - resetMovable(points); - redraw(); + resetMovable(points); + redraw(); } diff --git a/docs/chapters/tightbounds/tightbounds.js b/docs/chapters/tightbounds/tightbounds.js index 46496607..235adb6e 100644 --- a/docs/chapters/tightbounds/tightbounds.js +++ b/docs/chapters/tightbounds/tightbounds.js @@ -12,11 +12,13 @@ draw() { curve.drawCurve(); curve.drawPoints(); + // Similar to aligning, we transform the curve first let translated = this.translatePoints(curve.points); let rotated = this.rotatePoints(translated); let rtcurve = new Bezier(this, rotated); let extrema = rtcurve.extrema(); + // and the we run the regular bounding box code let minx = Number.MAX_SAFE_INTEGER, miny = minx, maxx = Number.MIN_SAFE_INTEGER, @@ -37,6 +39,8 @@ draw() { noFill(); setStroke(`#0F0`); + // But, crucially, we now need to reverse-transform the bbox corners: + let tx = curve.points[0].x; let ty = curve.points[0].y; let a = rotated[0].a; diff --git a/docs/chapters/yforx/basics.js b/docs/chapters/yforx/basics.js index b6fee0ad..a3f1ee3f 100644 --- a/docs/chapters/yforx/basics.js +++ b/docs/chapters/yforx/basics.js @@ -1,6 +1,7 @@ let curve; setup() { + setPanelCount(2); curve = new Bezier(this, 20, 250, 30, 20, 200, 250, 220, 20); setMovable(curve.points); setSlider(`.slide-control`, `position`, 0.5); @@ -15,29 +16,27 @@ draw() { let w = this.height; let h = this.height; - let bbox = curve.bbox(); - let x = bbox.x.min + (bbox.x.max - bbox.x.min) * this.position; + // construct an `x` value based on our slider position + let x = bbox.x.min + (bbox.x.max - bbox.x.min) * this.position; if (bbox.x.min < x && x < bbox.x.max) { setStroke("red"); line(x,0,x,h); text(`x=${x | 0}`, x + 5, h - 30); } - translate(w, 0); - + // In the next panel, let's draw x = t(x) + nextPanel() setStroke("black"); line(0,0,0,h); - // draw x = t(x) line(0, h-20, w, h-20); text('0', 10, h-10); text('⅓', 10 + (w-10)/3, h-10); text('⅔', 10 + 2*(w-10)/3, h-10); text('1', w-10, h-10); let p, s = { x: 0, y: h - curve.get(0).x }; - for (let step = 0.02, t = step; t < 1 + step; t += step) { p = {x: t * w, y: h - curve.get(t).x }; line(s.x, s.y, p.x, p.y); @@ -48,6 +47,7 @@ draw() { text("↑\nx", 10, h/2); text("t →", w/2, h-10); + // and its "intercept" line if (bbox.x.min < x && x < bbox.x.max) { setStroke("red"); line(0, h-x, w, h-x); diff --git a/docs/chapters/yforx/yforx.js b/docs/chapters/yforx/yforx.js index 2451046a..89dbc081 100644 --- a/docs/chapters/yforx/yforx.js +++ b/docs/chapters/yforx/yforx.js @@ -28,6 +28,7 @@ draw() { // find our answer: let y = round(curve.get(t).y); + // and draw everything setStroke("red"); line(x, y, x, h); line(x, y, 0, y); diff --git a/docs/images/chapters/abc/059000c5c8a37dcc8d7fa04154a05df3.svg b/docs/images/chapters/abc/059000c5c8a37dcc8d7fa04154a05df3.svg index 0b65462e..2b29c549 100644 --- a/docs/images/chapters/abc/059000c5c8a37dcc8d7fa04154a05df3.svg +++ b/docs/images/chapters/abc/059000c5c8a37dcc8d7fa04154a05df3.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/abc/12aaf0d7fd20b3c551a0ec76b18bd7d2.svg b/docs/images/chapters/abc/12aaf0d7fd20b3c551a0ec76b18bd7d2.svg index f2e31787..9986e8a4 100644 --- a/docs/images/chapters/abc/12aaf0d7fd20b3c551a0ec76b18bd7d2.svg +++ b/docs/images/chapters/abc/12aaf0d7fd20b3c551a0ec76b18bd7d2.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/abc/385d1fd4aecbd2066e6e284a84408be6.svg b/docs/images/chapters/abc/385d1fd4aecbd2066e6e284a84408be6.svg index b1b10de4..ae19e8b3 100644 --- a/docs/images/chapters/abc/385d1fd4aecbd2066e6e284a84408be6.svg +++ b/docs/images/chapters/abc/385d1fd4aecbd2066e6e284a84408be6.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/abc/3c696e0364d61b1391695342707d6ccc.svg b/docs/images/chapters/abc/3c696e0364d61b1391695342707d6ccc.svg index c92d0726..f62ce798 100644 --- a/docs/images/chapters/abc/3c696e0364d61b1391695342707d6ccc.svg +++ b/docs/images/chapters/abc/3c696e0364d61b1391695342707d6ccc.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/abc/5484dc53e408a4259891a65212ef8636.svg b/docs/images/chapters/abc/5484dc53e408a4259891a65212ef8636.svg index ef28accf..b18b4e71 100644 --- a/docs/images/chapters/abc/5484dc53e408a4259891a65212ef8636.svg +++ b/docs/images/chapters/abc/5484dc53e408a4259891a65212ef8636.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/abc/63fbe4e666a7dad985ec4110e17c249f.svg b/docs/images/chapters/abc/63fbe4e666a7dad985ec4110e17c249f.svg index 987ba4f5..baeafda5 100644 --- a/docs/images/chapters/abc/63fbe4e666a7dad985ec4110e17c249f.svg +++ b/docs/images/chapters/abc/63fbe4e666a7dad985ec4110e17c249f.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/abc/b4987e9b77b0df604238b88596c5f7c3.svg b/docs/images/chapters/abc/b4987e9b77b0df604238b88596c5f7c3.svg index a07bd242..4b509763 100644 --- a/docs/images/chapters/abc/b4987e9b77b0df604238b88596c5f7c3.svg +++ b/docs/images/chapters/abc/b4987e9b77b0df604238b88596c5f7c3.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/abc/bc245327e0b011712168bad1c48dfec4.svg b/docs/images/chapters/abc/bc245327e0b011712168bad1c48dfec4.svg index f2d98e6c..6fdc4f8d 100644 --- a/docs/images/chapters/abc/bc245327e0b011712168bad1c48dfec4.svg +++ b/docs/images/chapters/abc/bc245327e0b011712168bad1c48dfec4.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/abc/cd2e47cdc2e23ec86cd1ca1cb4286645.svg b/docs/images/chapters/abc/cd2e47cdc2e23ec86cd1ca1cb4286645.svg index 74393c28..35babc51 100644 --- a/docs/images/chapters/abc/cd2e47cdc2e23ec86cd1ca1cb4286645.svg +++ b/docs/images/chapters/abc/cd2e47cdc2e23ec86cd1ca1cb4286645.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/aligning/b3ccd45a72c815388aee6515fe37a486.png b/docs/images/chapters/aligning/28cc0f129fa0c028a1addd702e99f162.png similarity index 100% rename from docs/images/chapters/aligning/b3ccd45a72c815388aee6515fe37a486.png rename to docs/images/chapters/aligning/28cc0f129fa0c028a1addd702e99f162.png diff --git a/docs/images/chapters/aligning/50679d61424222d7b6b97eb3aa663582.svg b/docs/images/chapters/aligning/50679d61424222d7b6b97eb3aa663582.svg index 7470d0d6..95f3afa3 100644 --- a/docs/images/chapters/aligning/50679d61424222d7b6b97eb3aa663582.svg +++ b/docs/images/chapters/aligning/50679d61424222d7b6b97eb3aa663582.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/aligning/31655f24b7dd8b8871687b6610d9ac0e.png b/docs/images/chapters/aligning/9a6755a1e31a990e8f072a6da98f811a.png similarity index 100% rename from docs/images/chapters/aligning/31655f24b7dd8b8871687b6610d9ac0e.png rename to docs/images/chapters/aligning/9a6755a1e31a990e8f072a6da98f811a.png diff --git a/docs/images/chapters/aligning/a9af1c06a00bb3c4af816a138fb0a66d.svg b/docs/images/chapters/aligning/a9af1c06a00bb3c4af816a138fb0a66d.svg index 8cdd1f86..bf215b97 100644 --- a/docs/images/chapters/aligning/a9af1c06a00bb3c4af816a138fb0a66d.svg +++ b/docs/images/chapters/aligning/a9af1c06a00bb3c4af816a138fb0a66d.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/aligning/c78b203ff33e5c1606728b552505d61c.svg b/docs/images/chapters/aligning/c78b203ff33e5c1606728b552505d61c.svg index b69dd310..3bd94cfc 100644 --- a/docs/images/chapters/aligning/c78b203ff33e5c1606728b552505d61c.svg +++ b/docs/images/chapters/aligning/c78b203ff33e5c1606728b552505d61c.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/aligning/d480a9aa41917e5230d432cdbd6899b1.svg b/docs/images/chapters/aligning/d480a9aa41917e5230d432cdbd6899b1.svg index 58ddd04c..848ef7d6 100644 --- a/docs/images/chapters/aligning/d480a9aa41917e5230d432cdbd6899b1.svg +++ b/docs/images/chapters/aligning/d480a9aa41917e5230d432cdbd6899b1.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/arclength/5509919419288129322cfbd4c60d0a4f.svg b/docs/images/chapters/arclength/5509919419288129322cfbd4c60d0a4f.svg index 38ef5597..5b9d950c 100644 --- a/docs/images/chapters/arclength/5509919419288129322cfbd4c60d0a4f.svg +++ b/docs/images/chapters/arclength/5509919419288129322cfbd4c60d0a4f.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/arclength/56533f47e73ad9fea08fa9bb3f597d49.png b/docs/images/chapters/arclength/56533f47e73ad9fea08fa9bb3f597d49.png index a1586887..49ff93c2 100644 Binary files a/docs/images/chapters/arclength/56533f47e73ad9fea08fa9bb3f597d49.png and b/docs/images/chapters/arclength/56533f47e73ad9fea08fa9bb3f597d49.png differ diff --git a/docs/images/chapters/arclength/5ce02cbdbc47585c588f2656d5161a32.png b/docs/images/chapters/arclength/5ce02cbdbc47585c588f2656d5161a32.png index 411514d2..585d0296 100644 Binary files a/docs/images/chapters/arclength/5ce02cbdbc47585c588f2656d5161a32.png and b/docs/images/chapters/arclength/5ce02cbdbc47585c588f2656d5161a32.png differ diff --git a/docs/images/chapters/arclength/cb24cda7f7f4bbf3be7104c460e0ec9f.svg b/docs/images/chapters/arclength/cb24cda7f7f4bbf3be7104c460e0ec9f.svg index 609f6370..9512d2e6 100644 --- a/docs/images/chapters/arclength/cb24cda7f7f4bbf3be7104c460e0ec9f.svg +++ b/docs/images/chapters/arclength/cb24cda7f7f4bbf3be7104c460e0ec9f.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/arclength/d0d93f1cc26b560309dade1f1aa012f2.svg b/docs/images/chapters/arclength/d0d93f1cc26b560309dade1f1aa012f2.svg index 0e2bef64..5559c6fc 100644 --- a/docs/images/chapters/arclength/d0d93f1cc26b560309dade1f1aa012f2.svg +++ b/docs/images/chapters/arclength/d0d93f1cc26b560309dade1f1aa012f2.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/arclength/d3003177813309f88f58a1f515f5df9f.svg b/docs/images/chapters/arclength/d3003177813309f88f58a1f515f5df9f.svg index 1ac2d5e3..2b847055 100644 --- a/docs/images/chapters/arclength/d3003177813309f88f58a1f515f5df9f.svg +++ b/docs/images/chapters/arclength/d3003177813309f88f58a1f515f5df9f.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/arclength/e168758d35b8f6781617eda5a32b20bf.svg b/docs/images/chapters/arclength/e168758d35b8f6781617eda5a32b20bf.svg index 675d15f5..31f5eed9 100644 --- a/docs/images/chapters/arclength/e168758d35b8f6781617eda5a32b20bf.svg +++ b/docs/images/chapters/arclength/e168758d35b8f6781617eda5a32b20bf.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/arclength/e96dd431f6ef9433ccf25909dddd5bca.svg b/docs/images/chapters/arclength/e96dd431f6ef9433ccf25909dddd5bca.svg index a6dc8a62..b27e27e6 100644 --- a/docs/images/chapters/arclength/e96dd431f6ef9433ccf25909dddd5bca.svg +++ b/docs/images/chapters/arclength/e96dd431f6ef9433ccf25909dddd5bca.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/arclength/195f9a3c60f8dfe977c6450d21968f69.png b/docs/images/chapters/arclength/fa4c587126e8097206b88d9ea51974ca.png similarity index 100% rename from docs/images/chapters/arclength/195f9a3c60f8dfe977c6450d21968f69.png rename to docs/images/chapters/arclength/fa4c587126e8097206b88d9ea51974ca.png diff --git a/docs/images/chapters/arclength/fe2663b205d14c157a5a02bfbbd55987.png b/docs/images/chapters/arclength/fe2663b205d14c157a5a02bfbbd55987.png index 54c76271..6190a5af 100644 Binary files a/docs/images/chapters/arclength/fe2663b205d14c157a5a02bfbbd55987.png and b/docs/images/chapters/arclength/fe2663b205d14c157a5a02bfbbd55987.png differ diff --git a/docs/images/chapters/arclengthapprox/a040f6b7c7c33ada25ecfd1060726545.png b/docs/images/chapters/arclengthapprox/3fc083ea7bdcc6b021560f2f2491f8aa.png similarity index 100% rename from docs/images/chapters/arclengthapprox/a040f6b7c7c33ada25ecfd1060726545.png rename to docs/images/chapters/arclengthapprox/3fc083ea7bdcc6b021560f2f2491f8aa.png diff --git a/docs/images/chapters/arclengthapprox/c270144cc41e4ebc4b0b2331473530fa.png b/docs/images/chapters/arclengthapprox/537260c4aa9e98ffdea7c8120afbd427.png similarity index 100% rename from docs/images/chapters/arclengthapprox/c270144cc41e4ebc4b0b2331473530fa.png rename to docs/images/chapters/arclengthapprox/537260c4aa9e98ffdea7c8120afbd427.png diff --git a/docs/images/chapters/boundingbox/e2c621442e98e2cd20af7efe1cfb041f.png b/docs/images/chapters/boundingbox/12ec4a5039de2e2cc06611db5e826282.png similarity index 100% rename from docs/images/chapters/boundingbox/e2c621442e98e2cd20af7efe1cfb041f.png rename to docs/images/chapters/boundingbox/12ec4a5039de2e2cc06611db5e826282.png diff --git a/docs/images/chapters/boundingbox/f8989a62ebec9d6f123291c146caab5b.png b/docs/images/chapters/boundingbox/daad01218ba430e2355d151811aa971b.png similarity index 100% rename from docs/images/chapters/boundingbox/f8989a62ebec9d6f123291c146caab5b.png rename to docs/images/chapters/boundingbox/daad01218ba430e2355d151811aa971b.png diff --git a/docs/images/chapters/bsplines/0f3451c711c0fe5d0b018aa4aa77d855.svg b/docs/images/chapters/bsplines/0f3451c711c0fe5d0b018aa4aa77d855.svg index 3d89be81..634d7727 100644 --- a/docs/images/chapters/bsplines/0f3451c711c0fe5d0b018aa4aa77d855.svg +++ b/docs/images/chapters/bsplines/0f3451c711c0fe5d0b018aa4aa77d855.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/bsplines/4c8f9814c50c708757eeb5a68afabb7f.svg b/docs/images/chapters/bsplines/4c8f9814c50c708757eeb5a68afabb7f.svg index b6ae592a..75a2c494 100644 --- a/docs/images/chapters/bsplines/4c8f9814c50c708757eeb5a68afabb7f.svg +++ b/docs/images/chapters/bsplines/4c8f9814c50c708757eeb5a68afabb7f.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/bsplines/763838ea6f9e6c6aa63ea5f9c6d9542f.svg b/docs/images/chapters/bsplines/763838ea6f9e6c6aa63ea5f9c6d9542f.svg index 98f9af31..aa90f371 100644 --- a/docs/images/chapters/bsplines/763838ea6f9e6c6aa63ea5f9c6d9542f.svg +++ b/docs/images/chapters/bsplines/763838ea6f9e6c6aa63ea5f9c6d9542f.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/bsplines/892209dad8fd1f839470dd061e870913.svg b/docs/images/chapters/bsplines/892209dad8fd1f839470dd061e870913.svg index 318ec473..0e46a541 100644 --- a/docs/images/chapters/bsplines/892209dad8fd1f839470dd061e870913.svg +++ b/docs/images/chapters/bsplines/892209dad8fd1f839470dd061e870913.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/bsplines/adac18ea69cc58e01c8d5e15498e4aa6.svg b/docs/images/chapters/bsplines/adac18ea69cc58e01c8d5e15498e4aa6.svg index c25e7948..57100931 100644 --- a/docs/images/chapters/bsplines/adac18ea69cc58e01c8d5e15498e4aa6.svg +++ b/docs/images/chapters/bsplines/adac18ea69cc58e01c8d5e15498e4aa6.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/bsplines/bd187c361b285ef878d0bc17af8a3900.svg b/docs/images/chapters/bsplines/bd187c361b285ef878d0bc17af8a3900.svg index 6403e730..5cd6bcb3 100644 --- a/docs/images/chapters/bsplines/bd187c361b285ef878d0bc17af8a3900.svg +++ b/docs/images/chapters/bsplines/bd187c361b285ef878d0bc17af8a3900.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/bsplines/cf45d1ea00d4866abc8a058b130299b4.svg b/docs/images/chapters/bsplines/cf45d1ea00d4866abc8a058b130299b4.svg index 8f58bdba..147fc968 100644 --- a/docs/images/chapters/bsplines/cf45d1ea00d4866abc8a058b130299b4.svg +++ b/docs/images/chapters/bsplines/cf45d1ea00d4866abc8a058b130299b4.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/0430e8c7f7d4ec80e6527f96f3d56e5c.svg b/docs/images/chapters/canonical/0430e8c7f7d4ec80e6527f96f3d56e5c.svg index a6f9f724..2d717931 100644 --- a/docs/images/chapters/canonical/0430e8c7f7d4ec80e6527f96f3d56e5c.svg +++ b/docs/images/chapters/canonical/0430e8c7f7d4ec80e6527f96f3d56e5c.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/10025fdab2b3fd20f5d389cbe7e3e3ce.svg b/docs/images/chapters/canonical/10025fdab2b3fd20f5d389cbe7e3e3ce.svg index 8c3946b3..cf89ea1f 100644 --- a/docs/images/chapters/canonical/10025fdab2b3fd20f5d389cbe7e3e3ce.svg +++ b/docs/images/chapters/canonical/10025fdab2b3fd20f5d389cbe7e3e3ce.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/13c09950363c33627fd3a20343f2f6ce.svg b/docs/images/chapters/canonical/13c09950363c33627fd3a20343f2f6ce.svg index cbf2c4b1..d2be9f86 100644 --- a/docs/images/chapters/canonical/13c09950363c33627fd3a20343f2f6ce.svg +++ b/docs/images/chapters/canonical/13c09950363c33627fd3a20343f2f6ce.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/20684d22b3ddc52fd6abde8ce56608a9.svg b/docs/images/chapters/canonical/20684d22b3ddc52fd6abde8ce56608a9.svg index 9ff90d59..1c005dbf 100644 --- a/docs/images/chapters/canonical/20684d22b3ddc52fd6abde8ce56608a9.svg +++ b/docs/images/chapters/canonical/20684d22b3ddc52fd6abde8ce56608a9.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/2a411f175dcc987cdcc12e7df49ca272.svg b/docs/images/chapters/canonical/2a411f175dcc987cdcc12e7df49ca272.svg index a57bc626..43309b28 100644 --- a/docs/images/chapters/canonical/2a411f175dcc987cdcc12e7df49ca272.svg +++ b/docs/images/chapters/canonical/2a411f175dcc987cdcc12e7df49ca272.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/4230e959138d8400e04abf316360009a.svg b/docs/images/chapters/canonical/4230e959138d8400e04abf316360009a.svg index b252d264..242f5876 100644 --- a/docs/images/chapters/canonical/4230e959138d8400e04abf316360009a.svg +++ b/docs/images/chapters/canonical/4230e959138d8400e04abf316360009a.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/63ccae0ebe0ca70dc2afb507ab32e4bd.svg b/docs/images/chapters/canonical/63ccae0ebe0ca70dc2afb507ab32e4bd.svg index cb7d8351..0ec30bbf 100644 --- a/docs/images/chapters/canonical/63ccae0ebe0ca70dc2afb507ab32e4bd.svg +++ b/docs/images/chapters/canonical/63ccae0ebe0ca70dc2afb507ab32e4bd.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/8cbef24b8c3b26f9daf2f89d27d36e95.svg b/docs/images/chapters/canonical/8cbef24b8c3b26f9daf2f89d27d36e95.svg index f9f308d8..44620a29 100644 --- a/docs/images/chapters/canonical/8cbef24b8c3b26f9daf2f89d27d36e95.svg +++ b/docs/images/chapters/canonical/8cbef24b8c3b26f9daf2f89d27d36e95.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/add5f7fb210a306fe9ff933113f6fb91.svg b/docs/images/chapters/canonical/add5f7fb210a306fe9ff933113f6fb91.svg index 6d68f6bb..554461dc 100644 --- a/docs/images/chapters/canonical/add5f7fb210a306fe9ff933113f6fb91.svg +++ b/docs/images/chapters/canonical/add5f7fb210a306fe9ff933113f6fb91.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/ba5f418452c3657f3c4dd4b319e59070.svg b/docs/images/chapters/canonical/ba5f418452c3657f3c4dd4b319e59070.svg index fda471a7..d1d5bed6 100644 --- a/docs/images/chapters/canonical/ba5f418452c3657f3c4dd4b319e59070.svg +++ b/docs/images/chapters/canonical/ba5f418452c3657f3c4dd4b319e59070.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/ddee51855ef3a9ee7660c395b0a041c7.svg b/docs/images/chapters/canonical/ddee51855ef3a9ee7660c395b0a041c7.svg index 7e283e5f..52b555b3 100644 --- a/docs/images/chapters/canonical/ddee51855ef3a9ee7660c395b0a041c7.svg +++ b/docs/images/chapters/canonical/ddee51855ef3a9ee7660c395b0a041c7.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/canonical/f039b4e7cf0203df9fac48dad820b2b7.svg b/docs/images/chapters/canonical/f039b4e7cf0203df9fac48dad820b2b7.svg index 31325d78..04c0bbfc 100644 --- a/docs/images/chapters/canonical/f039b4e7cf0203df9fac48dad820b2b7.svg +++ b/docs/images/chapters/canonical/f039b4e7cf0203df9fac48dad820b2b7.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/06ae1e3fdc660e59d618e0760e8e9ab5.svg b/docs/images/chapters/catmullconv/06ae1e3fdc660e59d618e0760e8e9ab5.svg index f3b0a47d..37e9a3a1 100644 --- a/docs/images/chapters/catmullconv/06ae1e3fdc660e59d618e0760e8e9ab5.svg +++ b/docs/images/chapters/catmullconv/06ae1e3fdc660e59d618e0760e8e9ab5.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/169fd85a95e4d16fe289a75583017a11.svg b/docs/images/chapters/catmullconv/169fd85a95e4d16fe289a75583017a11.svg index e6579ea8..de960168 100644 --- a/docs/images/chapters/catmullconv/169fd85a95e4d16fe289a75583017a11.svg +++ b/docs/images/chapters/catmullconv/169fd85a95e4d16fe289a75583017a11.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/1811b59c5ab9233f08590396e5d03303.svg b/docs/images/chapters/catmullconv/1811b59c5ab9233f08590396e5d03303.svg index 41acb642..7a0d16a8 100644 --- a/docs/images/chapters/catmullconv/1811b59c5ab9233f08590396e5d03303.svg +++ b/docs/images/chapters/catmullconv/1811b59c5ab9233f08590396e5d03303.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/1b8a782f7540503d38067317e4cd00b0.svg b/docs/images/chapters/catmullconv/1b8a782f7540503d38067317e4cd00b0.svg index bc0ef446..a96e63eb 100644 --- a/docs/images/chapters/catmullconv/1b8a782f7540503d38067317e4cd00b0.svg +++ b/docs/images/chapters/catmullconv/1b8a782f7540503d38067317e4cd00b0.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/26363fc09f8cf2d41ea5b4256656bb6d.svg b/docs/images/chapters/catmullconv/26363fc09f8cf2d41ea5b4256656bb6d.svg index 0d73182c..d1522362 100644 --- a/docs/images/chapters/catmullconv/26363fc09f8cf2d41ea5b4256656bb6d.svg +++ b/docs/images/chapters/catmullconv/26363fc09f8cf2d41ea5b4256656bb6d.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/2844a4f4d222374a25b5f673c94679d9.svg b/docs/images/chapters/catmullconv/2844a4f4d222374a25b5f673c94679d9.svg index bb3f7d82..667c34d1 100644 --- a/docs/images/chapters/catmullconv/2844a4f4d222374a25b5f673c94679d9.svg +++ b/docs/images/chapters/catmullconv/2844a4f4d222374a25b5f673c94679d9.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/3ea54fe939d076f8db605c5b480e7db0.svg b/docs/images/chapters/catmullconv/3ea54fe939d076f8db605c5b480e7db0.svg index 8d1358c5..326350af 100644 --- a/docs/images/chapters/catmullconv/3ea54fe939d076f8db605c5b480e7db0.svg +++ b/docs/images/chapters/catmullconv/3ea54fe939d076f8db605c5b480e7db0.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/4d524810417b4caffedd13af23135f5b.svg b/docs/images/chapters/catmullconv/4d524810417b4caffedd13af23135f5b.svg index 03c46584..4a923a8e 100644 --- a/docs/images/chapters/catmullconv/4d524810417b4caffedd13af23135f5b.svg +++ b/docs/images/chapters/catmullconv/4d524810417b4caffedd13af23135f5b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/5f2750de827497375d9a915f96686885.svg b/docs/images/chapters/catmullconv/5f2750de827497375d9a915f96686885.svg index bbc2f617..336cc086 100644 --- a/docs/images/chapters/catmullconv/5f2750de827497375d9a915f96686885.svg +++ b/docs/images/chapters/catmullconv/5f2750de827497375d9a915f96686885.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/78ac9df086ec19147414359369b563fc.svg b/docs/images/chapters/catmullconv/78ac9df086ec19147414359369b563fc.svg index 3497c999..a887711e 100644 --- a/docs/images/chapters/catmullconv/78ac9df086ec19147414359369b563fc.svg +++ b/docs/images/chapters/catmullconv/78ac9df086ec19147414359369b563fc.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/79e333cd0c569657eea033b04fb5e61b.svg b/docs/images/chapters/catmullconv/79e333cd0c569657eea033b04fb5e61b.svg index 2650db3d..4697a3ec 100644 --- a/docs/images/chapters/catmullconv/79e333cd0c569657eea033b04fb5e61b.svg +++ b/docs/images/chapters/catmullconv/79e333cd0c569657eea033b04fb5e61b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/841fb6a2a035c9bcf5a2d46f2a67709b.svg b/docs/images/chapters/catmullconv/841fb6a2a035c9bcf5a2d46f2a67709b.svg index 91f8e7e9..36365389 100644 --- a/docs/images/chapters/catmullconv/841fb6a2a035c9bcf5a2d46f2a67709b.svg +++ b/docs/images/chapters/catmullconv/841fb6a2a035c9bcf5a2d46f2a67709b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/8f56909fcb62b8eef18b9b9559575c13.svg b/docs/images/chapters/catmullconv/8f56909fcb62b8eef18b9b9559575c13.svg index 6976feb2..ad67f783 100644 --- a/docs/images/chapters/catmullconv/8f56909fcb62b8eef18b9b9559575c13.svg +++ b/docs/images/chapters/catmullconv/8f56909fcb62b8eef18b9b9559575c13.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/9215d05705c8e8a7ebd718ae6f690371.svg b/docs/images/chapters/catmullconv/9215d05705c8e8a7ebd718ae6f690371.svg index d880b477..8612576c 100644 --- a/docs/images/chapters/catmullconv/9215d05705c8e8a7ebd718ae6f690371.svg +++ b/docs/images/chapters/catmullconv/9215d05705c8e8a7ebd718ae6f690371.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/a47b072a325812ac4f0ff52c22792588.svg b/docs/images/chapters/catmullconv/a47b072a325812ac4f0ff52c22792588.svg index 2ad281e0..166d50b1 100644 --- a/docs/images/chapters/catmullconv/a47b072a325812ac4f0ff52c22792588.svg +++ b/docs/images/chapters/catmullconv/a47b072a325812ac4f0ff52c22792588.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/b21386f86bef8894f108c5441dad10de.svg b/docs/images/chapters/catmullconv/b21386f86bef8894f108c5441dad10de.svg index 33417bbf..b442ce32 100644 --- a/docs/images/chapters/catmullconv/b21386f86bef8894f108c5441dad10de.svg +++ b/docs/images/chapters/catmullconv/b21386f86bef8894f108c5441dad10de.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/ba31c32eba62f1e3b15066cd5ddda597.svg b/docs/images/chapters/catmullconv/ba31c32eba62f1e3b15066cd5ddda597.svg index f4f9bc9b..3f6aa6a8 100644 --- a/docs/images/chapters/catmullconv/ba31c32eba62f1e3b15066cd5ddda597.svg +++ b/docs/images/chapters/catmullconv/ba31c32eba62f1e3b15066cd5ddda597.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/cbdd46d5e2e1a6202ef46fb03711ebe4.svg b/docs/images/chapters/catmullconv/cbdd46d5e2e1a6202ef46fb03711ebe4.svg index 7a3d8ee3..d680eaa7 100644 --- a/docs/images/chapters/catmullconv/cbdd46d5e2e1a6202ef46fb03711ebe4.svg +++ b/docs/images/chapters/catmullconv/cbdd46d5e2e1a6202ef46fb03711ebe4.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/cc1e2ff43350c32f0ae9ba9a7652b8fb.svg b/docs/images/chapters/catmullconv/cc1e2ff43350c32f0ae9ba9a7652b8fb.svg index d880b477..8612576c 100644 --- a/docs/images/chapters/catmullconv/cc1e2ff43350c32f0ae9ba9a7652b8fb.svg +++ b/docs/images/chapters/catmullconv/cc1e2ff43350c32f0ae9ba9a7652b8fb.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/e3d30ab368dcead1411532ce3814d3f3.svg b/docs/images/chapters/catmullconv/e3d30ab368dcead1411532ce3814d3f3.svg index 8832a55e..41cb5446 100644 --- a/docs/images/chapters/catmullconv/e3d30ab368dcead1411532ce3814d3f3.svg +++ b/docs/images/chapters/catmullconv/e3d30ab368dcead1411532ce3814d3f3.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/eae7f01976e511ee38b08b6edc8765d2.svg b/docs/images/chapters/catmullconv/eae7f01976e511ee38b08b6edc8765d2.svg index 7c783bfd..4da99e81 100644 --- a/docs/images/chapters/catmullconv/eae7f01976e511ee38b08b6edc8765d2.svg +++ b/docs/images/chapters/catmullconv/eae7f01976e511ee38b08b6edc8765d2.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/f08e34395ce2812276fd70548f805041.svg b/docs/images/chapters/catmullconv/f08e34395ce2812276fd70548f805041.svg index 2ae488c9..434c9986 100644 --- a/docs/images/chapters/catmullconv/f08e34395ce2812276fd70548f805041.svg +++ b/docs/images/chapters/catmullconv/f08e34395ce2812276fd70548f805041.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/f2b2a16a41d134ce0dfd544ab77ff25e.svg b/docs/images/chapters/catmullconv/f2b2a16a41d134ce0dfd544ab77ff25e.svg index aa26f769..72879fca 100644 --- a/docs/images/chapters/catmullconv/f2b2a16a41d134ce0dfd544ab77ff25e.svg +++ b/docs/images/chapters/catmullconv/f2b2a16a41d134ce0dfd544ab77ff25e.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/f41487aff3e34fafd5d4ee5979f133f1.svg b/docs/images/chapters/catmullconv/f41487aff3e34fafd5d4ee5979f133f1.svg index a5bec69b..03cc4061 100644 --- a/docs/images/chapters/catmullconv/f41487aff3e34fafd5d4ee5979f133f1.svg +++ b/docs/images/chapters/catmullconv/f41487aff3e34fafd5d4ee5979f133f1.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/catmullconv/f814bb8d627f9c8f33b347c1cf13d4c7.svg b/docs/images/chapters/catmullconv/f814bb8d627f9c8f33b347c1cf13d4c7.svg index 3e92ede9..e14bef1b 100644 --- a/docs/images/chapters/catmullconv/f814bb8d627f9c8f33b347c1cf13d4c7.svg +++ b/docs/images/chapters/catmullconv/f814bb8d627f9c8f33b347c1cf13d4c7.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/7754bc3c96ae3c90162fec3bd46bedff.svg b/docs/images/chapters/circles/7754bc3c96ae3c90162fec3bd46bedff.svg index 44ae6bbb..3f2fe19e 100644 --- a/docs/images/chapters/circles/7754bc3c96ae3c90162fec3bd46bedff.svg +++ b/docs/images/chapters/circles/7754bc3c96ae3c90162fec3bd46bedff.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/8374c4190d6213b0ac0621481afaa754.svg b/docs/images/chapters/circles/8374c4190d6213b0ac0621481afaa754.svg index a5458b6c..3730c296 100644 --- a/docs/images/chapters/circles/8374c4190d6213b0ac0621481afaa754.svg +++ b/docs/images/chapters/circles/8374c4190d6213b0ac0621481afaa754.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/9e4d886c372f916f6511c41245ceee39.svg b/docs/images/chapters/circles/9e4d886c372f916f6511c41245ceee39.svg index 99b7bbe7..d55b4a7e 100644 --- a/docs/images/chapters/circles/9e4d886c372f916f6511c41245ceee39.svg +++ b/docs/images/chapters/circles/9e4d886c372f916f6511c41245ceee39.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/a127f926eced2751a09c54bf7c361b4a.svg b/docs/images/chapters/circles/a127f926eced2751a09c54bf7c361b4a.svg index 562ac87e..79bfb625 100644 --- a/docs/images/chapters/circles/a127f926eced2751a09c54bf7c361b4a.svg +++ b/docs/images/chapters/circles/a127f926eced2751a09c54bf7c361b4a.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/adbd056f4b8fcd05b1d4f2fce27d7657.svg b/docs/images/chapters/circles/adbd056f4b8fcd05b1d4f2fce27d7657.svg index a3298b57..fb584165 100644 --- a/docs/images/chapters/circles/adbd056f4b8fcd05b1d4f2fce27d7657.svg +++ b/docs/images/chapters/circles/adbd056f4b8fcd05b1d4f2fce27d7657.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/b5d864e9ed0c44c56d454fbaa4218d5e.svg b/docs/images/chapters/circles/b5d864e9ed0c44c56d454fbaa4218d5e.svg index eee1d8fa..438d76fd 100644 --- a/docs/images/chapters/circles/b5d864e9ed0c44c56d454fbaa4218d5e.svg +++ b/docs/images/chapters/circles/b5d864e9ed0c44c56d454fbaa4218d5e.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/c22f6d343ee0cce7bff6a617c946ca17.svg b/docs/images/chapters/circles/c22f6d343ee0cce7bff6a617c946ca17.svg index ba2e8445..e1ff7e7c 100644 --- a/docs/images/chapters/circles/c22f6d343ee0cce7bff6a617c946ca17.svg +++ b/docs/images/chapters/circles/c22f6d343ee0cce7bff6a617c946ca17.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/df87674db0f31fc3944aaeb6b890e196.svg b/docs/images/chapters/circles/df87674db0f31fc3944aaeb6b890e196.svg index c36d08d2..39f8190e 100644 --- a/docs/images/chapters/circles/df87674db0f31fc3944aaeb6b890e196.svg +++ b/docs/images/chapters/circles/df87674db0f31fc3944aaeb6b890e196.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/e1059e611aa1e51db41f9ce0b4ebb95a.svg b/docs/images/chapters/circles/e1059e611aa1e51db41f9ce0b4ebb95a.svg index 11112bc8..5863c8fc 100644 --- a/docs/images/chapters/circles/e1059e611aa1e51db41f9ce0b4ebb95a.svg +++ b/docs/images/chapters/circles/e1059e611aa1e51db41f9ce0b4ebb95a.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/ef3ab62bb896019c6157c85aae5d1ed3.svg b/docs/images/chapters/circles/ef3ab62bb896019c6157c85aae5d1ed3.svg index 06f527af..5eb24ed1 100644 --- a/docs/images/chapters/circles/ef3ab62bb896019c6157c85aae5d1ed3.svg +++ b/docs/images/chapters/circles/ef3ab62bb896019c6157c85aae5d1ed3.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles/fe32474b4616ee9478e1308308f1b6bf.svg b/docs/images/chapters/circles/fe32474b4616ee9478e1308308f1b6bf.svg index dea287d7..a3533922 100644 --- a/docs/images/chapters/circles/fe32474b4616ee9478e1308308f1b6bf.svg +++ b/docs/images/chapters/circles/fe32474b4616ee9478e1308308f1b6bf.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/0364731626a530c8a9b30f424ada53c5.svg b/docs/images/chapters/circles_cubic/0364731626a530c8a9b30f424ada53c5.svg index 08f5460d..dfb2ece0 100644 --- a/docs/images/chapters/circles_cubic/0364731626a530c8a9b30f424ada53c5.svg +++ b/docs/images/chapters/circles_cubic/0364731626a530c8a9b30f424ada53c5.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/05d36e051a38905dcb81e65db8261f24.svg b/docs/images/chapters/circles_cubic/05d36e051a38905dcb81e65db8261f24.svg index 6c0e7823..6d2d3b15 100644 --- a/docs/images/chapters/circles_cubic/05d36e051a38905dcb81e65db8261f24.svg +++ b/docs/images/chapters/circles_cubic/05d36e051a38905dcb81e65db8261f24.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/14c238eb17045cda3205c6ce9944004c.svg b/docs/images/chapters/circles_cubic/14c238eb17045cda3205c6ce9944004c.svg index 04e8854c..fd34be51 100644 --- a/docs/images/chapters/circles_cubic/14c238eb17045cda3205c6ce9944004c.svg +++ b/docs/images/chapters/circles_cubic/14c238eb17045cda3205c6ce9944004c.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/178a838274748439778e2a29f5a27d0b.svg b/docs/images/chapters/circles_cubic/178a838274748439778e2a29f5a27d0b.svg index 7de57979..3eadf6f1 100644 --- a/docs/images/chapters/circles_cubic/178a838274748439778e2a29f5a27d0b.svg +++ b/docs/images/chapters/circles_cubic/178a838274748439778e2a29f5a27d0b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/195790bae7de813aec342ea82b5d8781.svg b/docs/images/chapters/circles_cubic/195790bae7de813aec342ea82b5d8781.svg index a4cb1fd1..4a9ef33b 100644 --- a/docs/images/chapters/circles_cubic/195790bae7de813aec342ea82b5d8781.svg +++ b/docs/images/chapters/circles_cubic/195790bae7de813aec342ea82b5d8781.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/1ab9827727b8f7fe466a124b0e1867ce.svg b/docs/images/chapters/circles_cubic/1ab9827727b8f7fe466a124b0e1867ce.svg index a97cca3a..3d4afb89 100644 --- a/docs/images/chapters/circles_cubic/1ab9827727b8f7fe466a124b0e1867ce.svg +++ b/docs/images/chapters/circles_cubic/1ab9827727b8f7fe466a124b0e1867ce.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/3189cac1ddac07c1487e1e51740ecc88.svg b/docs/images/chapters/circles_cubic/3189cac1ddac07c1487e1e51740ecc88.svg index 8ebfa042..50162924 100644 --- a/docs/images/chapters/circles_cubic/3189cac1ddac07c1487e1e51740ecc88.svg +++ b/docs/images/chapters/circles_cubic/3189cac1ddac07c1487e1e51740ecc88.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/877f9c217c51c0087be751a7580ed459.svg b/docs/images/chapters/circles_cubic/877f9c217c51c0087be751a7580ed459.svg index b5d632c4..6baa4661 100644 --- a/docs/images/chapters/circles_cubic/877f9c217c51c0087be751a7580ed459.svg +++ b/docs/images/chapters/circles_cubic/877f9c217c51c0087be751a7580ed459.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/a4f0dafbfe80c88723c3cc22277a9682.svg b/docs/images/chapters/circles_cubic/a4f0dafbfe80c88723c3cc22277a9682.svg index a5458b6c..3730c296 100644 --- a/docs/images/chapters/circles_cubic/a4f0dafbfe80c88723c3cc22277a9682.svg +++ b/docs/images/chapters/circles_cubic/a4f0dafbfe80c88723c3cc22277a9682.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/acbc5efb06bc34571ccc0322376e0b9b.svg b/docs/images/chapters/circles_cubic/acbc5efb06bc34571ccc0322376e0b9b.svg index 7b252622..bb89e7c5 100644 --- a/docs/images/chapters/circles_cubic/acbc5efb06bc34571ccc0322376e0b9b.svg +++ b/docs/images/chapters/circles_cubic/acbc5efb06bc34571ccc0322376e0b9b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/dfb83eec053c30e0a41b0a52aba24cd4.svg b/docs/images/chapters/circles_cubic/dfb83eec053c30e0a41b0a52aba24cd4.svg index 9299a7ca..c26acc14 100644 --- a/docs/images/chapters/circles_cubic/dfb83eec053c30e0a41b0a52aba24cd4.svg +++ b/docs/images/chapters/circles_cubic/dfb83eec053c30e0a41b0a52aba24cd4.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/e2258660a796dcd6189a6f5e14326dad.svg b/docs/images/chapters/circles_cubic/e2258660a796dcd6189a6f5e14326dad.svg index 12aa5b8a..6c823fc5 100644 --- a/docs/images/chapters/circles_cubic/e2258660a796dcd6189a6f5e14326dad.svg +++ b/docs/images/chapters/circles_cubic/e2258660a796dcd6189a6f5e14326dad.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/circles_cubic/ee08d86b7497c7ab042ee899bf15d453.svg b/docs/images/chapters/circles_cubic/ee08d86b7497c7ab042ee899bf15d453.svg index 426522ad..7cd57442 100644 --- a/docs/images/chapters/circles_cubic/ee08d86b7497c7ab042ee899bf15d453.svg +++ b/docs/images/chapters/circles_cubic/ee08d86b7497c7ab042ee899bf15d453.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/components/008604bc4c53bd7e0d97c99a67812ad1.png b/docs/images/chapters/components/008604bc4c53bd7e0d97c99a67812ad1.png deleted file mode 100644 index 755d99cf..00000000 Binary files a/docs/images/chapters/components/008604bc4c53bd7e0d97c99a67812ad1.png and /dev/null differ diff --git a/docs/images/chapters/components/1e6e38f6403dbe4c8b80295a94fc6748.png b/docs/images/chapters/components/1e6e38f6403dbe4c8b80295a94fc6748.png new file mode 100644 index 00000000..e8741a4b Binary files /dev/null and b/docs/images/chapters/components/1e6e38f6403dbe4c8b80295a94fc6748.png differ diff --git a/docs/images/chapters/components/348694339257428a260144da4bbf80fc.png b/docs/images/chapters/components/348694339257428a260144da4bbf80fc.png new file mode 100644 index 00000000..7a884ad3 Binary files /dev/null and b/docs/images/chapters/components/348694339257428a260144da4bbf80fc.png differ diff --git a/docs/images/chapters/components/5214256129e6396e7ac1f1713fa9c88d.png b/docs/images/chapters/components/5214256129e6396e7ac1f1713fa9c88d.png deleted file mode 100644 index 8b2dbaec..00000000 Binary files a/docs/images/chapters/components/5214256129e6396e7ac1f1713fa9c88d.png and /dev/null differ diff --git a/docs/images/chapters/curvature/7898e3a51a86afffd1a91ce0fcc99b26.png b/docs/images/chapters/curvature/2398b098e6ac9da9dc109239b49715ed.png similarity index 100% rename from docs/images/chapters/curvature/7898e3a51a86afffd1a91ce0fcc99b26.png rename to docs/images/chapters/curvature/2398b098e6ac9da9dc109239b49715ed.png diff --git a/docs/images/chapters/curvature/78581fc4b36f2e45c704a4fce7c8368a.png b/docs/images/chapters/curvature/595e2f3790ef8034631e1cbb0df9c6f6.png similarity index 100% rename from docs/images/chapters/curvature/78581fc4b36f2e45c704a4fce7c8368a.png rename to docs/images/chapters/curvature/595e2f3790ef8034631e1cbb0df9c6f6.png diff --git a/docs/images/chapters/curvature/6ed4fd2ead35c57984caddf9fe375a5f.svg b/docs/images/chapters/curvature/6ed4fd2ead35c57984caddf9fe375a5f.svg index e2033566..499a50f9 100644 --- a/docs/images/chapters/curvature/6ed4fd2ead35c57984caddf9fe375a5f.svg +++ b/docs/images/chapters/curvature/6ed4fd2ead35c57984caddf9fe375a5f.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvature/828333034b4fed8e248683760d6bc6f4.svg b/docs/images/chapters/curvature/828333034b4fed8e248683760d6bc6f4.svg index 0a147ccc..5bcd4e69 100644 --- a/docs/images/chapters/curvature/828333034b4fed8e248683760d6bc6f4.svg +++ b/docs/images/chapters/curvature/828333034b4fed8e248683760d6bc6f4.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvature/d9c893051586eb8d9de51c0ae1ef8fae.svg b/docs/images/chapters/curvature/d9c893051586eb8d9de51c0ae1ef8fae.svg index b5e47ae7..818992fd 100644 --- a/docs/images/chapters/curvature/d9c893051586eb8d9de51c0ae1ef8fae.svg +++ b/docs/images/chapters/curvature/d9c893051586eb8d9de51c0ae1ef8fae.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/03ec73258d5c95eed39a2ea8665e0b07.svg b/docs/images/chapters/curvefitting/03ec73258d5c95eed39a2ea8665e0b07.svg index 98588d0c..4bcd6340 100644 --- a/docs/images/chapters/curvefitting/03ec73258d5c95eed39a2ea8665e0b07.svg +++ b/docs/images/chapters/curvefitting/03ec73258d5c95eed39a2ea8665e0b07.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/08f4beaebf83dca594ad125bdca7e436.svg b/docs/images/chapters/curvefitting/08f4beaebf83dca594ad125bdca7e436.svg index 09378509..0e4504c1 100644 --- a/docs/images/chapters/curvefitting/08f4beaebf83dca594ad125bdca7e436.svg +++ b/docs/images/chapters/curvefitting/08f4beaebf83dca594ad125bdca7e436.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/283bc9e8fe59a78d3c74860f62a66ecb.svg b/docs/images/chapters/curvefitting/283bc9e8fe59a78d3c74860f62a66ecb.svg index 0e380709..9c441a9f 100644 --- a/docs/images/chapters/curvefitting/283bc9e8fe59a78d3c74860f62a66ecb.svg +++ b/docs/images/chapters/curvefitting/283bc9e8fe59a78d3c74860f62a66ecb.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/2b8334727d3b004c6e87263fec6b32b7.svg b/docs/images/chapters/curvefitting/2b8334727d3b004c6e87263fec6b32b7.svg index e618c6a9..449b7523 100644 --- a/docs/images/chapters/curvefitting/2b8334727d3b004c6e87263fec6b32b7.svg +++ b/docs/images/chapters/curvefitting/2b8334727d3b004c6e87263fec6b32b7.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/2bef3da3828d63d690460ce9947dbde2.svg b/docs/images/chapters/curvefitting/2bef3da3828d63d690460ce9947dbde2.svg index 10801872..5730a767 100644 --- a/docs/images/chapters/curvefitting/2bef3da3828d63d690460ce9947dbde2.svg +++ b/docs/images/chapters/curvefitting/2bef3da3828d63d690460ce9947dbde2.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/2d42758fba3370f52191306752c2705c.svg b/docs/images/chapters/curvefitting/2d42758fba3370f52191306752c2705c.svg index 8837c467..5bdd5256 100644 --- a/docs/images/chapters/curvefitting/2d42758fba3370f52191306752c2705c.svg +++ b/docs/images/chapters/curvefitting/2d42758fba3370f52191306752c2705c.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/4ffad56e281ee79d0688e93033429f0a.svg b/docs/images/chapters/curvefitting/4ffad56e281ee79d0688e93033429f0a.svg index 92462c72..e4293a60 100644 --- a/docs/images/chapters/curvefitting/4ffad56e281ee79d0688e93033429f0a.svg +++ b/docs/images/chapters/curvefitting/4ffad56e281ee79d0688e93033429f0a.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/5f7fcb86ae1c19612b9fe02e23229e31.svg b/docs/images/chapters/curvefitting/5f7fcb86ae1c19612b9fe02e23229e31.svg index 158f3b2d..556e8dab 100644 --- a/docs/images/chapters/curvefitting/5f7fcb86ae1c19612b9fe02e23229e31.svg +++ b/docs/images/chapters/curvefitting/5f7fcb86ae1c19612b9fe02e23229e31.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/6202d7bd150c852b432d807c40fb1647.svg b/docs/images/chapters/curvefitting/6202d7bd150c852b432d807c40fb1647.svg index 309d4b6d..4a70871d 100644 --- a/docs/images/chapters/curvefitting/6202d7bd150c852b432d807c40fb1647.svg +++ b/docs/images/chapters/curvefitting/6202d7bd150c852b432d807c40fb1647.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/78b8ba1aba2e4c9ad3f7890299c90152.svg b/docs/images/chapters/curvefitting/78b8ba1aba2e4c9ad3f7890299c90152.svg index 88d9ca0d..08bd2b23 100644 --- a/docs/images/chapters/curvefitting/78b8ba1aba2e4c9ad3f7890299c90152.svg +++ b/docs/images/chapters/curvefitting/78b8ba1aba2e4c9ad3f7890299c90152.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/7e5d59272621baf942bc722208ce70c2.svg b/docs/images/chapters/curvefitting/7e5d59272621baf942bc722208ce70c2.svg index 3c9b7125..24fa6350 100644 --- a/docs/images/chapters/curvefitting/7e5d59272621baf942bc722208ce70c2.svg +++ b/docs/images/chapters/curvefitting/7e5d59272621baf942bc722208ce70c2.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/7eada6f12045423de24d9a2ab8e293b1.svg b/docs/images/chapters/curvefitting/7eada6f12045423de24d9a2ab8e293b1.svg index 0e69dda5..13cd868e 100644 --- a/docs/images/chapters/curvefitting/7eada6f12045423de24d9a2ab8e293b1.svg +++ b/docs/images/chapters/curvefitting/7eada6f12045423de24d9a2ab8e293b1.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/875ca8eea72e727ccb881b4c0b6a3224.svg b/docs/images/chapters/curvefitting/875ca8eea72e727ccb881b4c0b6a3224.svg index 87002d07..33df76b5 100644 --- a/docs/images/chapters/curvefitting/875ca8eea72e727ccb881b4c0b6a3224.svg +++ b/docs/images/chapters/curvefitting/875ca8eea72e727ccb881b4c0b6a3224.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/8d09f2be2c6db79ee966f170ffc25815.svg b/docs/images/chapters/curvefitting/8d09f2be2c6db79ee966f170ffc25815.svg index 6c6c2d37..fcde3a3d 100644 --- a/docs/images/chapters/curvefitting/8d09f2be2c6db79ee966f170ffc25815.svg +++ b/docs/images/chapters/curvefitting/8d09f2be2c6db79ee966f170ffc25815.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/9151c0fdf9689ee598a2d029ab2ffe34.svg b/docs/images/chapters/curvefitting/9151c0fdf9689ee598a2d029ab2ffe34.svg index 7397a05a..d5c6d91c 100644 --- a/docs/images/chapters/curvefitting/9151c0fdf9689ee598a2d029ab2ffe34.svg +++ b/docs/images/chapters/curvefitting/9151c0fdf9689ee598a2d029ab2ffe34.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/94acb5850778dcb16c2ba3cfa676f537.svg b/docs/images/chapters/curvefitting/94acb5850778dcb16c2ba3cfa676f537.svg index 6b97b0a5..f414d4c3 100644 --- a/docs/images/chapters/curvefitting/94acb5850778dcb16c2ba3cfa676f537.svg +++ b/docs/images/chapters/curvefitting/94acb5850778dcb16c2ba3cfa676f537.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/ab334858d3fa309cc1a5ba535a2ca168.svg b/docs/images/chapters/curvefitting/ab334858d3fa309cc1a5ba535a2ca168.svg index d5f7c27a..f18c9c48 100644 --- a/docs/images/chapters/curvefitting/ab334858d3fa309cc1a5ba535a2ca168.svg +++ b/docs/images/chapters/curvefitting/ab334858d3fa309cc1a5ba535a2ca168.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/bd8e8e294eec10d2bf6ef857c7c0c2c2.svg b/docs/images/chapters/curvefitting/bd8e8e294eec10d2bf6ef857c7c0c2c2.svg index 869937f0..52c27d84 100644 --- a/docs/images/chapters/curvefitting/bd8e8e294eec10d2bf6ef857c7c0c2c2.svg +++ b/docs/images/chapters/curvefitting/bd8e8e294eec10d2bf6ef857c7c0c2c2.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/curvefitting/d84d1c71a3ce1918f53eaf8f9fe98ac4.svg b/docs/images/chapters/curvefitting/d84d1c71a3ce1918f53eaf8f9fe98ac4.svg index 3008ea83..ea714679 100644 --- a/docs/images/chapters/curvefitting/d84d1c71a3ce1918f53eaf8f9fe98ac4.svg +++ b/docs/images/chapters/curvefitting/d84d1c71a3ce1918f53eaf8f9fe98ac4.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/explanation/066a910ae6aba69c40a338320759cdd1.svg b/docs/images/chapters/explanation/066a910ae6aba69c40a338320759cdd1.svg index 50713c42..6f802d03 100644 --- a/docs/images/chapters/explanation/066a910ae6aba69c40a338320759cdd1.svg +++ b/docs/images/chapters/explanation/066a910ae6aba69c40a338320759cdd1.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/explanation/0f5cffd58e864fec6739a57664eb8cbd.svg b/docs/images/chapters/explanation/0f5cffd58e864fec6739a57664eb8cbd.svg index 9f81756b..69228905 100644 --- a/docs/images/chapters/explanation/0f5cffd58e864fec6739a57664eb8cbd.svg +++ b/docs/images/chapters/explanation/0f5cffd58e864fec6739a57664eb8cbd.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/explanation/1caef9931f954e32eae5067b732c1018.svg b/docs/images/chapters/explanation/1caef9931f954e32eae5067b732c1018.svg index 936e0755..0466c0f7 100644 --- a/docs/images/chapters/explanation/1caef9931f954e32eae5067b732c1018.svg +++ b/docs/images/chapters/explanation/1caef9931f954e32eae5067b732c1018.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/explanation/2adc12d0cff01d40d9e1702014a7dc19.svg b/docs/images/chapters/explanation/2adc12d0cff01d40d9e1702014a7dc19.svg index b20000a0..62b4da60 100644 --- a/docs/images/chapters/explanation/2adc12d0cff01d40d9e1702014a7dc19.svg +++ b/docs/images/chapters/explanation/2adc12d0cff01d40d9e1702014a7dc19.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/explanation/4cf6fb369841e2c5d36e5567a8db4306.svg b/docs/images/chapters/explanation/4cf6fb369841e2c5d36e5567a8db4306.svg index 1eccf6ad..6e2362be 100644 --- a/docs/images/chapters/explanation/4cf6fb369841e2c5d36e5567a8db4306.svg +++ b/docs/images/chapters/explanation/4cf6fb369841e2c5d36e5567a8db4306.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/explanation/9a6d17c362980775f1425d0d2ad9a36a.svg b/docs/images/chapters/explanation/9a6d17c362980775f1425d0d2ad9a36a.svg index d307f8b4..3b48115f 100644 --- a/docs/images/chapters/explanation/9a6d17c362980775f1425d0d2ad9a36a.svg +++ b/docs/images/chapters/explanation/9a6d17c362980775f1425d0d2ad9a36a.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/explanation/9c18f76e76cf684ecd217ad8facc2e93.svg b/docs/images/chapters/explanation/9c18f76e76cf684ecd217ad8facc2e93.svg index dfbbde5a..412f4573 100644 --- a/docs/images/chapters/explanation/9c18f76e76cf684ecd217ad8facc2e93.svg +++ b/docs/images/chapters/explanation/9c18f76e76cf684ecd217ad8facc2e93.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/explanation/bb06cb82d372f822a7b35e661502bd72.svg b/docs/images/chapters/explanation/bb06cb82d372f822a7b35e661502bd72.svg index 965f18de..7ebe5497 100644 --- a/docs/images/chapters/explanation/bb06cb82d372f822a7b35e661502bd72.svg +++ b/docs/images/chapters/explanation/bb06cb82d372f822a7b35e661502bd72.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/explanation/e107caca1577e44293cd207388ac939c.svg b/docs/images/chapters/explanation/e107caca1577e44293cd207388ac939c.svg index 68a70358..a0290fb4 100644 --- a/docs/images/chapters/explanation/e107caca1577e44293cd207388ac939c.svg +++ b/docs/images/chapters/explanation/e107caca1577e44293cd207388ac939c.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/extended/b80a1cac1f9ec476d6f6646ce0e154e7.svg b/docs/images/chapters/extended/b80a1cac1f9ec476d6f6646ce0e154e7.svg index ac4c488f..bb85865d 100644 --- a/docs/images/chapters/extended/b80a1cac1f9ec476d6f6646ce0e154e7.svg +++ b/docs/images/chapters/extended/b80a1cac1f9ec476d6f6646ce0e154e7.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/extended/d930dea961b40f4810708bd6746221a2.svg b/docs/images/chapters/extended/d930dea961b40f4810708bd6746221a2.svg index 9f7786ca..2391cb17 100644 --- a/docs/images/chapters/extended/d930dea961b40f4810708bd6746221a2.svg +++ b/docs/images/chapters/extended/d930dea961b40f4810708bd6746221a2.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/extremities/0ec5cc72a428d75defb480530b50d720.svg b/docs/images/chapters/extremities/0ec5cc72a428d75defb480530b50d720.svg index c810f40e..ae058401 100644 --- a/docs/images/chapters/extremities/0ec5cc72a428d75defb480530b50d720.svg +++ b/docs/images/chapters/extremities/0ec5cc72a428d75defb480530b50d720.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/extremities/1b70524bfb7d159a48f0b370d81ee2f6.png b/docs/images/chapters/extremities/1b70524bfb7d159a48f0b370d81ee2f6.png new file mode 100644 index 00000000..8c7e30d1 Binary files /dev/null and b/docs/images/chapters/extremities/1b70524bfb7d159a48f0b370d81ee2f6.png differ diff --git a/docs/images/chapters/extremities/1c0367fad2a0d6946db1f55a8520793a.svg b/docs/images/chapters/extremities/1c0367fad2a0d6946db1f55a8520793a.svg index e134bbd6..3282e1f1 100644 --- a/docs/images/chapters/extremities/1c0367fad2a0d6946db1f55a8520793a.svg +++ b/docs/images/chapters/extremities/1c0367fad2a0d6946db1f55a8520793a.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/extremities/6db78123d4b676ffdf85d53670c77468.svg b/docs/images/chapters/extremities/6db78123d4b676ffdf85d53670c77468.svg index 38a6dd1e..a69d2227 100644 --- a/docs/images/chapters/extremities/6db78123d4b676ffdf85d53670c77468.svg +++ b/docs/images/chapters/extremities/6db78123d4b676ffdf85d53670c77468.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/extremities/890406c7bc96904224f8f14940bf3e56.png b/docs/images/chapters/extremities/890406c7bc96904224f8f14940bf3e56.png deleted file mode 100644 index 1a2edfd6..00000000 Binary files a/docs/images/chapters/extremities/890406c7bc96904224f8f14940bf3e56.png and /dev/null differ diff --git a/docs/images/chapters/extremities/9850eec01924deae7fda4400ce44270d.png b/docs/images/chapters/extremities/9850eec01924deae7fda4400ce44270d.png deleted file mode 100644 index e5c98aad..00000000 Binary files a/docs/images/chapters/extremities/9850eec01924deae7fda4400ce44270d.png and /dev/null differ diff --git a/docs/images/chapters/extremities/997a8cc704c0ab0e364cb8b532df90b0.svg b/docs/images/chapters/extremities/997a8cc704c0ab0e364cb8b532df90b0.svg index 2489c8bd..ec959270 100644 --- a/docs/images/chapters/extremities/997a8cc704c0ab0e364cb8b532df90b0.svg +++ b/docs/images/chapters/extremities/997a8cc704c0ab0e364cb8b532df90b0.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/extremities/a77025630019ef3d90ffa279879a205a.png b/docs/images/chapters/extremities/a77025630019ef3d90ffa279879a205a.png new file mode 100644 index 00000000..5311becd Binary files /dev/null and b/docs/images/chapters/extremities/a77025630019ef3d90ffa279879a205a.png differ diff --git a/docs/images/chapters/extremities/c621cc41f6f22ee1beedbcb510fa5b6b.svg b/docs/images/chapters/extremities/c621cc41f6f22ee1beedbcb510fa5b6b.svg index baa9ab6a..d3b2049c 100644 --- a/docs/images/chapters/extremities/c621cc41f6f22ee1beedbcb510fa5b6b.svg +++ b/docs/images/chapters/extremities/c621cc41f6f22ee1beedbcb510fa5b6b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/extremities/d9e66caeb45b6643112ce3d971b17e5b.svg b/docs/images/chapters/extremities/d9e66caeb45b6643112ce3d971b17e5b.svg index 64d12c1e..8ef46d1c 100644 --- a/docs/images/chapters/extremities/d9e66caeb45b6643112ce3d971b17e5b.svg +++ b/docs/images/chapters/extremities/d9e66caeb45b6643112ce3d971b17e5b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/extremities/ddc6f99a543afad25c55cf16b9deeed9.svg b/docs/images/chapters/extremities/ddc6f99a543afad25c55cf16b9deeed9.svg index f078c502..a3127a01 100644 --- a/docs/images/chapters/extremities/ddc6f99a543afad25c55cf16b9deeed9.svg +++ b/docs/images/chapters/extremities/ddc6f99a543afad25c55cf16b9deeed9.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/extremities/e06ec558d99b53e559d24524f4201951.svg b/docs/images/chapters/extremities/e06ec558d99b53e559d24524f4201951.svg index ed3b2aee..9bd72aa8 100644 --- a/docs/images/chapters/extremities/e06ec558d99b53e559d24524f4201951.svg +++ b/docs/images/chapters/extremities/e06ec558d99b53e559d24524f4201951.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/inflections/1679090a942a43d27f886f236fc8d62b.svg b/docs/images/chapters/inflections/1679090a942a43d27f886f236fc8d62b.svg index 05687051..be62b241 100644 --- a/docs/images/chapters/inflections/1679090a942a43d27f886f236fc8d62b.svg +++ b/docs/images/chapters/inflections/1679090a942a43d27f886f236fc8d62b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/inflections/2029bca9f4fa15739553636af99b70a8.svg b/docs/images/chapters/inflections/2029bca9f4fa15739553636af99b70a8.svg index 9dded3a2..c745eba0 100644 --- a/docs/images/chapters/inflections/2029bca9f4fa15739553636af99b70a8.svg +++ b/docs/images/chapters/inflections/2029bca9f4fa15739553636af99b70a8.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/inflections/4b5c7d0bf0fcd769db007dd98d4a024d.svg b/docs/images/chapters/inflections/4b5c7d0bf0fcd769db007dd98d4a024d.svg index a33d6d45..c3b524e8 100644 --- a/docs/images/chapters/inflections/4b5c7d0bf0fcd769db007dd98d4a024d.svg +++ b/docs/images/chapters/inflections/4b5c7d0bf0fcd769db007dd98d4a024d.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/inflections/4d78ebcf8626f777725d67d3672fa480.svg b/docs/images/chapters/inflections/4d78ebcf8626f777725d67d3672fa480.svg index b0dc06eb..bbcccafc 100644 --- a/docs/images/chapters/inflections/4d78ebcf8626f777725d67d3672fa480.svg +++ b/docs/images/chapters/inflections/4d78ebcf8626f777725d67d3672fa480.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/inflections/9e1ce3975100600d4979370851929b73.png b/docs/images/chapters/inflections/726ece45630c43be14589c51f1606bd7.png similarity index 100% rename from docs/images/chapters/inflections/9e1ce3975100600d4979370851929b73.png rename to docs/images/chapters/inflections/726ece45630c43be14589c51f1606bd7.png diff --git a/docs/images/chapters/inflections/7c9762c0e04693eb743905cdc0487f8b.svg b/docs/images/chapters/inflections/7c9762c0e04693eb743905cdc0487f8b.svg index 1c0bc505..2568ebf3 100644 --- a/docs/images/chapters/inflections/7c9762c0e04693eb743905cdc0487f8b.svg +++ b/docs/images/chapters/inflections/7c9762c0e04693eb743905cdc0487f8b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/inflections/97b34ad5920612574d1b2a1a9d22d571.svg b/docs/images/chapters/inflections/97b34ad5920612574d1b2a1a9d22d571.svg index 6b2e9b47..23682936 100644 --- a/docs/images/chapters/inflections/97b34ad5920612574d1b2a1a9d22d571.svg +++ b/docs/images/chapters/inflections/97b34ad5920612574d1b2a1a9d22d571.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/inflections/b2433959e1f451fa3bf238fc37e04527.svg b/docs/images/chapters/inflections/b2433959e1f451fa3bf238fc37e04527.svg index 217baee2..25450b67 100644 --- a/docs/images/chapters/inflections/b2433959e1f451fa3bf238fc37e04527.svg +++ b/docs/images/chapters/inflections/b2433959e1f451fa3bf238fc37e04527.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/inflections/bafdb6583323bda71d9a15c02d1fdec2.svg b/docs/images/chapters/inflections/bafdb6583323bda71d9a15c02d1fdec2.svg index 1a05b531..90f0133c 100644 --- a/docs/images/chapters/inflections/bafdb6583323bda71d9a15c02d1fdec2.svg +++ b/docs/images/chapters/inflections/bafdb6583323bda71d9a15c02d1fdec2.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/molding/079d318ad693b6b17413a91f5de06be8.svg b/docs/images/chapters/molding/079d318ad693b6b17413a91f5de06be8.svg index de6c0325..155cb793 100644 --- a/docs/images/chapters/molding/079d318ad693b6b17413a91f5de06be8.svg +++ b/docs/images/chapters/molding/079d318ad693b6b17413a91f5de06be8.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/molding/82a99caec5f84fb26dce28277377c041.svg b/docs/images/chapters/molding/82a99caec5f84fb26dce28277377c041.svg index 59451769..db0bf546 100644 --- a/docs/images/chapters/molding/82a99caec5f84fb26dce28277377c041.svg +++ b/docs/images/chapters/molding/82a99caec5f84fb26dce28277377c041.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/offsetting/1d4be24e5896dce3c16c8e71f9cc8881.svg b/docs/images/chapters/offsetting/1d4be24e5896dce3c16c8e71f9cc8881.svg index f797b8e8..c3bfbb35 100644 --- a/docs/images/chapters/offsetting/1d4be24e5896dce3c16c8e71f9cc8881.svg +++ b/docs/images/chapters/offsetting/1d4be24e5896dce3c16c8e71f9cc8881.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/offsetting/1d586b939b44ff9bdb42562a12ac2779.svg b/docs/images/chapters/offsetting/1d586b939b44ff9bdb42562a12ac2779.svg index c1764cbb..6a1bd9fe 100644 --- a/docs/images/chapters/offsetting/1d586b939b44ff9bdb42562a12ac2779.svg +++ b/docs/images/chapters/offsetting/1d586b939b44ff9bdb42562a12ac2779.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/offsetting/5bfee4f2ae27304475673d0596e42f9a.svg b/docs/images/chapters/offsetting/5bfee4f2ae27304475673d0596e42f9a.svg index fc705e15..93c47cd6 100644 --- a/docs/images/chapters/offsetting/5bfee4f2ae27304475673d0596e42f9a.svg +++ b/docs/images/chapters/offsetting/5bfee4f2ae27304475673d0596e42f9a.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/offsetting/b262e50c085815421d94e120fc17f1c8.svg b/docs/images/chapters/offsetting/b262e50c085815421d94e120fc17f1c8.svg index c5b2375c..fb249f7a 100644 --- a/docs/images/chapters/offsetting/b262e50c085815421d94e120fc17f1c8.svg +++ b/docs/images/chapters/offsetting/b262e50c085815421d94e120fc17f1c8.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/offsetting/fa6c243de2aa78b7451e0086848dfdfc.svg b/docs/images/chapters/offsetting/fa6c243de2aa78b7451e0086848dfdfc.svg index 4be49407..e70572fb 100644 --- a/docs/images/chapters/offsetting/fa6c243de2aa78b7451e0086848dfdfc.svg +++ b/docs/images/chapters/offsetting/fa6c243de2aa78b7451e0086848dfdfc.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/pointcurves/3c7516c16a5dea95df741f4263cecd1c.svg b/docs/images/chapters/pointcurves/3c7516c16a5dea95df741f4263cecd1c.svg index b3600fb2..ec9fc5b2 100644 --- a/docs/images/chapters/pointcurves/3c7516c16a5dea95df741f4263cecd1c.svg +++ b/docs/images/chapters/pointcurves/3c7516c16a5dea95df741f4263cecd1c.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/pointcurves/55d4f7ed095dfea8f9772208abc83b51.svg b/docs/images/chapters/pointcurves/55d4f7ed095dfea8f9772208abc83b51.svg index 41a86f90..4a14687e 100644 --- a/docs/images/chapters/pointcurves/55d4f7ed095dfea8f9772208abc83b51.svg +++ b/docs/images/chapters/pointcurves/55d4f7ed095dfea8f9772208abc83b51.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/pointcurves/6f0e2b6494d7dae2ea79a46a499d7ed4.svg b/docs/images/chapters/pointcurves/6f0e2b6494d7dae2ea79a46a499d7ed4.svg index c7598539..82f5fc9b 100644 --- a/docs/images/chapters/pointcurves/6f0e2b6494d7dae2ea79a46a499d7ed4.svg +++ b/docs/images/chapters/pointcurves/6f0e2b6494d7dae2ea79a46a499d7ed4.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/pointcurves/9203537b7dca98ebb2d7017c76100fde.svg b/docs/images/chapters/pointcurves/9203537b7dca98ebb2d7017c76100fde.svg index bc006d26..f8ffee33 100644 --- a/docs/images/chapters/pointcurves/9203537b7dca98ebb2d7017c76100fde.svg +++ b/docs/images/chapters/pointcurves/9203537b7dca98ebb2d7017c76100fde.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/pointvectors/009715fce01e46e7c07f87a8192a8c62.svg b/docs/images/chapters/pointvectors/009715fce01e46e7c07f87a8192a8c62.svg deleted file mode 100644 index 01f08451..00000000 --- a/docs/images/chapters/pointvectors/009715fce01e46e7c07f87a8192a8c62.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/images/chapters/pointvectors/2a55cb2d23c25408aa10cfd8db13278b.svg b/docs/images/chapters/pointvectors/2a55cb2d23c25408aa10cfd8db13278b.svg index fe6be2d6..5d201cd1 100644 --- a/docs/images/chapters/pointvectors/2a55cb2d23c25408aa10cfd8db13278b.svg +++ b/docs/images/chapters/pointvectors/2a55cb2d23c25408aa10cfd8db13278b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/pointvectors/2dd2f89d1c762991a86526490a3deef6.svg b/docs/images/chapters/pointvectors/2dd2f89d1c762991a86526490a3deef6.svg deleted file mode 100644 index d7141093..00000000 --- a/docs/images/chapters/pointvectors/2dd2f89d1c762991a86526490a3deef6.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/images/chapters/pointvectors/3f439e8106eb359d9323c5c2899b326b.svg b/docs/images/chapters/pointvectors/3f439e8106eb359d9323c5c2899b326b.svg new file mode 100644 index 00000000..4a54a1d9 --- /dev/null +++ b/docs/images/chapters/pointvectors/3f439e8106eb359d9323c5c2899b326b.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/chapters/pointvectors/2724b6c42f36b4dbea6962cac844d2c3.png b/docs/images/chapters/pointvectors/5863bd013ad6594f63f8dfa51ff4adc0.png similarity index 100% rename from docs/images/chapters/pointvectors/2724b6c42f36b4dbea6962cac844d2c3.png rename to docs/images/chapters/pointvectors/5863bd013ad6594f63f8dfa51ff4adc0.png diff --git a/docs/images/chapters/pointvectors/5ffdfe2c3619aade280fbc4f43b30faf.svg b/docs/images/chapters/pointvectors/5ffdfe2c3619aade280fbc4f43b30faf.svg new file mode 100644 index 00000000..27cbe48e --- /dev/null +++ b/docs/images/chapters/pointvectors/5ffdfe2c3619aade280fbc4f43b30faf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/chapters/pointvectors/6101b2f8b69ebabba4a2c88456a32aa0.svg b/docs/images/chapters/pointvectors/6101b2f8b69ebabba4a2c88456a32aa0.svg deleted file mode 100644 index 74e46b65..00000000 --- a/docs/images/chapters/pointvectors/6101b2f8b69ebabba4a2c88456a32aa0.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/images/chapters/pointvectors/83c36a23bfe24946e88630d77ea2cb9a.svg b/docs/images/chapters/pointvectors/83c36a23bfe24946e88630d77ea2cb9a.svg new file mode 100644 index 00000000..96925272 --- /dev/null +++ b/docs/images/chapters/pointvectors/83c36a23bfe24946e88630d77ea2cb9a.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/chapters/pointvectors/d236b7b2ad46c8ced1b43bb2a496379a.svg b/docs/images/chapters/pointvectors/d236b7b2ad46c8ced1b43bb2a496379a.svg deleted file mode 100644 index e5204b50..00000000 --- a/docs/images/chapters/pointvectors/d236b7b2ad46c8ced1b43bb2a496379a.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/images/chapters/pointvectors/deec095950fcd1f9c980be76a7093fe6.svg b/docs/images/chapters/pointvectors/deec095950fcd1f9c980be76a7093fe6.svg index 968dac30..5b863668 100644 --- a/docs/images/chapters/pointvectors/deec095950fcd1f9c980be76a7093fe6.svg +++ b/docs/images/chapters/pointvectors/deec095950fcd1f9c980be76a7093fe6.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/pointvectors/f4d72cc162d4cbcc6d6a459fced01cfb.png b/docs/images/chapters/pointvectors/f1b4e81d22f4c44d4618b0f55a1a88c5.png similarity index 100% rename from docs/images/chapters/pointvectors/f4d72cc162d4cbcc6d6a459fced01cfb.png rename to docs/images/chapters/pointvectors/f1b4e81d22f4c44d4618b0f55a1a88c5.png diff --git a/docs/images/chapters/pointvectors3d/59b6ce3fcbf79da171d86e962597097e.png b/docs/images/chapters/pointvectors3d/11c1da2357004bb51cf0c591fc492115.png similarity index 100% rename from docs/images/chapters/pointvectors3d/59b6ce3fcbf79da171d86e962597097e.png rename to docs/images/chapters/pointvectors3d/11c1da2357004bb51cf0c591fc492115.png diff --git a/docs/images/chapters/pointvectors3d/9983328e50c2156c124bb1ea4ad5c05b.png b/docs/images/chapters/pointvectors3d/9983328e50c2156c124bb1ea4ad5c05b.png deleted file mode 100644 index aa8cb533..00000000 Binary files a/docs/images/chapters/pointvectors3d/9983328e50c2156c124bb1ea4ad5c05b.png and /dev/null differ diff --git a/docs/images/chapters/pointvectors3d/f4a2fa1e0204c890b2bff07228ba678d.png b/docs/images/chapters/pointvectors3d/f4a2fa1e0204c890b2bff07228ba678d.png new file mode 100644 index 00000000..1b0e876e Binary files /dev/null and b/docs/images/chapters/pointvectors3d/f4a2fa1e0204c890b2bff07228ba678d.png differ diff --git a/docs/images/chapters/polybezier/408dd95905a5f001179c4da6051e49c5.svg b/docs/images/chapters/polybezier/408dd95905a5f001179c4da6051e49c5.svg index 4365bd35..cdb1acf9 100644 --- a/docs/images/chapters/polybezier/408dd95905a5f001179c4da6051e49c5.svg +++ b/docs/images/chapters/polybezier/408dd95905a5f001179c4da6051e49c5.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/polybezier/8c1b570b3efdfbbc39ddedb4adcaaff6.svg b/docs/images/chapters/polybezier/8c1b570b3efdfbbc39ddedb4adcaaff6.svg index 16c75145..5cc88838 100644 --- a/docs/images/chapters/polybezier/8c1b570b3efdfbbc39ddedb4adcaaff6.svg +++ b/docs/images/chapters/polybezier/8c1b570b3efdfbbc39ddedb4adcaaff6.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/reordering/1244a85c1f9044b6f77cb709c682159c.svg b/docs/images/chapters/reordering/1244a85c1f9044b6f77cb709c682159c.svg index f925f8be..cbe3e70d 100644 --- a/docs/images/chapters/reordering/1244a85c1f9044b6f77cb709c682159c.svg +++ b/docs/images/chapters/reordering/1244a85c1f9044b6f77cb709c682159c.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/reordering/41e184228d85023abdadd6ce2acb54c7.svg b/docs/images/chapters/reordering/41e184228d85023abdadd6ce2acb54c7.svg index 8e3cb407..6c12ec56 100644 --- a/docs/images/chapters/reordering/41e184228d85023abdadd6ce2acb54c7.svg +++ b/docs/images/chapters/reordering/41e184228d85023abdadd6ce2acb54c7.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/reordering/483c89c8726f7fd0dca0b7de339b04bd.svg b/docs/images/chapters/reordering/483c89c8726f7fd0dca0b7de339b04bd.svg index 30538744..e52344a0 100644 --- a/docs/images/chapters/reordering/483c89c8726f7fd0dca0b7de339b04bd.svg +++ b/docs/images/chapters/reordering/483c89c8726f7fd0dca0b7de339b04bd.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/reordering/4debbed5922d2bd84fd322c616872d20.svg b/docs/images/chapters/reordering/4debbed5922d2bd84fd322c616872d20.svg index 5ae35fa5..93db824d 100644 --- a/docs/images/chapters/reordering/4debbed5922d2bd84fd322c616872d20.svg +++ b/docs/images/chapters/reordering/4debbed5922d2bd84fd322c616872d20.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/reordering/773fdc86b686647c823b4f499aca3a35.svg b/docs/images/chapters/reordering/773fdc86b686647c823b4f499aca3a35.svg index 7c1ad8d9..f1cdecd6 100644 --- a/docs/images/chapters/reordering/773fdc86b686647c823b4f499aca3a35.svg +++ b/docs/images/chapters/reordering/773fdc86b686647c823b4f499aca3a35.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/reordering/7a9120997e4a4855ecda435553a7bbdf.svg b/docs/images/chapters/reordering/7a9120997e4a4855ecda435553a7bbdf.svg index 5c854ce4..39d5ef17 100644 --- a/docs/images/chapters/reordering/7a9120997e4a4855ecda435553a7bbdf.svg +++ b/docs/images/chapters/reordering/7a9120997e4a4855ecda435553a7bbdf.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/reordering/b2fda1dcce5bb13317aa42ebf5e7ea6c.svg b/docs/images/chapters/reordering/b2fda1dcce5bb13317aa42ebf5e7ea6c.svg index 90a19093..187f7a5a 100644 --- a/docs/images/chapters/reordering/b2fda1dcce5bb13317aa42ebf5e7ea6c.svg +++ b/docs/images/chapters/reordering/b2fda1dcce5bb13317aa42ebf5e7ea6c.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/reordering/c37918c649befad06de255a6415faf29.png b/docs/images/chapters/reordering/c37918c649befad06de255a6415faf29.png deleted file mode 100644 index 253c3882..00000000 Binary files a/docs/images/chapters/reordering/c37918c649befad06de255a6415faf29.png and /dev/null differ diff --git a/docs/images/chapters/reordering/c4874e1205aabe624e5504abe154eae9.png b/docs/images/chapters/reordering/c4874e1205aabe624e5504abe154eae9.png new file mode 100644 index 00000000..0f8c0f03 Binary files /dev/null and b/docs/images/chapters/reordering/c4874e1205aabe624e5504abe154eae9.png differ diff --git a/docs/images/chapters/reordering/d52f60b331c1b8d6733eb5217adfbc4d.svg b/docs/images/chapters/reordering/d52f60b331c1b8d6733eb5217adfbc4d.svg index a93456b0..8a22673c 100644 --- a/docs/images/chapters/reordering/d52f60b331c1b8d6733eb5217adfbc4d.svg +++ b/docs/images/chapters/reordering/d52f60b331c1b8d6733eb5217adfbc4d.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/reordering/dd8d8d98f66ce9f51b95cbf48225e97b.svg b/docs/images/chapters/reordering/dd8d8d98f66ce9f51b95cbf48225e97b.svg index 60f1b3ff..92f097ac 100644 --- a/docs/images/chapters/reordering/dd8d8d98f66ce9f51b95cbf48225e97b.svg +++ b/docs/images/chapters/reordering/dd8d8d98f66ce9f51b95cbf48225e97b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/reordering/faf29599c9307f930ec28065c96fde2a.svg b/docs/images/chapters/reordering/faf29599c9307f930ec28065c96fde2a.svg index 56f9b36c..ce63f825 100644 --- a/docs/images/chapters/reordering/faf29599c9307f930ec28065c96fde2a.svg +++ b/docs/images/chapters/reordering/faf29599c9307f930ec28065c96fde2a.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/tightbounds/419415bee6ffd7598c035c42de09a94f.png b/docs/images/chapters/tightbounds/9ee5abc64b3fba71e284c70539279d74.png similarity index 100% rename from docs/images/chapters/tightbounds/419415bee6ffd7598c035c42de09a94f.png rename to docs/images/chapters/tightbounds/9ee5abc64b3fba71e284c70539279d74.png diff --git a/docs/images/chapters/tightbounds/ccc77ae1f57d7dd7ce4d5397fe1b140b.png b/docs/images/chapters/tightbounds/ed91133976018ec032d9115344debb36.png similarity index 100% rename from docs/images/chapters/tightbounds/ccc77ae1f57d7dd7ce4d5397fe1b140b.png rename to docs/images/chapters/tightbounds/ed91133976018ec032d9115344debb36.png diff --git a/docs/images/chapters/weightcontrol/02457b19087540dfb144978419524a85.svg b/docs/images/chapters/weightcontrol/02457b19087540dfb144978419524a85.svg index f8263c9e..72a548de 100644 --- a/docs/images/chapters/weightcontrol/02457b19087540dfb144978419524a85.svg +++ b/docs/images/chapters/weightcontrol/02457b19087540dfb144978419524a85.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/weightcontrol/3fd61ab3fe88f694e70f61e4f8ea056b.svg b/docs/images/chapters/weightcontrol/3fd61ab3fe88f694e70f61e4f8ea056b.svg index 45b2f9d8..c5342dd8 100644 --- a/docs/images/chapters/weightcontrol/3fd61ab3fe88f694e70f61e4f8ea056b.svg +++ b/docs/images/chapters/weightcontrol/3fd61ab3fe88f694e70f61e4f8ea056b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/whatis/b5aa26284ba3df74970a95cb047a841d.svg b/docs/images/chapters/whatis/b5aa26284ba3df74970a95cb047a841d.svg index 62ad7c58..8462b235 100644 --- a/docs/images/chapters/whatis/b5aa26284ba3df74970a95cb047a841d.svg +++ b/docs/images/chapters/whatis/b5aa26284ba3df74970a95cb047a841d.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/yforx/efcfe9b48ca4e65eef3d4bf3e4c97bc3.png b/docs/images/chapters/yforx/2fc5c57e5d1ed0eaa1655edc31026252.png similarity index 100% rename from docs/images/chapters/yforx/efcfe9b48ca4e65eef3d4bf3e4c97bc3.png rename to docs/images/chapters/yforx/2fc5c57e5d1ed0eaa1655edc31026252.png diff --git a/docs/images/chapters/yforx/61e43d68f6eb677d0fccd473c121e782.svg b/docs/images/chapters/yforx/61e43d68f6eb677d0fccd473c121e782.svg index ea3499f2..cc7024c3 100644 --- a/docs/images/chapters/yforx/61e43d68f6eb677d0fccd473c121e782.svg +++ b/docs/images/chapters/yforx/61e43d68f6eb677d0fccd473c121e782.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/yforx/9ab2b830fe7fb73350c19bde04e9441b.svg b/docs/images/chapters/yforx/9ab2b830fe7fb73350c19bde04e9441b.svg index 64bde4aa..2cd6c166 100644 --- a/docs/images/chapters/yforx/9ab2b830fe7fb73350c19bde04e9441b.svg +++ b/docs/images/chapters/yforx/9ab2b830fe7fb73350c19bde04e9441b.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/yforx/9df91c28af38c1ba2e2d38d2714c9446.svg b/docs/images/chapters/yforx/9df91c28af38c1ba2e2d38d2714c9446.svg index e6a4f7c2..35f51bc9 100644 --- a/docs/images/chapters/yforx/9df91c28af38c1ba2e2d38d2714c9446.svg +++ b/docs/images/chapters/yforx/9df91c28af38c1ba2e2d38d2714c9446.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/chapters/yforx/dd28d64458d22f4fe89c98568258efcb.png b/docs/images/chapters/yforx/dd28d64458d22f4fe89c98568258efcb.png deleted file mode 100644 index fd80cd22..00000000 Binary files a/docs/images/chapters/yforx/dd28d64458d22f4fe89c98568258efcb.png and /dev/null differ diff --git a/docs/images/chapters/yforx/e469af5bf27a2c27d1dd6fc62a78ac27.png b/docs/images/chapters/yforx/e469af5bf27a2c27d1dd6fc62a78ac27.png new file mode 100644 index 00000000..8c5d0bfe Binary files /dev/null and b/docs/images/chapters/yforx/e469af5bf27a2c27d1dd6fc62a78ac27.png differ diff --git a/docs/index.html b/docs/index.html index eb0e74e3..b2c49c93 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,7 +31,7 @@ - + @@ -500,7 +500,7 @@ If we know the distance between those two points, and we want a new point that is, say, 20% the distance away from the first point (and thus 80% the distance away from the second point) then we can compute that really easily:

- +

So let's look at that in action: the following graphic is interactive in that you can use your up and down arrow keys to increase or decrease the interpolation ratio, to see what happens. We start with three points, which gives us two lines. Linear interpolation over @@ -544,13 +544,13 @@ function". An illustration: Let's say we have a function that maps some value, let's call it x, to some other value, using some kind of number manipulation:

- +

The notation f(x) is the standard way to show that it's a function (by convention called f if we're only listing one) and its output changes based on one variable (in this case, x). Change x, and the output for f(x) changes.

So far, so good. Now, let's look at parametric functions, and how they cheat. Let's take the following two functions:

- +

There's nothing really remarkable about them, they're just a sine and cosine function, but you'll notice the inputs have different names. If we change the value for a, we're not going to change the output value for f(b), since a isn't used in that @@ -559,7 +559,7 @@ @@ -569,7 +569,7 @@ fa(t) and fb(t) with what we usually mean with them for parametric curves, things might be a lot more obvious:

- +

There we go. x/y coordinates, linked through some mystery value t.

So, parametric curves don't define a y coordinate in terms of an x coordinate, like normal functions do, but they instead @@ -597,8 +597,8 @@

@@ -613,7 +613,7 @@ @@ -624,8 +624,8 @@

@@ -640,7 +640,7 @@ @@ -652,8 +652,8 @@

@@ -842,7 +842,7 @@ function Bezier(3,t,w[]): @@ -850,8 +850,8 @@ function Bezier(3,t,w[]):

@@ -939,7 +939,7 @@ function RationalBezier(3,t,w[],r[]): It all has to do with how we run from "the start" of our curve to "the end" of our curve. If we have a value that is a mixture of two other values, then the general formula for this is:

- +

The obvious start and end values here need to be a=1, b=0, so that the mixed value is 100% value 1, and 0% value 2, and a=0, b=1, so that the mixed value is 0% value 1 and 100% value 2. Additionally, we don't want "a" and "b" to be independent: @@ -948,7 +948,7 @@ function RationalBezier(3,t,w[],r[]): and end point, so we need to make sure we can never set "a" and "b" to some values that lead to a mix value that sums to more than 100%. And that's easy:

- +

With this we can guarantee that we never sum above 100%. By restricting a to values in the interval [0,1], we will always be somewhere between our two values (inclusively), and we will always sum to a 100% mix. @@ -1523,7 +1523,7 @@ function drawCurve(points[], t): The general rule for raising an nth order curve to an (n+1)th order curve is as follows (observing that the start and end weights are the same as the start and end weights for the old curve):

- +

However, this rule also has as direct consequence that you cannot generally safely lower a curve from nth order to (n-1)th order, because the control points cannot be "pulled apart" cleanly. We can @@ -1537,18 +1537,18 @@ function drawCurve(points[], t): some things can be done much more easily with matrices than with calculus functions, and this is one of those things. So... let's go!

We start by taking the standard Bézier function, and condensing it a little:

- +

Then, we apply one of those silly (actually, super useful) calculus tricks: since our t value is always between zero and one (inclusive), we know that (1-t) plus t always sums to 1. As such, we can express any value as a sum of t and 1-t:

- +

So, with that seemingly trivial observation, we rewrite that Bézier function by splitting it up into a sum of a (1-t) and t component:

- +

So far so good. Now, to see why we did this, let's write out the (1-t) and t parts, and see what that gives us. I promise, it's about to make sense. We start with (1-t): @@ -1556,8 +1556,8 @@ function drawCurve(points[], t):

@@ -1570,8 +1570,8 @@ function drawCurve(points[], t):

@@ -1586,7 +1586,7 @@ function drawCurve(points[], t): @@ -1594,13 +1594,13 @@ function drawCurve(points[], t): And this is where we switch over from calculus to linear algebra, and matrices: we can now express this relation between Bézier(n,t) and Bézier(n+1,t) as a very simple matrix multiplication:

- +

where the matrix M is an n+1 by n matrix, and looks like:

@@ -1619,8 +1619,8 @@ function drawCurve(points[], t):

The steps taken here are:

@@ -1649,7 +1649,7 @@ function drawCurve(points[], t): Scripts are disabled. Showing fallback image. - + @@ -1847,9 +1847,9 @@ function drawCurve(points[], t):

@@ -1858,16 +1858,9 @@ function drawCurve(points[], t):

-

@@ -1877,9 +1870,9 @@ function drawCurve(points[], t):

@@ -1895,7 +1888,7 @@ function drawCurve(points[], t): @@ -1903,7 +1896,7 @@ function drawCurve(points[], t): @@ -1935,7 +1928,7 @@ function drawCurve(points[], t): > Scripts are disabled. Showing fallback image. - + @@ -1948,7 +1941,7 @@ function drawCurve(points[], t): > Scripts are disabled. Showing fallback image. - + @@ -2022,7 +2015,7 @@ function drawCurve(points[], t): Scripts are disabled. Showing fallback image. - + @@ -2134,7 +2127,7 @@ function drawCurve(points[], t): Scripts are disabled. Showing fallback image. - + @@ -2183,10 +2176,11 @@ function drawCurve(points[], t): > Scripts are disabled. Showing fallback image. - + +

 

Scripts are disabled. Showing fallback image. - + @@ -2221,15 +2215,15 @@ function drawCurve(points[], t):

And then we turn this into our solution for t using basic arithmetics:

@@ -2247,8 +2241,8 @@ function drawCurve(points[], t):

@@ -2264,16 +2258,16 @@ function drawCurve(points[], t):

And then, using these v values, we can find out what our a, b, and c should be:

@@ -2284,7 +2278,7 @@ function drawCurve(points[], t): class="LaTeX SVG" src="./images/chapters/extremities/d9e66caeb45b6643112ce3d971b17e5b.svg" width="308px" - height="63px" + height="64px" loading="lazy" />

Easy-peasy. We can now almost trivially find the roots by plugging those values into the quadratic formula.

@@ -2306,8 +2300,8 @@ function drawCurve(points[], t):

@@ -2462,8 +2456,8 @@ function getCubicRoots(pa, pb, pc, pd) {

(The Wikipedia article has a decent animation for this process, so I will not add a graphic for that here)

@@ -2496,7 +2490,7 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - +
@@ -2510,7 +2504,7 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + @@ -2547,14 +2541,14 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + Scripts are disabled. Showing fallback image. - + @@ -2582,37 +2576,37 @@ function getCubicRoots(pa, pb, pc, pd) { rotate the curves so that the last point always lies on the x-axis, too, making its coordinate (...,0). This further simplifies the function for the y-component to an n-2 term function. For instance, if we have a cubic curve such as this:

- +

Then translating it so that the first coordinate lies on (0,0), moving all x coordinates by -120, and all y coordinates by -160, gives us:

- +

If we then rotate the curve so that its end point lies on the x-axis, the coordinates (integer-rounded for illustrative purposes here) become:

- +

If we drop all the zero-terms, this gives us:

- +

We can see that our original curve definition has been simplified considerably. The following graphics illustrate the result of aligning our example curves to the x-axis, with the cubic case using the coordinates that were just used in the example formulae:

-
- - - Scripts are disabled. Showing fallback image. - - - - - Scripts are disabled. Showing fallback image. - - -
+ + + Scripts are disabled. Showing fallback image. + + + +

 

+ + + Scripts are disabled. Showing fallback image. + +

@@ -2635,14 +2629,14 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + Scripts are disabled. Showing fallback image. - + @@ -2673,7 +2667,7 @@ function getCubicRoots(pa, pb, pc, pd) { inflection, and we can find out where those happen relatively easily.

What we need to do is solve a simple equation:

- +

What we're saying here is that given the curvature function C(t), we want to know for which values of t this function is zero, meaning there is no "curvature", which will be exactly at the point between our circle being on one side of the curve, and our @@ -2682,8 +2676,8 @@ function getCubicRoots(pa, pb, pc, pd) {

@@ -2706,7 +2700,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2714,7 +2708,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2725,8 +2719,8 @@ function getCubicRoots(pa, pb, pc, pd) {

@@ -2743,7 +2737,7 @@ function getCubicRoots(pa, pb, pc, pd) { class="LaTeX SVG" src="./images/chapters/inflections/1679090a942a43d27f886f236fc8d62b.svg" width="533px" - height="20px" + height="19px" loading="lazy" />

@@ -2753,7 +2747,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2761,8 +2755,8 @@ function getCubicRoots(pa, pb, pc, pd) {

@@ -2776,7 +2770,7 @@ function getCubicRoots(pa, pb, pc, pd) { Scripts are disabled. Showing fallback image. - + @@ -2834,8 +2828,8 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2847,8 +2841,8 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2857,7 +2851,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2914,12 +2908,12 @@ function getCubicRoots(pa, pb, pc, pd) { cx + dy), which means we can't do translation, since that requires we end up with some kind of (x + a, y + b). If we add a bogus z coordinate that is always 1, then we can suddenly add arbitrary values. For example:

- +

Sweet! z stays 1, so we can effectively ignore it entirely, but we added some plain values to our x and y coordinates. So, if we want to subtract p1.x and p1.y, we use:

- +

Running all our coordinates through this transformation gives a new set of coordinates, let's call those U, where the first coordinate lies on (0,0), and the rest is still somewhat free. Our next job is to make sure point 2 ends up lying on the @@ -2927,12 +2921,12 @@ function getCubicRoots(pa, pb, pc, pd) { currently have. This is called shearing, and the typical x-shear matrix and its transformation looks like this:

- +

So we want some shearing value that, when multiplied by y, yields -x, so our x coordinate becomes zero. That value is simply -x/y, because *-x/y * y = -x*. Done:

- +

Now, running this on all our points generates a new set of coordinates, let's call those V, which now have point 1 on (0,0) and point 2 on (0, some-value), and we wanted it at (0,1), so we need to @@ -2940,7 +2934,7 @@ function getCubicRoots(pa, pb, pc, pd) { point 3 to end up on (1,1), so we can also scale x to make sure its x-coordinate will be 1 after we run the transform. That means we'll be x-scaling by 1/point3x, and y-scaling by point2y. This is really easy:

- +

Then, finally, this generates a new set of coordinates, let's call those W, of which point 1 lies on (0,0), point 2 lies on (0,1), and point three lies on (1, ...) so all that's left is to make sure point 3 ends up at (1,1) - but we can't scale! Point 2 is already in the @@ -2949,13 +2943,13 @@ function getCubicRoots(pa, pb, pc, pd) { but y-shearing. Additionally, we don't actually want to end up at zero (which is what we did before) so we need to shear towards an offset, in this case 1:

- +

And this generates our final set of four coordinates. Of these, we already know that points 1 through 3 are (0,0), (0,1) and (1,1), and only the last coordinate is "free". In fact, given any four starting coordinates, the resulting "transformation mapped" coordinate will be:

- +

Okay, well, that looks plain ridiculous, but: notice that every coordinate value is being offset by the initial translation, and also notice that a lot of terms in that expression are repeated. Even though the maths looks crazy as a single expression, we can just @@ -2965,13 +2959,13 @@ function getCubicRoots(pa, pb, pc, pd) { First, let's just do that translation step as a "preprocessing" operation so we don't have to subtract the values all the time. What does that leave?

- +

Suddenly things look a lot simpler: the mapped x is fairly straight forward to compute, and we see that the mapped y actually contains the mapped x in its entirety, so we'll have that part already available when we need to evaluate it. In fact, let's pull out all those common factors to see just how simple this is:

- +

That's kind of super-simple to write out in code, I think you'll agree. Coding math tends to be easier than the formulae initially make it look! @@ -3033,7 +3027,7 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + @@ -3046,17 +3040,17 @@ function getCubicRoots(pa, pb, pc, pd) { cubic case either: because of the kind of curve we're starting with, we know there is only root, simplifying the code we need!

First, let's look at the function for x(t):

- +

We can rewrite this to a plain polynomial form, by just fully writing out the expansion and then collecting the polynomial factors, as:

- +

Nothing special here: that's a standard cubic polynomial in "power" form (i.e. all the terms are ordered by their power of t). So, given that a, b, c, d, and x(t) are all known constants, we can trivially rewrite this (by moving the x(t) across the equal sign) as:

- +

You might be wondering "where did all the other 'minus x' for all the other values a, b, c, and d go?" and the answer there is that they all cancel out, so the only one we actually need to subtract is the one at the end. Handy! So now we just solve this equation using @@ -3080,7 +3074,7 @@ y = curve.get(t).y Scripts are disabled. Showing fallback image. - + @@ -3097,9 +3091,9 @@ y = curve.get(t).y fy(t), then the length of the curve, measured from start point to some point t = z, is computed using the following seemingly straight forward (if a bit overwhelming) formula:

- +

or, more commonly written using Leibnitz notation as:

- +

This formula says that the length of a parametric curve is in fact equal to the area underneath a function that looks a remarkable amount like Pythagoras' rule for computing the diagonal of a straight angled triangle. This sounds pretty simple, right? Sadly, @@ -3125,7 +3119,7 @@ y = curve.get(t).y works, I can recommend the University of South Florida video lecture on the procedure, linked in this very paragraph. The general solution we're looking for is the following:

- +

In plain text: an integral function can always be treated as the sum of an (infinite) number of (infinitely thin) rectangular strips sitting "under" the function's plotted graph. To illustrate this idea, the following graph shows the integral for a sinusoid function. The @@ -3188,8 +3182,8 @@ y = curve.get(t).y

@@ -3203,15 +3197,15 @@ y = curve.get(t).y values, for any n, so if we want to approximate our integral with only two terms (which is a bit low, really) then these tables would tell us that for n=2 we must use the following values:

- +

Which means that in order for us to approximate the integral, we must plug these values into the approximate function, which gives us:

@@ -3230,7 +3224,7 @@ y = curve.get(t).y Scripts are disabled. Showing fallback image. - + @@ -3259,7 +3253,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3274,7 +3268,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3349,12 +3343,12 @@ y = curve.get(t).y we can find a lot of insight.

So, what does the function look like? This:

- +

Which is really just a "short form" that glosses over the fact that we're dealing with functions of t, so let's expand that a tiny bit:

- +

And while that's a litte more verbose, it's still just as simple to work with as the first function: the curvature at some point on any (and this cannot be overstated: any) curve is a ratio between the first and second derivative cross product, and something that @@ -3389,7 +3383,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3413,7 +3407,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3743,7 +3737,7 @@ lli = function(line1, line2): So, how can we compute C? We start with our observation that C always lies somewhere between the start and ends points, so logically C will have a function that interpolates between those two coordinates:

- +

If we can figure out what the function u(t) looks like, we'll be done. Although we do need to remember that this u(t) will have a different for depending on whether we're working with quadratic or cubic curves. @@ -3752,9 +3746,9 @@ lli = function(line1, line2): > (with thanks to Boris Zbarsky) shows us the following two formulae:

- +

And

- +

So, if we know the start and end coordinates, and we know the t value, we know C, without having to calculate the A or even B coordinates. In fact, we can do the same for the ratio function: as another function of @@ -3762,18 +3756,18 @@ lli = function(line1, line2): pure function of t, too.

We start by observing that, given A, B, and C, the following always holds:

- +

Working out the maths for this, we see the following two formulae for quadratic and cubic curves:

- +

And

- +

Which now leaves us with some powerful tools: given thee points (start, end, and "some point on the curve"), as well as a t value, we can contruct curves: we can compute C using the start and end points, and our u(t) function, and once we have C, we can use our on-curve point (B) and the ratio(t) function to find A:

- +

With A found, finding e1 and e2 for quadratic curves is a matter of running the linear interpolation with t between start and A to yield e1, and between A and end to yield @@ -3781,9 +3775,9 @@ lli = function(line1, line2): distance ratio between e1 to B and B to e2 is the Bézier ratio (1-t):t, we can reverse engineer v1 and v2:

- +

And then reverse engineer the curve's control control points:

- +

So: if we have a curve's start and end point, then for any t value we implicitly know all the ABC values, which (combined with an educated guess on appropriate e1 and e2 coordinates for cubic curves) gives us the necessary information @@ -3809,8 +3803,8 @@ lli = function(line1, line2):

@@ -3855,8 +3849,8 @@ lli = function(line1, line2):

@@ -3870,8 +3864,8 @@ lli = function(line1, line2):

@@ -3882,8 +3876,8 @@ lli = function(line1, line2):

The result of this approach looks as follows:

@@ -4000,9 +3994,9 @@ for (coordinate, index) in LUT: initial B coordinate. We don't even need the latter: with our t value and "whever the cursor is" as target B, we can compute the associated C:

- +

And then the associated A:

- +

And we're done, because that's our new quadratic control point!

And then we (trivially) rearrange the terms across multiple lines:

@@ -4150,7 +4144,7 @@ for (coordinate, index) in LUT: @@ -4158,7 +4152,7 @@ for (coordinate, index) in LUT: @@ -4166,15 +4160,15 @@ for (coordinate, index) in LUT:

Which we can then decompose:

@@ -4182,7 +4176,7 @@ for (coordinate, index) in LUT: @@ -4200,7 +4194,7 @@ for (coordinate, index) in LUT: @@ -4228,7 +4222,7 @@ for (coordinate, index) in LUT: @@ -4240,7 +4234,7 @@ for (coordinate, index) in LUT: @@ -4256,7 +4250,7 @@ for (coordinate, index) in LUT: @@ -4267,7 +4261,7 @@ for (coordinate, index) in LUT: @@ -4280,16 +4274,16 @@ for (coordinate, index) in LUT:

In which we can replace the rather cumbersome "squaring" operation with a more conventional matrix equivalent:

@@ -4305,7 +4299,7 @@ for (coordinate, index) in LUT: @@ -4313,7 +4307,7 @@ for (coordinate, index) in LUT: @@ -4321,8 +4315,8 @@ for (coordinate, index) in LUT:

@@ -4333,8 +4327,8 @@ for (coordinate, index) in LUT:

@@ -4366,8 +4360,8 @@ for (coordinate, index) in LUT:

@@ -4446,8 +4440,8 @@ for (coordinate, index) in LUT:

@@ -4505,7 +4499,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4531,8 +4525,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4544,16 +4538,16 @@ for p = 1 to points.length-3 (inclusive):

Thus:

@@ -4565,8 +4559,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4576,7 +4570,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4584,24 +4578,24 @@ for p = 1 to points.length-3 (inclusive):

and merge the matrices:

This looks a lot like the Bézier matrix form, which as we saw in the chapter on Bézier curves, should look like this:

So, if we want to express a Catmull-Rom curve using a Bézier curve, we'll need to turn this Catmull-Rom bit:

@@ -4609,39 +4603,39 @@ for p = 1 to points.length-3 (inclusive): class="LaTeX SVG" src="./images/chapters/catmullconv/b21386f86bef8894f108c5441dad10de.svg" width="227px" - height="84px" + height="76px" loading="lazy" />

Into something that looks like this:

And the way we do that is with a fairly straight forward bit of matrix rewriting. We start with the equality we need to ensure:

Then we remove the coordinate vector from both sides without affecting the equality:

Then we can "get rid of" the Bézier matrix on the right by left-multiply both with the inverse of the Bézier matrix:

@@ -4651,16 +4645,16 @@ for p = 1 to points.length-3 (inclusive):

And now we're basically done. We just multiply those two matrices and we know what V is:

We now have the final piece of our function puzzle. Let's run through each step.

@@ -4670,7 +4664,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4680,8 +4674,8 @@ for p = 1 to points.length-3 (inclusive):
    @@ -4690,8 +4684,8 @@ for p = 1 to points.length-3 (inclusive):
      @@ -4701,7 +4695,7 @@ for p = 1 to points.length-3 (inclusive): class="LaTeX SVG" src="./images/chapters/catmullconv/79e333cd0c569657eea033b04fb5e61b.svg" width="348px" - height="84px" + height="76px" loading="lazy" />
        @@ -4710,8 +4704,8 @@ for p = 1 to points.length-3 (inclusive):
          @@ -4720,8 +4714,8 @@ for p = 1 to points.length-3 (inclusive):

          And we're done: we finally know how to convert these two curves!

          @@ -4734,8 +4728,8 @@ for p = 1 to points.length-3 (inclusive):

          @@ -4745,16 +4739,16 @@ for p = 1 to points.length-3 (inclusive):

          Or, if your API allows you to specify Catmull-Rom curves using plain coordinates:

@@ -4827,13 +4821,13 @@ for p = 1 to points.length-3 (inclusive): make things a little better. We'll start by linking up control points by ensuring that the "incoming" derivative at an on-curve point is the same as it's "outgoing" derivative:

- +

We can effect this quite easily, because we know that the vector from a curve's last control point to its last on-curve point is equal to the derivative vector. If we want to ensure that the first control point of the next curve matches that, all we have to do is mirror that last control point through the last on-curve point. And mirroring any point A through any point B is really simple:

- +

So let's implement that and see what it gets us. The following two graphics show a quadratic and a cubic poly-Bézier curve again, but this time moving the control points around moves others, too. However, you might see something unexpected going on for quadratic curves... @@ -4994,8 +4988,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5007,8 +5001,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5021,7 +5015,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5033,8 +5027,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5043,8 +5037,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5237,33 +5231,33 @@ for p = 1 to points.length-3 (inclusive): We start out with our start and end point, and for convenience we will place them on a unit circle (a circle around 0,0 with radius 1), at some angle φ:

- +

What we want to find is the intersection of the tangents, so we want a point C such that:

- +

i.e. we want a point that lies on the vertical line through S (at some distance a from S) and also lies on the tangent line through E (at some distance b from E). Solving this gives us:

- +

First we solve for b:

- +

which yields:

- +

which we can then substitute in the expression for a:

- +

A quick check shows that plugging these values for a and b into the expressions for Cx and Cy give the same x/y coordinates for both "a away from A" and "b away from B", so let's continue: now that we know the coordinate values for C, we know where our on-curve point T for t=0.5 (or angle φ/2) is, because we can just evaluate the Bézier polynomial, and we know where the circle arc's actual point P is for angle φ/2:

- +

We compute T, observing that if t=0.5, the polynomial values (1-t)², 2(1-t)t, and t² are 0.25, 0.5, and 0.25 respectively:

- +

Which, worked out for the x and y components, gives:

- +

And the distance between these two is the standard Euclidean distance:

- +

So, what does this distance function look like when we plot it for a number of ranges for the angle φ, such as a half circle, quarter circle and eighth circle? @@ -5304,7 +5298,7 @@ for p = 1 to points.length-3 (inclusive): In fact, let's flip the function around, so that if we plug in the precision error, labelled ε, we get back the maximum angle for that precision:

- +

And frankly, things are starting to look a bit ridiculous at this point, we're doing way more maths than we've ever done, but thankfully this is as far as we need the maths to take us: If we plug in the precisions 0.1, 0.01, 0.001 and 0.0001 we get the radians values 1.748, @@ -5411,7 +5405,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5423,7 +5417,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5431,7 +5425,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5468,8 +5462,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5491,8 +5485,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5502,15 +5496,15 @@ for p = 1 to points.length-3 (inclusive):

@@ -5520,8 +5514,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5531,8 +5525,8 @@ for p = 1 to points.length-3 (inclusive):

And that's it, we have all four points now for an approximation of an arbitrary circular arc with angle φ.

@@ -5542,7 +5536,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5550,7 +5544,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5561,15 +5555,15 @@ for p = 1 to points.length-3 (inclusive):

Which, in decimal values, rounded to six significant digits, is:

@@ -5758,7 +5752,7 @@ for p = 1 to points.length-3 (inclusive): >, we can compute a point on the curve for some value t in the interval [0,1] (where 0 is the start of the curve, and 1 the end, just like for Bézier curves), by evaluating the following function:

- +

Which, honestly, doesn't tell us all that much. All we can see is that a point on a B-Spline curve is defined as "a mix of all the control points, weighted somehow", where the weighting is achieved through the N(...) function, subscripted with an obvious parameter @@ -5773,14 +5767,14 @@ for p = 1 to points.length-3 (inclusive): k subscript to the N() function applies to.

Then the N() function itself. What does it look like?

- +

So this is where we see the interpolation: N(t) for an (i,k) pair (that is, for a step in the above summation, on a specific knot interval) is a mix between N(t) for (i,k-1) and N(t) for (i+1,k-1), so we see that this is a recursive iteration where i goes up, and k goes down, so it seem reasonable to expect that this recursion has to stop at some point; obviously, it does, and specifically it does so for the following i/k values:

- +

And this function finally has a straight up evaluation: if a t value lies within a knot-specific interval once we reach a k=1 value, it "counts", otherwise it doesn't. We did cheat a little, though, because for all these values we need to scale @@ -5797,12 +5791,12 @@ for p = 1 to points.length-3 (inclusive): Carl de Boor — came to a mathematically pleasing solution: to compute a point P(t), we can compute this point by evaluating d(t) on a curve section between knots i and i+1:

- +

This is another recursive function, with k values decreasing from the curve order to 1, and the value α (alpha) defined by:

- +

That looks complicated, but it's not. Computing alpha is just a fraction involving known, plain numbers. And, once we have our alpha value, we also have (1-alpha) because it's a trivial subtraction. Computing the d() function is thus mostly a @@ -5810,7 +5804,7 @@ for p = 1 to points.length-3 (inclusive): recursion might see computationally expensive, the total algorithm is cheap, as each step only involves very simple maths.

Of course, the recursion does need a stop condition:

- +

So, we actually see two stopping conditions: either i becomes 0, in which case d() is zero, or k becomes zero, in which case we get the same "either 1 or 0" that we saw in the N() function above. @@ -5820,7 +5814,7 @@ for p = 1 to points.length-3 (inclusive): Casteljau's algorithm. For instance, if we write out d() for i=3 and k=3, we get the following recursion diagram:

- +

That is, we compute d(3,3) as a mixture of d(2,3) and d(2,2), where those two are themselves a mixture of d(1,3) and d(1,2), and d(1,2) and d(1,1), respectively, which are diff --git a/docs/ja-JP/index.html b/docs/ja-JP/index.html index 84bc056f..7fffc027 100644 --- a/docs/ja-JP/index.html +++ b/docs/ja-JP/index.html @@ -33,7 +33,7 @@ - + @@ -499,27 +499,27 @@

ベジエ曲線は「パラメトリック」関数の一種です。数学的に言えば、パラメトリック関数というのはインチキです。というのも、「関数」はきっちり定義された用語であり、いくつかの入力を1つの出力に対応させる写像を表すものだからです。いくつかの数値を入れると、1つの数値が出てきます。入れる数値が変わっても、出てくる数値はやはり1つだけです。パラメトリック関数はインチキです。基本的には「じゃあわかった、値を複数個出したいから、関数を複数個使うことにするよ」ということです。例として、ある値xに何らかの操作を行い、別の値へと写す関数があるとします。

- +

f(x)という記法は、これが関数(1つしかない場合は慣習的にfと呼びます)であり、その出力が1つの変数(この場合はxです)に応じて変化する、ということを示す標準的な方法です。xを変化させると、f(x)の出力が変化します。

ここまでは順調です。では、パラメトリック関数について、これがどうインチキなのかを見てみましょう。以下の2つの関数を考えます。

- +

注目すべき箇所は特に何もありません。ただの正弦関数と余弦関数です。ただし、入力が別々の名前になっていることに気づくでしょう。仮にaの値を変えたとしても、f(b)の出力の値は変わらないはずです。なぜなら、こちらの関数にはaは使われていないからです。パラメトリック関数は、これを変えてしまうのでインチキなのです。パラメトリック関数においては、どの関数も変数を共有しています。例えば、

複数の関数がありますが、変数は1つだけです。tの値を変えた場合、fa(t)fb(t)の両方の出力が変わります。これがどのように役に立つのか、疑問に思うかもしれません。しかし、実際には答えは至ってシンプルです。fa(t)fb(t)のラベルを、パラメトリック曲線の表示によく使われているもので置き換えてやれば、ぐっとはっきりするかと思います。

- +

きました。x/y座標です。謎の値tを通して繫がっています。

というわけで、普通の関数ではy座標をx座標によって定義しますが、パラメトリック曲線ではそうではなく、座標の値を「制御」変数と結びつけます。tの値を変化させるたびに2つの値が変化するので、これをグラフ上の座標 @@ -541,8 +541,8 @@

@@ -750,7 +750,7 @@ function Bezier(3,t,w[]): @@ -758,8 +758,8 @@ function Bezier(3,t,w[]):

@@ -1359,7 +1359,7 @@ function drawCurve(points[], t): The general rule for raising an nth order curve to an (n+1)th order curve is as follows (observing that the start and end weights are the same as the start and end weights for the old curve):

- +

However, this rule also has as direct consequence that you cannot generally safely lower a curve from nth order to (n-1)th order, because the control points cannot be "pulled apart" cleanly. We can @@ -1373,18 +1373,18 @@ function drawCurve(points[], t): some things can be done much more easily with matrices than with calculus functions, and this is one of those things. So... let's go!

We start by taking the standard Bézier function, and condensing it a little:

- +

Then, we apply one of those silly (actually, super useful) calculus tricks: since our t value is always between zero and one (inclusive), we know that (1-t) plus t always sums to 1. As such, we can express any value as a sum of t and 1-t:

- +

So, with that seemingly trivial observation, we rewrite that Bézier function by splitting it up into a sum of a (1-t) and t component:

- +

So far so good. Now, to see why we did this, let's write out the (1-t) and t parts, and see what that gives us. I promise, it's about to make sense. We start with (1-t): @@ -1392,8 +1392,8 @@ function drawCurve(points[], t):

@@ -1406,8 +1406,8 @@ function drawCurve(points[], t):

@@ -1422,7 +1422,7 @@ function drawCurve(points[], t): @@ -1430,13 +1430,13 @@ function drawCurve(points[], t): And this is where we switch over from calculus to linear algebra, and matrices: we can now express this relation between Bézier(n,t) and Bézier(n+1,t) as a very simple matrix multiplication:

- +

where the matrix M is an n+1 by n matrix, and looks like:

@@ -1455,8 +1455,8 @@ function drawCurve(points[], t):

The steps taken here are:

@@ -1485,7 +1485,7 @@ function drawCurve(points[], t): Scripts are disabled. Showing fallback image. - + @@ -1683,9 +1683,9 @@ function drawCurve(points[], t):

@@ -1694,16 +1694,9 @@ function drawCurve(points[], t):

-

@@ -1713,9 +1706,9 @@ function drawCurve(points[], t):

@@ -1731,7 +1724,7 @@ function drawCurve(points[], t): @@ -1739,7 +1732,7 @@ function drawCurve(points[], t): @@ -1771,7 +1764,7 @@ function drawCurve(points[], t): > Scripts are disabled. Showing fallback image. - + @@ -1784,7 +1777,7 @@ function drawCurve(points[], t): > Scripts are disabled. Showing fallback image. - + @@ -1858,7 +1851,7 @@ function drawCurve(points[], t): Scripts are disabled. Showing fallback image. - + @@ -1970,7 +1963,7 @@ function drawCurve(points[], t): Scripts are disabled. Showing fallback image. - + @@ -2019,10 +2012,11 @@ function drawCurve(points[], t): > Scripts are disabled. Showing fallback image. - + +

 

Scripts are disabled. Showing fallback image. - + @@ -2057,15 +2051,15 @@ function drawCurve(points[], t):

And then we turn this into our solution for t using basic arithmetics:

@@ -2083,8 +2077,8 @@ function drawCurve(points[], t):

@@ -2100,16 +2094,16 @@ function drawCurve(points[], t):

And then, using these v values, we can find out what our a, b, and c should be:

@@ -2120,7 +2114,7 @@ function drawCurve(points[], t): class="LaTeX SVG" src="./images/chapters/extremities/d9e66caeb45b6643112ce3d971b17e5b.svg" width="308px" - height="63px" + height="64px" loading="lazy" />

Easy-peasy. We can now almost trivially find the roots by plugging those values into the quadratic formula.

@@ -2142,8 +2136,8 @@ function drawCurve(points[], t):

@@ -2298,8 +2292,8 @@ function getCubicRoots(pa, pb, pc, pd) {

(The Wikipedia article has a decent animation for this process, so I will not add a graphic for that here)

@@ -2332,7 +2326,7 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - +
@@ -2346,7 +2340,7 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + @@ -2383,14 +2377,14 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + Scripts are disabled. Showing fallback image. - + @@ -2418,37 +2412,37 @@ function getCubicRoots(pa, pb, pc, pd) { rotate the curves so that the last point always lies on the x-axis, too, making its coordinate (...,0). This further simplifies the function for the y-component to an n-2 term function. For instance, if we have a cubic curve such as this:

- +

Then translating it so that the first coordinate lies on (0,0), moving all x coordinates by -120, and all y coordinates by -160, gives us:

- +

If we then rotate the curve so that its end point lies on the x-axis, the coordinates (integer-rounded for illustrative purposes here) become:

- +

If we drop all the zero-terms, this gives us:

- +

We can see that our original curve definition has been simplified considerably. The following graphics illustrate the result of aligning our example curves to the x-axis, with the cubic case using the coordinates that were just used in the example formulae:

-
- - - Scripts are disabled. Showing fallback image. - - - - - Scripts are disabled. Showing fallback image. - - -
+ + + Scripts are disabled. Showing fallback image. + + + +

 

+ + + Scripts are disabled. Showing fallback image. + +

@@ -2471,14 +2465,14 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + Scripts are disabled. Showing fallback image. - + @@ -2509,7 +2503,7 @@ function getCubicRoots(pa, pb, pc, pd) { inflection, and we can find out where those happen relatively easily.

What we need to do is solve a simple equation:

- +

What we're saying here is that given the curvature function C(t), we want to know for which values of t this function is zero, meaning there is no "curvature", which will be exactly at the point between our circle being on one side of the curve, and our @@ -2518,8 +2512,8 @@ function getCubicRoots(pa, pb, pc, pd) {

@@ -2542,7 +2536,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2550,7 +2544,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2561,8 +2555,8 @@ function getCubicRoots(pa, pb, pc, pd) {

@@ -2579,7 +2573,7 @@ function getCubicRoots(pa, pb, pc, pd) { class="LaTeX SVG" src="./images/chapters/inflections/1679090a942a43d27f886f236fc8d62b.svg" width="533px" - height="20px" + height="19px" loading="lazy" />

@@ -2589,7 +2583,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2597,8 +2591,8 @@ function getCubicRoots(pa, pb, pc, pd) {

@@ -2612,7 +2606,7 @@ function getCubicRoots(pa, pb, pc, pd) { Scripts are disabled. Showing fallback image. - + @@ -2670,8 +2664,8 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2683,8 +2677,8 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2693,7 +2687,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2750,12 +2744,12 @@ function getCubicRoots(pa, pb, pc, pd) { cx + dy), which means we can't do translation, since that requires we end up with some kind of (x + a, y + b). If we add a bogus z coordinate that is always 1, then we can suddenly add arbitrary values. For example:

- +

Sweet! z stays 1, so we can effectively ignore it entirely, but we added some plain values to our x and y coordinates. So, if we want to subtract p1.x and p1.y, we use:

- +

Running all our coordinates through this transformation gives a new set of coordinates, let's call those U, where the first coordinate lies on (0,0), and the rest is still somewhat free. Our next job is to make sure point 2 ends up lying on the @@ -2763,12 +2757,12 @@ function getCubicRoots(pa, pb, pc, pd) { currently have. This is called shearing, and the typical x-shear matrix and its transformation looks like this:

- +

So we want some shearing value that, when multiplied by y, yields -x, so our x coordinate becomes zero. That value is simply -x/y, because *-x/y * y = -x*. Done:

- +

Now, running this on all our points generates a new set of coordinates, let's call those V, which now have point 1 on (0,0) and point 2 on (0, some-value), and we wanted it at (0,1), so we need to @@ -2776,7 +2770,7 @@ function getCubicRoots(pa, pb, pc, pd) { point 3 to end up on (1,1), so we can also scale x to make sure its x-coordinate will be 1 after we run the transform. That means we'll be x-scaling by 1/point3x, and y-scaling by point2y. This is really easy:

- +

Then, finally, this generates a new set of coordinates, let's call those W, of which point 1 lies on (0,0), point 2 lies on (0,1), and point three lies on (1, ...) so all that's left is to make sure point 3 ends up at (1,1) - but we can't scale! Point 2 is already in the @@ -2785,13 +2779,13 @@ function getCubicRoots(pa, pb, pc, pd) { but y-shearing. Additionally, we don't actually want to end up at zero (which is what we did before) so we need to shear towards an offset, in this case 1:

- +

And this generates our final set of four coordinates. Of these, we already know that points 1 through 3 are (0,0), (0,1) and (1,1), and only the last coordinate is "free". In fact, given any four starting coordinates, the resulting "transformation mapped" coordinate will be:

- +

Okay, well, that looks plain ridiculous, but: notice that every coordinate value is being offset by the initial translation, and also notice that a lot of terms in that expression are repeated. Even though the maths looks crazy as a single expression, we can just @@ -2801,13 +2795,13 @@ function getCubicRoots(pa, pb, pc, pd) { First, let's just do that translation step as a "preprocessing" operation so we don't have to subtract the values all the time. What does that leave?

- +

Suddenly things look a lot simpler: the mapped x is fairly straight forward to compute, and we see that the mapped y actually contains the mapped x in its entirety, so we'll have that part already available when we need to evaluate it. In fact, let's pull out all those common factors to see just how simple this is:

- +

That's kind of super-simple to write out in code, I think you'll agree. Coding math tends to be easier than the formulae initially make it look! @@ -2869,7 +2863,7 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + @@ -2882,17 +2876,17 @@ function getCubicRoots(pa, pb, pc, pd) { cubic case either: because of the kind of curve we're starting with, we know there is only root, simplifying the code we need!

First, let's look at the function for x(t):

- +

We can rewrite this to a plain polynomial form, by just fully writing out the expansion and then collecting the polynomial factors, as:

- +

Nothing special here: that's a standard cubic polynomial in "power" form (i.e. all the terms are ordered by their power of t). So, given that a, b, c, d, and x(t) are all known constants, we can trivially rewrite this (by moving the x(t) across the equal sign) as:

- +

You might be wondering "where did all the other 'minus x' for all the other values a, b, c, and d go?" and the answer there is that they all cancel out, so the only one we actually need to subtract is the one at the end. Handy! So now we just solve this equation using @@ -2916,7 +2910,7 @@ y = curve.get(t).y Scripts are disabled. Showing fallback image. - + @@ -2933,9 +2927,9 @@ y = curve.get(t).y fy(t), then the length of the curve, measured from start point to some point t = z, is computed using the following seemingly straight forward (if a bit overwhelming) formula:

- +

or, more commonly written using Leibnitz notation as:

- +

This formula says that the length of a parametric curve is in fact equal to the area underneath a function that looks a remarkable amount like Pythagoras' rule for computing the diagonal of a straight angled triangle. This sounds pretty simple, right? Sadly, @@ -2961,7 +2955,7 @@ y = curve.get(t).y works, I can recommend the University of South Florida video lecture on the procedure, linked in this very paragraph. The general solution we're looking for is the following:

- +

In plain text: an integral function can always be treated as the sum of an (infinite) number of (infinitely thin) rectangular strips sitting "under" the function's plotted graph. To illustrate this idea, the following graph shows the integral for a sinusoid function. The @@ -3024,8 +3018,8 @@ y = curve.get(t).y

@@ -3039,15 +3033,15 @@ y = curve.get(t).y values, for any n, so if we want to approximate our integral with only two terms (which is a bit low, really) then these tables would tell us that for n=2 we must use the following values:

- +

Which means that in order for us to approximate the integral, we must plug these values into the approximate function, which gives us:

@@ -3066,7 +3060,7 @@ y = curve.get(t).y Scripts are disabled. Showing fallback image. - + @@ -3095,7 +3089,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3110,7 +3104,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3185,12 +3179,12 @@ y = curve.get(t).y we can find a lot of insight.

So, what does the function look like? This:

- +

Which is really just a "short form" that glosses over the fact that we're dealing with functions of t, so let's expand that a tiny bit:

- +

And while that's a litte more verbose, it's still just as simple to work with as the first function: the curvature at some point on any (and this cannot be overstated: any) curve is a ratio between the first and second derivative cross product, and something that @@ -3225,7 +3219,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3249,7 +3243,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3579,7 +3573,7 @@ lli = function(line1, line2): So, how can we compute C? We start with our observation that C always lies somewhere between the start and ends points, so logically C will have a function that interpolates between those two coordinates:

- +

If we can figure out what the function u(t) looks like, we'll be done. Although we do need to remember that this u(t) will have a different for depending on whether we're working with quadratic or cubic curves. @@ -3588,9 +3582,9 @@ lli = function(line1, line2): > (with thanks to Boris Zbarsky) shows us the following two formulae:

- +

And

- +

So, if we know the start and end coordinates, and we know the t value, we know C, without having to calculate the A or even B coordinates. In fact, we can do the same for the ratio function: as another function of @@ -3598,18 +3592,18 @@ lli = function(line1, line2): pure function of t, too.

We start by observing that, given A, B, and C, the following always holds:

- +

Working out the maths for this, we see the following two formulae for quadratic and cubic curves:

- +

And

- +

Which now leaves us with some powerful tools: given thee points (start, end, and "some point on the curve"), as well as a t value, we can contruct curves: we can compute C using the start and end points, and our u(t) function, and once we have C, we can use our on-curve point (B) and the ratio(t) function to find A:

- +

With A found, finding e1 and e2 for quadratic curves is a matter of running the linear interpolation with t between start and A to yield e1, and between A and end to yield @@ -3617,9 +3611,9 @@ lli = function(line1, line2): distance ratio between e1 to B and B to e2 is the Bézier ratio (1-t):t, we can reverse engineer v1 and v2:

- +

And then reverse engineer the curve's control control points:

- +

So: if we have a curve's start and end point, then for any t value we implicitly know all the ABC values, which (combined with an educated guess on appropriate e1 and e2 coordinates for cubic curves) gives us the necessary information @@ -3645,8 +3639,8 @@ lli = function(line1, line2):

@@ -3691,8 +3685,8 @@ lli = function(line1, line2):

@@ -3706,8 +3700,8 @@ lli = function(line1, line2):

@@ -3718,8 +3712,8 @@ lli = function(line1, line2):

The result of this approach looks as follows:

@@ -3836,9 +3830,9 @@ for (coordinate, index) in LUT: initial B coordinate. We don't even need the latter: with our t value and "whever the cursor is" as target B, we can compute the associated C:

- +

And then the associated A:

- +

And we're done, because that's our new quadratic control point!

And then we (trivially) rearrange the terms across multiple lines:

@@ -3986,7 +3980,7 @@ for (coordinate, index) in LUT: @@ -3994,7 +3988,7 @@ for (coordinate, index) in LUT: @@ -4002,15 +3996,15 @@ for (coordinate, index) in LUT:

Which we can then decompose:

@@ -4018,7 +4012,7 @@ for (coordinate, index) in LUT: @@ -4036,7 +4030,7 @@ for (coordinate, index) in LUT: @@ -4064,7 +4058,7 @@ for (coordinate, index) in LUT: @@ -4076,7 +4070,7 @@ for (coordinate, index) in LUT: @@ -4092,7 +4086,7 @@ for (coordinate, index) in LUT: @@ -4103,7 +4097,7 @@ for (coordinate, index) in LUT: @@ -4116,16 +4110,16 @@ for (coordinate, index) in LUT:

In which we can replace the rather cumbersome "squaring" operation with a more conventional matrix equivalent:

@@ -4141,7 +4135,7 @@ for (coordinate, index) in LUT: @@ -4149,7 +4143,7 @@ for (coordinate, index) in LUT: @@ -4157,8 +4151,8 @@ for (coordinate, index) in LUT:

@@ -4169,8 +4163,8 @@ for (coordinate, index) in LUT:

@@ -4202,8 +4196,8 @@ for (coordinate, index) in LUT:

@@ -4282,8 +4276,8 @@ for (coordinate, index) in LUT:

@@ -4341,7 +4335,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4367,8 +4361,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4380,16 +4374,16 @@ for p = 1 to points.length-3 (inclusive):

Thus:

@@ -4401,8 +4395,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4412,7 +4406,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4420,24 +4414,24 @@ for p = 1 to points.length-3 (inclusive):

and merge the matrices:

This looks a lot like the Bézier matrix form, which as we saw in the chapter on Bézier curves, should look like this:

So, if we want to express a Catmull-Rom curve using a Bézier curve, we'll need to turn this Catmull-Rom bit:

@@ -4445,39 +4439,39 @@ for p = 1 to points.length-3 (inclusive): class="LaTeX SVG" src="./images/chapters/catmullconv/b21386f86bef8894f108c5441dad10de.svg" width="227px" - height="84px" + height="76px" loading="lazy" />

Into something that looks like this:

And the way we do that is with a fairly straight forward bit of matrix rewriting. We start with the equality we need to ensure:

Then we remove the coordinate vector from both sides without affecting the equality:

Then we can "get rid of" the Bézier matrix on the right by left-multiply both with the inverse of the Bézier matrix:

@@ -4487,16 +4481,16 @@ for p = 1 to points.length-3 (inclusive):

And now we're basically done. We just multiply those two matrices and we know what V is:

We now have the final piece of our function puzzle. Let's run through each step.

@@ -4506,7 +4500,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4516,8 +4510,8 @@ for p = 1 to points.length-3 (inclusive):
    @@ -4526,8 +4520,8 @@ for p = 1 to points.length-3 (inclusive):
      @@ -4537,7 +4531,7 @@ for p = 1 to points.length-3 (inclusive): class="LaTeX SVG" src="./images/chapters/catmullconv/79e333cd0c569657eea033b04fb5e61b.svg" width="348px" - height="84px" + height="76px" loading="lazy" />
        @@ -4546,8 +4540,8 @@ for p = 1 to points.length-3 (inclusive):
          @@ -4556,8 +4550,8 @@ for p = 1 to points.length-3 (inclusive):

          And we're done: we finally know how to convert these two curves!

          @@ -4570,8 +4564,8 @@ for p = 1 to points.length-3 (inclusive):

          @@ -4581,16 +4575,16 @@ for p = 1 to points.length-3 (inclusive):

          Or, if your API allows you to specify Catmull-Rom curves using plain coordinates:

@@ -4663,13 +4657,13 @@ for p = 1 to points.length-3 (inclusive): make things a little better. We'll start by linking up control points by ensuring that the "incoming" derivative at an on-curve point is the same as it's "outgoing" derivative:

- +

We can effect this quite easily, because we know that the vector from a curve's last control point to its last on-curve point is equal to the derivative vector. If we want to ensure that the first control point of the next curve matches that, all we have to do is mirror that last control point through the last on-curve point. And mirroring any point A through any point B is really simple:

- +

So let's implement that and see what it gets us. The following two graphics show a quadratic and a cubic poly-Bézier curve again, but this time moving the control points around moves others, too. However, you might see something unexpected going on for quadratic curves... @@ -4830,8 +4824,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4843,8 +4837,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4857,7 +4851,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4869,8 +4863,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4879,8 +4873,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5073,33 +5067,33 @@ for p = 1 to points.length-3 (inclusive): We start out with our start and end point, and for convenience we will place them on a unit circle (a circle around 0,0 with radius 1), at some angle φ:

- +

What we want to find is the intersection of the tangents, so we want a point C such that:

- +

i.e. we want a point that lies on the vertical line through S (at some distance a from S) and also lies on the tangent line through E (at some distance b from E). Solving this gives us:

- +

First we solve for b:

- +

which yields:

- +

which we can then substitute in the expression for a:

- +

A quick check shows that plugging these values for a and b into the expressions for Cx and Cy give the same x/y coordinates for both "a away from A" and "b away from B", so let's continue: now that we know the coordinate values for C, we know where our on-curve point T for t=0.5 (or angle φ/2) is, because we can just evaluate the Bézier polynomial, and we know where the circle arc's actual point P is for angle φ/2:

- +

We compute T, observing that if t=0.5, the polynomial values (1-t)², 2(1-t)t, and t² are 0.25, 0.5, and 0.25 respectively:

- +

Which, worked out for the x and y components, gives:

- +

And the distance between these two is the standard Euclidean distance:

- +

So, what does this distance function look like when we plot it for a number of ranges for the angle φ, such as a half circle, quarter circle and eighth circle? @@ -5140,7 +5134,7 @@ for p = 1 to points.length-3 (inclusive): In fact, let's flip the function around, so that if we plug in the precision error, labelled ε, we get back the maximum angle for that precision:

- +

And frankly, things are starting to look a bit ridiculous at this point, we're doing way more maths than we've ever done, but thankfully this is as far as we need the maths to take us: If we plug in the precisions 0.1, 0.01, 0.001 and 0.0001 we get the radians values 1.748, @@ -5247,7 +5241,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5259,7 +5253,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5267,7 +5261,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5304,8 +5298,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5327,8 +5321,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5338,15 +5332,15 @@ for p = 1 to points.length-3 (inclusive):

@@ -5356,8 +5350,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5367,8 +5361,8 @@ for p = 1 to points.length-3 (inclusive):

And that's it, we have all four points now for an approximation of an arbitrary circular arc with angle φ.

@@ -5378,7 +5372,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5386,7 +5380,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5397,15 +5391,15 @@ for p = 1 to points.length-3 (inclusive):

Which, in decimal values, rounded to six significant digits, is:

@@ -5594,7 +5588,7 @@ for p = 1 to points.length-3 (inclusive): >, we can compute a point on the curve for some value t in the interval [0,1] (where 0 is the start of the curve, and 1 the end, just like for Bézier curves), by evaluating the following function:

- +

Which, honestly, doesn't tell us all that much. All we can see is that a point on a B-Spline curve is defined as "a mix of all the control points, weighted somehow", where the weighting is achieved through the N(...) function, subscripted with an obvious parameter @@ -5609,14 +5603,14 @@ for p = 1 to points.length-3 (inclusive): k subscript to the N() function applies to.

Then the N() function itself. What does it look like?

- +

So this is where we see the interpolation: N(t) for an (i,k) pair (that is, for a step in the above summation, on a specific knot interval) is a mix between N(t) for (i,k-1) and N(t) for (i+1,k-1), so we see that this is a recursive iteration where i goes up, and k goes down, so it seem reasonable to expect that this recursion has to stop at some point; obviously, it does, and specifically it does so for the following i/k values:

- +

And this function finally has a straight up evaluation: if a t value lies within a knot-specific interval once we reach a k=1 value, it "counts", otherwise it doesn't. We did cheat a little, though, because for all these values we need to scale @@ -5633,12 +5627,12 @@ for p = 1 to points.length-3 (inclusive): Carl de Boor — came to a mathematically pleasing solution: to compute a point P(t), we can compute this point by evaluating d(t) on a curve section between knots i and i+1:

- +

This is another recursive function, with k values decreasing from the curve order to 1, and the value α (alpha) defined by:

- +

That looks complicated, but it's not. Computing alpha is just a fraction involving known, plain numbers. And, once we have our alpha value, we also have (1-alpha) because it's a trivial subtraction. Computing the d() function is thus mostly a @@ -5646,7 +5640,7 @@ for p = 1 to points.length-3 (inclusive): recursion might see computationally expensive, the total algorithm is cheap, as each step only involves very simple maths.

Of course, the recursion does need a stop condition:

- +

So, we actually see two stopping conditions: either i becomes 0, in which case d() is zero, or k becomes zero, in which case we get the same "either 1 or 0" that we saw in the N() function above. @@ -5656,7 +5650,7 @@ for p = 1 to points.length-3 (inclusive): Casteljau's algorithm. For instance, if we write out d() for i=3 and k=3, we get the following recursion diagram:

- +

That is, we compute d(3,3) as a mixture of d(2,3) and d(2,2), where those two are themselves a mixture of d(1,3) and d(1,2), and d(1,2) and d(1,1), respectively, which are diff --git a/docs/js/custom-element/lib/perform-code-surgery.js b/docs/js/custom-element/lib/perform-code-surgery.js index 2d765594..5498427d 100644 --- a/docs/js/custom-element/lib/perform-code-surgery.js +++ b/docs/js/custom-element/lib/perform-code-surgery.js @@ -22,7 +22,7 @@ export default function performCodeSurgery(code) { // 3. rewrite all public GraphicsAPI functions to have the required `this.` prefix GraphicsAPI.methods.forEach((fn) => { - const re = new RegExp(`([({\\s\\r\\n])${fn}\\(`, `g`); + const re = new RegExp(`([!({\\s\\r\\n])${fn}\\(`, `g`); code = code.replace(re, `$1this.${fn}(`); }); diff --git a/docs/news/2020-09-18.html b/docs/news/2020-09-18.html index dbbf2c78..3263431a 100644 --- a/docs/news/2020-09-18.html +++ b/docs/news/2020-09-18.html @@ -27,7 +27,7 @@ - + diff --git a/docs/news/2020-09-19-draft.md b/docs/news/draft.md similarity index 100% rename from docs/news/2020-09-19-draft.md rename to docs/news/draft.md diff --git a/docs/zh-CN/index.html b/docs/zh-CN/index.html index a6598b6f..3e496999 100644 --- a/docs/zh-CN/index.html +++ b/docs/zh-CN/index.html @@ -33,7 +33,7 @@ - + @@ -450,7 +450,7 @@ >的结果。这听起来很复杂,但你在很小的时候就做过线性插值:当你指向两个物体中的另外一个物体时,你就用到了线性插值。它就是很简单的“选出两点之间的一个点”。

如果我们知道两点之间的距离,并想找出离第一个点20%间距的一个新的点(也就是离第二个点80%的间距),我们可以通过简单的计算来得到:

- +

让我们来通过实际操作看一下:下面的图形都是可交互的,因此你可以通过上下键来增加或减少插值距离,来观察图形的变化。我们从三个点构成的两条线段开始。通过对各条线段进行线性插值得到两个点,对点之间的线段再进行线性插值,产生一个新的点。最终这些点——所有的点都可以通过选取不同的距离插值产生——构成了贝塞尔曲线 : @@ -477,26 +477,26 @@

贝塞尔曲线是“参数”方程的一种形式。从数学上讲,参数方程作弊了:“方程”实际上是一个从输入到唯一输出的、良好定义的映射关系。几个输入进来,一个输出返回。改变输入变量,还是只有一个输出值。参数方程在这里作弊了。它们基本上干了这么件事,“好吧,我们想要更多的输出值,所以我们用了多个方程”。举个例子:假如我们有一个方程,通过一些计算,将假设为x的一些值映射到另外的值:

- +

记号f(x)是表示函数的标准方式(为了方便起见,如果只有一个的话,我们称函数为f),函数的输出根据一个变量(本例中是x)变化。改变xf(x)的输出值也会变。

到目前没什么问题。现在,让我们来看一下参数方程,以及它们是怎么作弊的。我们取以下两个方程:

- +

这俩方程没什么让人印象深刻的,只不过是正弦函数和余弦函数,但正如你所见,输入变量有两个不同的名字。如果我们改变了a的值,f(b)的输出不会有变化,因为这个方程没有用到a。参数方程通过改变这点来作弊。在参数方程中,所有不同的方程共用一个变量,如下所示:

多个方程,但只有一个变量。如果我们改变了t的值,fa(t)fb(t)的输出都会发生变化。你可能会好奇这有什么用,答案其实很简单:对于参数曲线,如果我们用常用的标记来替代fa(t)fb(t),看起来就有些明朗了:

- +

好了,通过一些神秘的t值将x/y坐标系联系起来。

所以,参数曲线不像一般函数那样,通过x坐标来定义y坐标,而是用一个“控制”变量将它们连接起来。如果改变t的值,每次变化时我们都能得到两个值,这可以作为图形中的(x,y)坐标。比如上面的方程组,生成位于一个圆上的点:我们可以使t在正负极值间变化,得到的输出(x,y)都会位于一个以原点(0,0)为中心且半径为1的圆上。如果我们画出t从0到5时的值,将得到如下图像: @@ -517,8 +517,8 @@

@@ -530,7 +530,7 @@ @@ -538,8 +538,8 @@

@@ -551,7 +551,7 @@ @@ -561,8 +561,8 @@

这就是贝塞尔曲线完整的描述。在这个函数中的Σ表示了这是一系列的加法(用Σ下面的变量,从...=<值>开始,直到Σ上面的数字结束)。

@@ -716,7 +716,7 @@ function Bezier(3,t,w[]): @@ -724,8 +724,8 @@ function Bezier(3,t,w[]):

@@ -809,13 +809,13 @@ function RationalBezier(3,t,w[],r[]): 既然我们知道了贝塞尔曲线背后的数学原理,你可能会注意到一件奇怪的事:它们都是从t=0t=1。为什么是这个特殊区间?

这一切都与我们如何从曲线的“起点”变化到曲线“终点”有关。如果有一个值是另外两个值的混合,一般方程如下:

- +

很显然,起始值需要a=1, b=0,混合值就为100%的value 1和0%的value 2。终点值需要a=0, b=1,则混合值是0%的value 1和100%的value 2。另外,我们不想让“a”和“b”是互相独立的:如果它们是互相独立的话,我们可以任意选出自己喜欢的值,并得到混合值,比如说100%的value1和100%的value2。原则上这是可以的,但是对于贝塞尔曲线来说,我们通常想要的是起始值和终点值之间的混合值,所以要确保我们不会设置一些“a”和"b"而导致混合值超过100%。这很简单:

- +

用这个式子我们可以保证相加的值永远不会超过100%。通过将a限制在区间[0,1],我们将会一直处于这两个值之间(包括这两个端点),并且相加为100%。

@@ -1331,7 +1331,7 @@ function drawCurve(points[], t): The general rule for raising an nth order curve to an (n+1)th order curve is as follows (observing that the start and end weights are the same as the start and end weights for the old curve):

- +

However, this rule also has as direct consequence that you cannot generally safely lower a curve from nth order to (n-1)th order, because the control points cannot be "pulled apart" cleanly. We can @@ -1345,18 +1345,18 @@ function drawCurve(points[], t): some things can be done much more easily with matrices than with calculus functions, and this is one of those things. So... let's go!

We start by taking the standard Bézier function, and condensing it a little:

- +

Then, we apply one of those silly (actually, super useful) calculus tricks: since our t value is always between zero and one (inclusive), we know that (1-t) plus t always sums to 1. As such, we can express any value as a sum of t and 1-t:

- +

So, with that seemingly trivial observation, we rewrite that Bézier function by splitting it up into a sum of a (1-t) and t component:

- +

So far so good. Now, to see why we did this, let's write out the (1-t) and t parts, and see what that gives us. I promise, it's about to make sense. We start with (1-t): @@ -1364,8 +1364,8 @@ function drawCurve(points[], t):

@@ -1378,8 +1378,8 @@ function drawCurve(points[], t):

@@ -1394,7 +1394,7 @@ function drawCurve(points[], t): @@ -1402,13 +1402,13 @@ function drawCurve(points[], t): And this is where we switch over from calculus to linear algebra, and matrices: we can now express this relation between Bézier(n,t) and Bézier(n+1,t) as a very simple matrix multiplication:

- +

where the matrix M is an n+1 by n matrix, and looks like:

@@ -1427,8 +1427,8 @@ function drawCurve(points[], t):

The steps taken here are:

@@ -1457,7 +1457,7 @@ function drawCurve(points[], t): Scripts are disabled. Showing fallback image. - + @@ -1655,9 +1655,9 @@ function drawCurve(points[], t):

@@ -1666,16 +1666,9 @@ function drawCurve(points[], t):

-

@@ -1685,9 +1678,9 @@ function drawCurve(points[], t):

@@ -1703,7 +1696,7 @@ function drawCurve(points[], t): @@ -1711,7 +1704,7 @@ function drawCurve(points[], t): @@ -1743,7 +1736,7 @@ function drawCurve(points[], t): > Scripts are disabled. Showing fallback image. - + @@ -1756,7 +1749,7 @@ function drawCurve(points[], t): > Scripts are disabled. Showing fallback image. - + @@ -1830,7 +1823,7 @@ function drawCurve(points[], t): Scripts are disabled. Showing fallback image. - + @@ -1942,7 +1935,7 @@ function drawCurve(points[], t): Scripts are disabled. Showing fallback image. - + @@ -1991,10 +1984,11 @@ function drawCurve(points[], t): > Scripts are disabled. Showing fallback image. - + +

 

Scripts are disabled. Showing fallback image. - + @@ -2029,15 +2023,15 @@ function drawCurve(points[], t):

And then we turn this into our solution for t using basic arithmetics:

@@ -2055,8 +2049,8 @@ function drawCurve(points[], t):

@@ -2072,16 +2066,16 @@ function drawCurve(points[], t):

And then, using these v values, we can find out what our a, b, and c should be:

@@ -2092,7 +2086,7 @@ function drawCurve(points[], t): class="LaTeX SVG" src="./images/chapters/extremities/d9e66caeb45b6643112ce3d971b17e5b.svg" width="308px" - height="63px" + height="64px" loading="lazy" />

Easy-peasy. We can now almost trivially find the roots by plugging those values into the quadratic formula.

@@ -2114,8 +2108,8 @@ function drawCurve(points[], t):

@@ -2270,8 +2264,8 @@ function getCubicRoots(pa, pb, pc, pd) {

(The Wikipedia article has a decent animation for this process, so I will not add a graphic for that here)

@@ -2304,7 +2298,7 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - +
@@ -2318,7 +2312,7 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + @@ -2355,14 +2349,14 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + Scripts are disabled. Showing fallback image. - + @@ -2390,37 +2384,37 @@ function getCubicRoots(pa, pb, pc, pd) { rotate the curves so that the last point always lies on the x-axis, too, making its coordinate (...,0). This further simplifies the function for the y-component to an n-2 term function. For instance, if we have a cubic curve such as this:

- +

Then translating it so that the first coordinate lies on (0,0), moving all x coordinates by -120, and all y coordinates by -160, gives us:

- +

If we then rotate the curve so that its end point lies on the x-axis, the coordinates (integer-rounded for illustrative purposes here) become:

- +

If we drop all the zero-terms, this gives us:

- +

We can see that our original curve definition has been simplified considerably. The following graphics illustrate the result of aligning our example curves to the x-axis, with the cubic case using the coordinates that were just used in the example formulae:

-
- - - Scripts are disabled. Showing fallback image. - - - - - Scripts are disabled. Showing fallback image. - - -
+ + + Scripts are disabled. Showing fallback image. + + + +

 

+ + + Scripts are disabled. Showing fallback image. + +

@@ -2443,14 +2437,14 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + Scripts are disabled. Showing fallback image. - + @@ -2481,7 +2475,7 @@ function getCubicRoots(pa, pb, pc, pd) { inflection, and we can find out where those happen relatively easily.

What we need to do is solve a simple equation:

- +

What we're saying here is that given the curvature function C(t), we want to know for which values of t this function is zero, meaning there is no "curvature", which will be exactly at the point between our circle being on one side of the curve, and our @@ -2490,8 +2484,8 @@ function getCubicRoots(pa, pb, pc, pd) {

@@ -2514,7 +2508,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2522,7 +2516,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2533,8 +2527,8 @@ function getCubicRoots(pa, pb, pc, pd) {

@@ -2551,7 +2545,7 @@ function getCubicRoots(pa, pb, pc, pd) { class="LaTeX SVG" src="./images/chapters/inflections/1679090a942a43d27f886f236fc8d62b.svg" width="533px" - height="20px" + height="19px" loading="lazy" />

@@ -2561,7 +2555,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2569,8 +2563,8 @@ function getCubicRoots(pa, pb, pc, pd) {

@@ -2584,7 +2578,7 @@ function getCubicRoots(pa, pb, pc, pd) { Scripts are disabled. Showing fallback image. - + @@ -2642,8 +2636,8 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2655,8 +2649,8 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2665,7 +2659,7 @@ function getCubicRoots(pa, pb, pc, pd) { @@ -2722,12 +2716,12 @@ function getCubicRoots(pa, pb, pc, pd) { cx + dy), which means we can't do translation, since that requires we end up with some kind of (x + a, y + b). If we add a bogus z coordinate that is always 1, then we can suddenly add arbitrary values. For example:

- +

Sweet! z stays 1, so we can effectively ignore it entirely, but we added some plain values to our x and y coordinates. So, if we want to subtract p1.x and p1.y, we use:

- +

Running all our coordinates through this transformation gives a new set of coordinates, let's call those U, where the first coordinate lies on (0,0), and the rest is still somewhat free. Our next job is to make sure point 2 ends up lying on the @@ -2735,12 +2729,12 @@ function getCubicRoots(pa, pb, pc, pd) { currently have. This is called shearing, and the typical x-shear matrix and its transformation looks like this:

- +

So we want some shearing value that, when multiplied by y, yields -x, so our x coordinate becomes zero. That value is simply -x/y, because *-x/y * y = -x*. Done:

- +

Now, running this on all our points generates a new set of coordinates, let's call those V, which now have point 1 on (0,0) and point 2 on (0, some-value), and we wanted it at (0,1), so we need to @@ -2748,7 +2742,7 @@ function getCubicRoots(pa, pb, pc, pd) { point 3 to end up on (1,1), so we can also scale x to make sure its x-coordinate will be 1 after we run the transform. That means we'll be x-scaling by 1/point3x, and y-scaling by point2y. This is really easy:

- +

Then, finally, this generates a new set of coordinates, let's call those W, of which point 1 lies on (0,0), point 2 lies on (0,1), and point three lies on (1, ...) so all that's left is to make sure point 3 ends up at (1,1) - but we can't scale! Point 2 is already in the @@ -2757,13 +2751,13 @@ function getCubicRoots(pa, pb, pc, pd) { but y-shearing. Additionally, we don't actually want to end up at zero (which is what we did before) so we need to shear towards an offset, in this case 1:

- +

And this generates our final set of four coordinates. Of these, we already know that points 1 through 3 are (0,0), (0,1) and (1,1), and only the last coordinate is "free". In fact, given any four starting coordinates, the resulting "transformation mapped" coordinate will be:

- +

Okay, well, that looks plain ridiculous, but: notice that every coordinate value is being offset by the initial translation, and also notice that a lot of terms in that expression are repeated. Even though the maths looks crazy as a single expression, we can just @@ -2773,13 +2767,13 @@ function getCubicRoots(pa, pb, pc, pd) { First, let's just do that translation step as a "preprocessing" operation so we don't have to subtract the values all the time. What does that leave?

- +

Suddenly things look a lot simpler: the mapped x is fairly straight forward to compute, and we see that the mapped y actually contains the mapped x in its entirety, so we'll have that part already available when we need to evaluate it. In fact, let's pull out all those common factors to see just how simple this is:

- +

That's kind of super-simple to write out in code, I think you'll agree. Coding math tends to be easier than the formulae initially make it look! @@ -2841,7 +2835,7 @@ function getCubicRoots(pa, pb, pc, pd) { > Scripts are disabled. Showing fallback image. - + @@ -2854,17 +2848,17 @@ function getCubicRoots(pa, pb, pc, pd) { cubic case either: because of the kind of curve we're starting with, we know there is only root, simplifying the code we need!

First, let's look at the function for x(t):

- +

We can rewrite this to a plain polynomial form, by just fully writing out the expansion and then collecting the polynomial factors, as:

- +

Nothing special here: that's a standard cubic polynomial in "power" form (i.e. all the terms are ordered by their power of t). So, given that a, b, c, d, and x(t) are all known constants, we can trivially rewrite this (by moving the x(t) across the equal sign) as:

- +

You might be wondering "where did all the other 'minus x' for all the other values a, b, c, and d go?" and the answer there is that they all cancel out, so the only one we actually need to subtract is the one at the end. Handy! So now we just solve this equation using @@ -2888,7 +2882,7 @@ y = curve.get(t).y Scripts are disabled. Showing fallback image. - + @@ -2905,9 +2899,9 @@ y = curve.get(t).y fy(t), then the length of the curve, measured from start point to some point t = z, is computed using the following seemingly straight forward (if a bit overwhelming) formula:

- +

or, more commonly written using Leibnitz notation as:

- +

This formula says that the length of a parametric curve is in fact equal to the area underneath a function that looks a remarkable amount like Pythagoras' rule for computing the diagonal of a straight angled triangle. This sounds pretty simple, right? Sadly, @@ -2933,7 +2927,7 @@ y = curve.get(t).y works, I can recommend the University of South Florida video lecture on the procedure, linked in this very paragraph. The general solution we're looking for is the following:

- +

In plain text: an integral function can always be treated as the sum of an (infinite) number of (infinitely thin) rectangular strips sitting "under" the function's plotted graph. To illustrate this idea, the following graph shows the integral for a sinusoid function. The @@ -2996,8 +2990,8 @@ y = curve.get(t).y

@@ -3011,15 +3005,15 @@ y = curve.get(t).y values, for any n, so if we want to approximate our integral with only two terms (which is a bit low, really) then these tables would tell us that for n=2 we must use the following values:

- +

Which means that in order for us to approximate the integral, we must plug these values into the approximate function, which gives us:

@@ -3038,7 +3032,7 @@ y = curve.get(t).y Scripts are disabled. Showing fallback image. - + @@ -3067,7 +3061,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3082,7 +3076,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3157,12 +3151,12 @@ y = curve.get(t).y we can find a lot of insight.

So, what does the function look like? This:

- +

Which is really just a "short form" that glosses over the fact that we're dealing with functions of t, so let's expand that a tiny bit:

- +

And while that's a litte more verbose, it's still just as simple to work with as the first function: the curvature at some point on any (and this cannot be overstated: any) curve is a ratio between the first and second derivative cross product, and something that @@ -3197,7 +3191,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3221,7 +3215,7 @@ y = curve.get(t).y > Scripts are disabled. Showing fallback image. - + @@ -3551,7 +3545,7 @@ lli = function(line1, line2): So, how can we compute C? We start with our observation that C always lies somewhere between the start and ends points, so logically C will have a function that interpolates between those two coordinates:

- +

If we can figure out what the function u(t) looks like, we'll be done. Although we do need to remember that this u(t) will have a different for depending on whether we're working with quadratic or cubic curves. @@ -3560,9 +3554,9 @@ lli = function(line1, line2): > (with thanks to Boris Zbarsky) shows us the following two formulae:

- +

And

- +

So, if we know the start and end coordinates, and we know the t value, we know C, without having to calculate the A or even B coordinates. In fact, we can do the same for the ratio function: as another function of @@ -3570,18 +3564,18 @@ lli = function(line1, line2): pure function of t, too.

We start by observing that, given A, B, and C, the following always holds:

- +

Working out the maths for this, we see the following two formulae for quadratic and cubic curves:

- +

And

- +

Which now leaves us with some powerful tools: given thee points (start, end, and "some point on the curve"), as well as a t value, we can contruct curves: we can compute C using the start and end points, and our u(t) function, and once we have C, we can use our on-curve point (B) and the ratio(t) function to find A:

- +

With A found, finding e1 and e2 for quadratic curves is a matter of running the linear interpolation with t between start and A to yield e1, and between A and end to yield @@ -3589,9 +3583,9 @@ lli = function(line1, line2): distance ratio between e1 to B and B to e2 is the Bézier ratio (1-t):t, we can reverse engineer v1 and v2:

- +

And then reverse engineer the curve's control control points:

- +

So: if we have a curve's start and end point, then for any t value we implicitly know all the ABC values, which (combined with an educated guess on appropriate e1 and e2 coordinates for cubic curves) gives us the necessary information @@ -3617,8 +3611,8 @@ lli = function(line1, line2):

@@ -3663,8 +3657,8 @@ lli = function(line1, line2):

@@ -3678,8 +3672,8 @@ lli = function(line1, line2):

@@ -3690,8 +3684,8 @@ lli = function(line1, line2):

The result of this approach looks as follows:

@@ -3808,9 +3802,9 @@ for (coordinate, index) in LUT: initial B coordinate. We don't even need the latter: with our t value and "whever the cursor is" as target B, we can compute the associated C:

- +

And then the associated A:

- +

And we're done, because that's our new quadratic control point!

And then we (trivially) rearrange the terms across multiple lines:

@@ -3958,7 +3952,7 @@ for (coordinate, index) in LUT: @@ -3966,7 +3960,7 @@ for (coordinate, index) in LUT: @@ -3974,15 +3968,15 @@ for (coordinate, index) in LUT:

Which we can then decompose:

@@ -3990,7 +3984,7 @@ for (coordinate, index) in LUT: @@ -4008,7 +4002,7 @@ for (coordinate, index) in LUT: @@ -4036,7 +4030,7 @@ for (coordinate, index) in LUT: @@ -4048,7 +4042,7 @@ for (coordinate, index) in LUT: @@ -4064,7 +4058,7 @@ for (coordinate, index) in LUT: @@ -4075,7 +4069,7 @@ for (coordinate, index) in LUT: @@ -4088,16 +4082,16 @@ for (coordinate, index) in LUT:

In which we can replace the rather cumbersome "squaring" operation with a more conventional matrix equivalent:

@@ -4113,7 +4107,7 @@ for (coordinate, index) in LUT: @@ -4121,7 +4115,7 @@ for (coordinate, index) in LUT: @@ -4129,8 +4123,8 @@ for (coordinate, index) in LUT:

@@ -4141,8 +4135,8 @@ for (coordinate, index) in LUT:

@@ -4174,8 +4168,8 @@ for (coordinate, index) in LUT:

@@ -4254,8 +4248,8 @@ for (coordinate, index) in LUT:

@@ -4313,7 +4307,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4339,8 +4333,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4352,16 +4346,16 @@ for p = 1 to points.length-3 (inclusive):

Thus:

@@ -4373,8 +4367,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4384,7 +4378,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4392,24 +4386,24 @@ for p = 1 to points.length-3 (inclusive):

and merge the matrices:

This looks a lot like the Bézier matrix form, which as we saw in the chapter on Bézier curves, should look like this:

So, if we want to express a Catmull-Rom curve using a Bézier curve, we'll need to turn this Catmull-Rom bit:

@@ -4417,39 +4411,39 @@ for p = 1 to points.length-3 (inclusive): class="LaTeX SVG" src="./images/chapters/catmullconv/b21386f86bef8894f108c5441dad10de.svg" width="227px" - height="84px" + height="76px" loading="lazy" />

Into something that looks like this:

And the way we do that is with a fairly straight forward bit of matrix rewriting. We start with the equality we need to ensure:

Then we remove the coordinate vector from both sides without affecting the equality:

Then we can "get rid of" the Bézier matrix on the right by left-multiply both with the inverse of the Bézier matrix:

@@ -4459,16 +4453,16 @@ for p = 1 to points.length-3 (inclusive):

And now we're basically done. We just multiply those two matrices and we know what V is:

We now have the final piece of our function puzzle. Let's run through each step.

@@ -4478,7 +4472,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4488,8 +4482,8 @@ for p = 1 to points.length-3 (inclusive):
    @@ -4498,8 +4492,8 @@ for p = 1 to points.length-3 (inclusive):
      @@ -4509,7 +4503,7 @@ for p = 1 to points.length-3 (inclusive): class="LaTeX SVG" src="./images/chapters/catmullconv/79e333cd0c569657eea033b04fb5e61b.svg" width="348px" - height="84px" + height="76px" loading="lazy" />
        @@ -4518,8 +4512,8 @@ for p = 1 to points.length-3 (inclusive):
          @@ -4528,8 +4522,8 @@ for p = 1 to points.length-3 (inclusive):

          And we're done: we finally know how to convert these two curves!

          @@ -4542,8 +4536,8 @@ for p = 1 to points.length-3 (inclusive):

          @@ -4553,16 +4547,16 @@ for p = 1 to points.length-3 (inclusive):

          Or, if your API allows you to specify Catmull-Rom curves using plain coordinates:

@@ -4635,13 +4629,13 @@ for p = 1 to points.length-3 (inclusive): make things a little better. We'll start by linking up control points by ensuring that the "incoming" derivative at an on-curve point is the same as it's "outgoing" derivative:

- +

We can effect this quite easily, because we know that the vector from a curve's last control point to its last on-curve point is equal to the derivative vector. If we want to ensure that the first control point of the next curve matches that, all we have to do is mirror that last control point through the last on-curve point. And mirroring any point A through any point B is really simple:

- +

So let's implement that and see what it gets us. The following two graphics show a quadratic and a cubic poly-Bézier curve again, but this time moving the control points around moves others, too. However, you might see something unexpected going on for quadratic curves... @@ -4802,8 +4796,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4815,8 +4809,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4829,7 +4823,7 @@ for p = 1 to points.length-3 (inclusive): @@ -4841,8 +4835,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -4851,8 +4845,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5045,33 +5039,33 @@ for p = 1 to points.length-3 (inclusive): We start out with our start and end point, and for convenience we will place them on a unit circle (a circle around 0,0 with radius 1), at some angle φ:

- +

What we want to find is the intersection of the tangents, so we want a point C such that:

- +

i.e. we want a point that lies on the vertical line through S (at some distance a from S) and also lies on the tangent line through E (at some distance b from E). Solving this gives us:

- +

First we solve for b:

- +

which yields:

- +

which we can then substitute in the expression for a:

- +

A quick check shows that plugging these values for a and b into the expressions for Cx and Cy give the same x/y coordinates for both "a away from A" and "b away from B", so let's continue: now that we know the coordinate values for C, we know where our on-curve point T for t=0.5 (or angle φ/2) is, because we can just evaluate the Bézier polynomial, and we know where the circle arc's actual point P is for angle φ/2:

- +

We compute T, observing that if t=0.5, the polynomial values (1-t)², 2(1-t)t, and t² are 0.25, 0.5, and 0.25 respectively:

- +

Which, worked out for the x and y components, gives:

- +

And the distance between these two is the standard Euclidean distance:

- +

So, what does this distance function look like when we plot it for a number of ranges for the angle φ, such as a half circle, quarter circle and eighth circle? @@ -5112,7 +5106,7 @@ for p = 1 to points.length-3 (inclusive): In fact, let's flip the function around, so that if we plug in the precision error, labelled ε, we get back the maximum angle for that precision:

- +

And frankly, things are starting to look a bit ridiculous at this point, we're doing way more maths than we've ever done, but thankfully this is as far as we need the maths to take us: If we plug in the precisions 0.1, 0.01, 0.001 and 0.0001 we get the radians values 1.748, @@ -5219,7 +5213,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5231,7 +5225,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5239,7 +5233,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5276,8 +5270,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5299,8 +5293,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5310,15 +5304,15 @@ for p = 1 to points.length-3 (inclusive):

@@ -5328,8 +5322,8 @@ for p = 1 to points.length-3 (inclusive):

@@ -5339,8 +5333,8 @@ for p = 1 to points.length-3 (inclusive):

And that's it, we have all four points now for an approximation of an arbitrary circular arc with angle φ.

@@ -5350,7 +5344,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5358,7 +5352,7 @@ for p = 1 to points.length-3 (inclusive): @@ -5369,15 +5363,15 @@ for p = 1 to points.length-3 (inclusive):

Which, in decimal values, rounded to six significant digits, is:

@@ -5566,7 +5560,7 @@ for p = 1 to points.length-3 (inclusive): >, we can compute a point on the curve for some value t in the interval [0,1] (where 0 is the start of the curve, and 1 the end, just like for Bézier curves), by evaluating the following function:

- +

Which, honestly, doesn't tell us all that much. All we can see is that a point on a B-Spline curve is defined as "a mix of all the control points, weighted somehow", where the weighting is achieved through the N(...) function, subscripted with an obvious parameter @@ -5581,14 +5575,14 @@ for p = 1 to points.length-3 (inclusive): k subscript to the N() function applies to.

Then the N() function itself. What does it look like?

- +

So this is where we see the interpolation: N(t) for an (i,k) pair (that is, for a step in the above summation, on a specific knot interval) is a mix between N(t) for (i,k-1) and N(t) for (i+1,k-1), so we see that this is a recursive iteration where i goes up, and k goes down, so it seem reasonable to expect that this recursion has to stop at some point; obviously, it does, and specifically it does so for the following i/k values:

- +

And this function finally has a straight up evaluation: if a t value lies within a knot-specific interval once we reach a k=1 value, it "counts", otherwise it doesn't. We did cheat a little, though, because for all these values we need to scale @@ -5605,12 +5599,12 @@ for p = 1 to points.length-3 (inclusive): Carl de Boor — came to a mathematically pleasing solution: to compute a point P(t), we can compute this point by evaluating d(t) on a curve section between knots i and i+1:

- +

This is another recursive function, with k values decreasing from the curve order to 1, and the value α (alpha) defined by:

- +

That looks complicated, but it's not. Computing alpha is just a fraction involving known, plain numbers. And, once we have our alpha value, we also have (1-alpha) because it's a trivial subtraction. Computing the d() function is thus mostly a @@ -5618,7 +5612,7 @@ for p = 1 to points.length-3 (inclusive): recursion might see computationally expensive, the total algorithm is cheap, as each step only involves very simple maths.

Of course, the recursion does need a stop condition:

- +

So, we actually see two stopping conditions: either i becomes 0, in which case d() is zero, or k becomes zero, in which case we get the same "either 1 or 0" that we saw in the N() function above. @@ -5628,7 +5622,7 @@ for p = 1 to points.length-3 (inclusive): Casteljau's algorithm. For instance, if we write out d() for i=3 and k=3, we get the following recursion diagram:

- +

That is, we compute d(3,3) as a mixture of d(2,3) and d(2,2), where those two are themselves a mixture of d(1,3) and d(1,2), and d(1,2) and d(1,1), respectively, which are