STATUS: Draft

These notes are based on Prof. Norman Wildberger's lectures on Algebraic Calculus and de Casteljau Bezier (dCB) curves found here. They are being hosted at ladatavita.com and available from my Github repo at: https://github.com/jgab3103/Jamie-Gabriel/tree/main/MathNotebooks

Algebraic Calculus and dCB Curves (1)


Aim: Introduce de Casteljau Bezier (dCB) curves as fundamental objects of Algebraic Calculus


Observe: dCB curves can be characterised computional objects in Algebraic Calculus and it is possible to view the information they hold as polynumbers

Observe: dCB curves are also referred to as polynomial paramaterised curves

Observe: dCB curves can be described with lines and control points in an affine setting.

Observe: the locus of the dCB curve is created by linear operations.

Observe Affine combination of $(1 - t) P0 + P1(t)$ determines a locus of a point on the plane.

Observe: By adding more lines and control points, more complex curves can be created. For example, cubic dCB have more control points that quadratice dCB curves.

Observe: In the Quadriatic and Cubic case of dCB cuves, the control points are also tangent lines, so they can be joined to one another.


Aim: Introduce Polynumbers to allow an algebraic representation of dCB curves


Definition A Polynumber is a list of numbers with the following properties:

Definition A Polynomially Parametrized Curve is a list of 2 polynumbers:

$$ \gamma = [p, q] $$

Let $P0, P1 P2 \ldots$ be an ongoing sequence of sequence of planar control points to arbitrary but finite length

Observe: In the case of $Q_i$, it relates to the affine combination of $P_i$ and $P_{i + 1}$ controlled by $t$.

Observe: Locus of $Q_0$ as $t$ varies is a linear dCB curve.Note that where $P_0$ and $P_1$ are equal, this will generate a point

Observe: $R$ is a quadratic dCB curve, and $S$ is a cubic dCB curve. This can be extended to other, higher degree curves

Observe: keep on going to get the S points, leads to cubic cDB curve. For example, quartic dcb curves from 5 control points; quintic dcb curves vrom 6 control points


Aim: ...


Let $F10$ be the rhs fo F1, in terms of $t$

Observe: this expression can be written in terms of $P_0 = [p_{01}, p_{02}]$ and $P_1 = [p_{11}, p_{12}]$ leading to a solution to $Q_0$ in terms of $p_{01}, p_{02}, p_{11}$ and $p_{12}$

Observe: $F11$ can be manipulated to:

$$ p_{01} + t \left(p_{11} - p_{01}\right) $$$$ p_{02} + t \left( p_{12} - p_{02}\right) $$

Let: $c_{01}, c_{02}, c_{11}$ and $c_{12}$ have the following identities

$$c_{01} = p_{01}$$$$c_{11} = p_{11} - p_{01}$$$$c_{02} = p_{02}$$$$c_{12} = p_{12} - p_{02}$$

Let: $F12$ be an equation of matrices representing the relationship between $c_{01}, c_{02}, c_{11}$ and $c_{12}$ and $p_{01}, p_{02}, p_{11}$ and $p_{12}$

Let: F13 be a verfication of the following:

$$ \left[\begin{matrix}p_{01} & p_{02}\\- p_{01} + p_{11} & - p_{02} + p_{12}\end{matrix}\right] \equiv \left[\begin{matrix}1 & 0\\-1 & 1\end{matrix}\right] \left[\begin{matrix}p_{01} & p_{02}\\p_{11} & p_{12}\end{matrix}\right] $$


Observe: this leads to the following identity:


$$ \left[\begin{matrix}c_{01} & c_{02}\\c_{11} & c_{12}\end{matrix}\right] \equiv \left[\begin{matrix}1 & 0\\-1 & 1\end{matrix}\right] \left[\begin{matrix}p_{01} & p_{02}\\p_{11} & p_{12}\end{matrix}\right] $$


Observe: This identity demonstrates that the matrix $\left[\begin{matrix}1 & 0\\-1 & 1\end{matrix}\right]$ and its inverse $\left[\begin{matrix}1 & 0\\1 & 1\end{matrix}\right]$ can be used to move between $p_{ij}$ and $c_{ij}$ points

