Applied ideas on using Bezier curves & hybrid tetrational-polynomials to fit or approximate curves in data of virtually any magnitude. Authored by Onri Jay Benally.
Basic Bezier curves, being the useful geometric tools that they are, can be described by a Bernstein basis polynomial. They can be adapted to follow objects that bend using hidden control handles and anchor points placed along an existing curve or virtual contour of interest, as shown in this repository. With that in mind, I thought of adapting a polynomial for the Bezier curve with tetrations or super exponentials to form a hybrid approach that compensates for very sharp and large changes in data curves. It does so by mathematically describing the anchor points and control points of a Bezier curve, as well as where they are located in some data plotting space or layout, how dense the clusters of anchor points are as determined by a given threshold, and how large a tetration or super exponential should be according to the size distance between the smallest and largest values of interest locally or globally in order to move anchor points and control points to where they need to be.
Note that integrating a tetration into a polynomial can create extremely large values, which cannot be represented on any 64-bit or 128-bit computer. Thus, the tetration must be carefully expressed to stay within the compatibility or capability of a 128-bit or 64-bit machine. Some interesting results are provided in this repository applied to real use cases using adjustable clustering of Bezier anchor points, such as approximating electronic band structures for example. Check files for the code provided in a Google Colab notebook.
Concept | Equation / Explanation |
---|---|
General Bézier Curve | $B(t) = \sum_{i=0}^{n} B_i^n(t) P_i$ |
Bernstein Basis Polynomial | $B_i^n(t) = \binom{n}{i} (1-t)^{n-i} t^i$ |
Binomial Coefficient | $\binom{n}{i} = \frac{n!}{i!(n-i)!}$ |
Curve Properties | - $B(t)$ represents the position on the curve for $t \in [0,1]$. - $P_i$ are the control points that influence the shape. - The curve starts at $P_0$ and ends at $P_n$. - The shape is controlled by the intermediate points $P_1, P_2, \dots, P_{n-1}$. |
Linear Bézier Curve ($n = 1$) | Straight line between two points. |
Quadratic Bézier Curve ($n = 2$) | $B(t) = (1-t)^2 P_0 + 2(1-t)t P_1 + t^2 P_2$ |
Cubic Bézier Curve ($n = 3$) | $B(t) = (1-t)^3 P_0 + 3(1-t)^2 t P_1 + 3(1-t)t^2 P_2 + t^3 P_3$ |
Applications | Cubic Bézier curves are commonly used in computer graphics and font design. |
Term | Definition |
---|---|
Anchor Point | A point that lies directly on the Bézier curve and determines its start and end positions. For example, in a cubic Bézier curve, the first and last points are anchor points. |
Control Point | A point that influences the curve’s shape but does not necessarily lie on the curve itself. These act as “handles” that pull the curve towards them, affecting its direction and curvature. |
Aspect | Anchor Point | Control Point |
---|---|---|
Definition | A point that lies on the curve and marks its start or end. | A point that influences the curve’s shape but does not necessarily lie on it. |
Function | Defines the endpoints of the curve (or intermediate points in composite curves). | Determines the direction and curvature of the curve. |
Presence in Quadratic Bézier Curve | 2 anchor points | 1 control point |
Presence in Cubic Bézier Curve | 2 anchor points | 2 control points |
Higher-Degree Bézier Curves | Typically 2 anchor points (unless part of a composite curve). | The number of control points is one more than the curve’s degree. |
Component | Details |
---|---|
Curve Definition | A Bézier curve with 6 anchor points is a fifth-degree (quintic) Bézier curve because the number of control points ($n+1$) determines the degree ($n$). |
Control Points | $P_0, P_1, P_2, P_3, P_4, P_5$ |
Parametric Equation | \(B(t) = \sum_{i=0}^{5} B_i^5(t) P_i\) |
Bernstein Polynomial | \(B_i^5(t) = \binom{5}{i} (1-t)^{5-i} t^i\) |
Binomial Coefficient | \(\binom{5}{i} = \frac{5!}{i!(5-i)!}\) |
Expanded Equation | \(B(t) = (1-t)^5 P_0 + 5(1-t)^4 t P_1 + 10(1-t)^3 t^2 P_2 + 10(1-t)^2 t^3 P_3 + 5(1-t)t^4 P_4 + t^5 P_5\) |
Parameter Range | $t \in [0, 1]$ |
Concept | Equation / Explanation |
---|---|
Polynomial Definition | A polynomial consists of a series of terms involving powers of a variable, typically expressed as: $P(x) = a_n x^n + a_{n-1} x^{n-1} + \dots + a_1 x + a_0$ where the exponents are added sequentially. |
Tetration Definition | Tetration is a form of repeated exponentiation, written as: $^n a = a^{a^{a^{\dots}}}$ where the exponentiation stacks instead of adding. |
Comparison to a Series | - A series consists of a sum of terms. - A polynomial is a finite sum of powers of $x$. - Exponentiation is an iterative multiplication operation. - Tetration is an iterative exponentiation operation. |
Growth Difference | Unlike a polynomial, a tetration does not consist of a sum of terms; instead, it is an iterated power tower, which grows much faster. |
Can Tetration Be Expressed as a Series? | Tetration does not naturally expand into a power series like a polynomial. However, in some cases, it can be approximated using: - Logarithmic expansions (breaking it down via $a^{a^{a^x}}$). - Power series representations (like Taylor series) for small values. But in general, tetration does not behave like a polynomial series because it is based on hierarchical exponentiation rather than summation. |
Concept | Equation / Explanation |
---|---|
Hybrid Polynomial-Tetration Possibility | A polynomial power series can be appended or modified as a hybrid with tetration, depending on how the two mathematical structures are combined. |
1. Direct Summation (Appending a Tetration Term) | A tetration term is added to a polynomial power series: $H(x) = \sum_{n=0}^{\infty} a_n x^n + c \cdot {}^m x$ where: - $\sum_{n=0}^{\infty} a_n x^n$ is a traditional polynomial or power series, - ${}^m x$ is the tetration term, - $c$ is a scaling coefficient. Blends polynomial growth with tetration’s extreme growth. |
2. Recursive Hybridization (Tetration Within a Polynomial) | Instead of adding tetration separately, we embed it into the polynomial: $H(x) = a_n ({}^m x)^n + a_{n-1} ({}^m x)^{n-1} + \dots + a_1 ({}^m x) + a_0$ Amplifies the polynomial’s growth through tetration. |
3. Series Expansion Involving Tetration (Power Series Approximation) | For small $x$, tetration can be approximated using a Taylor or power series expansion: ${}^m x = e^{x + x^2 + \frac{x^3}{3} + \dots}$ This allows for: $H(x) = \sum_{n=0}^{\infty} b_n ({}^m x)^n$ where $b_n$ are coefficients to moderate tetration’s extreme growth. |
4. Logarithmic Transformation (Taming Tetration Growth) | To prevent tetration from dominating a polynomial, we introduce logarithmic damping: $H(x) = \sum_{n=0}^{\infty} a_n x^n + d \log({}^m x)$ Controls tetration’s rapid growth by applying a logarithm. |
Challenges of Hybridizing a Polynomial with Tetration | 1. Growth Rate Disparity: Tetration grows much faster than polynomial terms. Scaling is necessary. 2. Analytic Continuation Issues: Tetration is not always well-defined for non-integer heights, requiring super-exponential extensions. 3. Computational Stability: Tetration grows hyper-exponentially, which can cause numerical instability. |
Conclusion | A hybrid polynomial-tetration function is possible with different formulations depending on the desired properties: - Controlled growth: Use logarithmic damping or power series approximations. - Ultra-fast growth: Use direct summation or embed tetration inside a polynomial. |