Let: $F14$ be a function that transforms a matrix between the points $c_{01}, c_{02}, c_{11}$ and $c_{12}$ and $p_{01}, p_{02}, p_{11}$ and $p_{12}$

Observe: It is possible to extend this to the quadratic Case. Recall the values of $Q_0, Q_1$ and $R_0$.

Let: F15 be $F4$ with substitions of $Q_0$ and $Q_1$, expression in powers of $t$

Observe: This is quadratic dependence on $t$

Observe: $F16$ be written in terms of $P_0 = [p_{01}, p_{02}], P_1 = [p_{11}, p_{12}]$ and $P_2 = [p_{21}, p_{22}]$

Let $F17$ be $F16$ with substitions for $P0, P1$ and $P2$.

Observe: This can be written as a matrix of values where the rows are progressively higher powers of $t$:

$$ \displaystyle \left[\begin{matrix}p_{01} & p_{02}\\- 2 p_{01} + 2 p_{11} & - 2 p_{02} + 2 p_{12}\\p_{01} - 2 p_{11} + p_{21} & p_{02} - 2 p_{12} + p_{22}\end{matrix}\right] $$

Observe: It is possible to equate these with values of $c_i$:

$$ \displaystyle \left[\begin{matrix}c_{01} & c_{02}\\c_{11} & c_{12}\\c_{21} & c_{22}\end{matrix}\right] = \displaystyle \left[\begin{matrix}p_{01} & p_{02}\\- 2 p_{01} + 2 p_{11} & - 2 p_{02} + 2 p_{12}\\p_{01} - 2 p_{11} + p_{21} & p_{02} - 2 p_{12} + p_{22}\end{matrix}\right] $$

Let F18 and F19 be be a matrices.

Let $F20$ show that $F18 \times F19$ is equivalent to

$$ \displaystyle \left[\begin{matrix}c_{01} & c_{02}\\c_{11} & c_{12}\\c_{21} & c_{22}\end{matrix}\right] $$

Observe: This creates the following relation:

$$ \displaystyle \left[\begin{matrix}c_{01} & c_{02}\\c_{11} & c_{12}\\c_{21} & c_{22}\end{matrix}\right] = \left[\begin{matrix}1 & 0 & 0\\-2 & 2 & 0\\1 & -2 & 1\end{matrix}\right] \left[\begin{matrix}p_{01} & p_{02}\\p_{11} & p_{12}\\p_{21} & p_{22}\end{matrix}\right] $$

Observe: It is possible invert $\left[\begin{matrix}1 & 0 & 0\\-2 & 2 & 0\\1 & -2 & 1\end{matrix}\right]$ to go between the $c_i$ and $p_i$ values.

Let $F21$ be the inverse of $F18$

Let $F22$ be the matrix with $c_i$ values.

Observe: The original $p_i$ values can be recovered by multiplying the matrix of $c_i$ values with the inverse matrix.


Aim: Extend to the cubic case



Aim Extend this to higher degrees

Method: Create a general process for higher degrees of $t$


Observe: Recall the relationship:

$$\displaystyle \left[\begin{matrix}c_{01} & c_{02}\\c_{11} & c_{12}\\c_{21} & c_{22}\end{matrix}\right] = \displaystyle \left[\begin{matrix}p_{01} & p_{02}\\- 2 p_{01} + 2 p_{11} & - 2 p_{02} + 2 p_{12}\\p_{01} - 2 p_{11} + p_{21} & p_{02} - 2 p_{12} + p_{22}\end{matrix}\right] $$

Let $F23$ be the rhs of this relationship.

Observe: For either column of $F23$, it is possible to view the column as a system of linear equations and convert these to matrix of numbers.

Let $F24$ and $F25$ be a matrix tha converts equations in $p_i$ to a number matrix

Let $F26$ be a matrix of $p_i$ values.

Observe that $F24 \times F26 = F23$.

Observe The above steps provide a compuational way to transform the matrix

$$ \displaystyle \left[\begin{matrix}p_{01} & p_{02}\\- 2 p_{01} + 2 p_{11} & - 2 p_{02} + 2 p_{12}\\p_{01} - 2 p_{11} + p_{21} & p_{02} - 2 p_{12} + p_{22}\end{matrix}\right] $$

into

$$ \left[\begin{matrix}1 & 0 & 0\\-2 & 2 & 0\\1 & -2 & 1\end{matrix}\right] \left[\begin{matrix}p_{01} & p_{02}\\p_{11} & p_{12}\\p_{21} & p_{22}\end{matrix}\right] $$

Observe: The points $p_i$ can have the following relationship, where $P_0 = [p_{01}, p_{02}], P_1 = [p_{11}, p_{12}]$ and $P_2 = [p_{21}, p_{22}]$

Let $F27$ be a recursive function that caclulates these values.


Aim: Link the patterns found in these matrices to Bernstein Polynomials


Observe Coeffiencients here with respect to the points $P_0, P_1, P_2$ and $P_3$ are equivalent to the Bernstein basis polynomials. For the cubic case, this is $b_{k, 3}$ for $k = 0, 1, 2, 3$. It is defined as

$$ b_{v, n} = \binom{n}{v} x ^ v (1 - x)^{n - v}$$

where $v = 0, \ldots, n$ and $\binom{n}{v}$ is the binomial coefficient

For example:

$$ b_{2, 5}(x) = \binom{5}{2}x^2(1 - x)^3 = 10x^2(1 - x)^3 $$

The above is seen in powers of $t$

Observe: This matrix of numbers connects the coordinates of the contol points to the coefficients of polynomials when it is expanded in terms of $t$, and relates to the Berstein Polynomial generating function. They can be intuited as a change of basis from $p_i$ to $c_i$

$$ \displaystyle \left[\begin{matrix}c_{01} & c_{02}\\c_{11} & c_{12}\\c_{21} & c_{22}\end{matrix}\right] = \left[\begin{matrix}1 & 0 & 0\\-2 & 2 & 0\\1 & -2 & 1\end{matrix}\right] \left[\begin{matrix}p_{01} & p_{02}\\p_{11} & p_{12}\\p_{21} & p_{22}\end{matrix}\right] $$

Observe The matrices produced here are invertible

Observe The general case can be clarifed by introducting the triangular Pascal on-matrix (maxel) and its inverse. The inverse is equvalent to the matrix that can be generated by the Bernstein Polynomials

Let $F28$ be a function to create a $n \times n$ Pascal matrix

Let $F29$ be a $5 \times 5$ Pascal Triangle

Let $F30$ be the inverse of $F29$.

Observe $F30$ is identical to $F29$ is the same result, however with the presence of minus signs. Note having a strong pattern between a matrix and its inverse is powerful

Observe: In an ongoing sense matrices are inverses

Observe. The relationship that has been established between the Pascal Matrix and Bernstein Polynomial matrix but it still needs to be clarified in terms of how this relates to change of basis matrices:

$$ \left[\begin{matrix}1 & 0\\1 & 1\end{matrix}\right] $$

and

$$ \left[\begin{matrix}1 & 0 & 0\\-2 & 2 & 0\\1 & -2 & 1\end{matrix}\right] $$

Let $F31$ be a function that creates a $n \times n$ matrix where all entries are $0$ escept the diagnonal which are the nth row of a Pascal matrix

Observe: If an diagonal matrix (from $F31$) of size $m$ is multiplied with a sub-matrix, $m \times m$ of an $n \times n$ inverted Pascal matrix $F30$ the change of basis matrices between $p_i$ and $c_i$ can be obtained.

Let Let $F32, F33$ and $F34$ be examples of this.

Observe: The results seen in $F32, F33$ and $F34$ suggest a general relationship between the properties of a Pascal Triangle and the change of basis from the control points of dCB curves to the coeffiencts of polynumbers.

Theorem: dCB Parametrization Theorem

A polynomially parametrized curve $\gamma$ is a dCB curve, and a dCB curve is a polynomially parametrized curve. Given a parametrization, the control points $P_0, P_1, P_2 \ldots$ are determined, and given the control points, the polynumbers $p$ and $q$ in $\gamma = [p, q]$ are determined. This provides a bridge from the algebraic/geometric side (a polynomially parametrized cuve) to a discrete object (the dCB control points)