Next Article in Journal
Reciprocal Theorems for Multi-Cost Problems with S-Type I Functionals
Previous Article in Journal
Parallel Simulation Multi-Sample Task Scheduling Approach Based on Deep Reinforcement Learning in Cloud Computing Environment
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Evaluation Algorithms for Parametric Curves and Surfaces

College of Science, East China University of Technology, Nanchang 330013, China
Mathematics 2025, 13(14), 2248; https://doi.org/10.3390/math13142248
Submission received: 14 May 2025 / Revised: 26 June 2025 / Accepted: 27 June 2025 / Published: 11 July 2025

Abstract

This paper extends Woźny and Chudy’s linear-complexity Bézier evaluation algorithm (2020) to all parametric curves/surfaces with normalized basis functions via a novel basis function matrix decomposition. The unified framework covers the following: (i) B-spline/NURBS models; (ii) Bézier-type surfaces (tensor-product, rational, and triangular); (iii) enhanced models with shape parameters or non-polynomial basis spaces. For curves, we propose sequential and reverse corner-cutting modes. Surface evaluation adapts to type: non-tensor-product surfaces are processed through index-linearization to match the curve format, while tensor-product surfaces utilize nested curve evaluation. This approach reduces computational complexity, resolves cross-model compatibility issues, and establishes an efficient evaluation framework for diverse parametric geometries.

1. Introduction

In Computer-Aided Geometric Design (CAGD), parametric curves and surfaces are typically represented as linear combinations of control points and basis functions, given by
p ( t ) = i P i A i ( t )
for curves, and
p ( s , t ) = i j P i , j A i , j ( s , t ) ,
for surfaces, where A i ( t ) and A i , j ( s , t ) denote normalized basis functions. The most common basis functions include Bernstein polynomials for Bézier forms and piecewise polynomial bases for B-spline/NURBS models.
Recent research in CAGD has extended traditional Bézier and B-spline models in multiple dimensions:
  • The introduction of shape parameters: Adjustable parameters embedded in basis functions (e.g., models proposed by Chen and Wang [1], Han [2], and Zhu and Tang [3]) enhance local shape control capabilities;
  • Non-polynomial basis spaces: Novel parametric models have been constructed in trigonometric (Zhang [4] and Han et al. [5]) and hyperbolic function spaces (Lü et al. [6], Liu et al. [7]).
However, efficient evaluation algorithms for these extended models remain understudied. Most of the literature does not explicitly address their computational complexity, and recent works on complex rational Bézier curves (Jüttler et al. [8]) and q-Bézier triangular patches (Delgado et al. [9]) show that evaluation complexities still remain quadratic or cubic. Although Schumaker and Volk [10], Hu et al. [11], and Delgado and Peña [12] developed linear-complexity methods for specific basis functions, and Woźny and Chudy [13] proposed a linear-time corner-cutting algorithm for Bézier curves, these methods are limited to specific models and cannot be directly applied to the diverse parametric representations in CAGD.
The core challenge in CAGD is that existing linear-complexity algorithms are model-specific (e.g., only for Bézier curves), and cross-model incompatibility fails to meet the demand for O ( n ) complexity in real-time rendering, large-scale geometric modeling, and other scenarios. Therefore, constructing a unified linear-complexity evaluation framework applicable to all linear combinations of control points and basis functions becomes crucial to breaking through current technical bottlenecks.

2. Curve Evaluation Algorithms

To facilitate analysis, let us specify the curve model given by Equation (1).
Consider a parametric curve p n ( t ) defined over a real interval I, determined by n + 1 control points P 0 , P 1 , , P n R d ( d = 2 , 3 ), and basis functions A 0 n ( t ) , A 1 n ( t ) , , A n n ( t ) . The expression for the curve is given by
p n ( t ) = i = 0 n P i A i n ( t ) ,
where t I . In CAGD, the basis functions are typically non-negative and normalized, i.e., t I , A 0 n ( t ) , A 1 n ( t ) , , A n n ( t ) 0 and
i = 0 n A i n ( t ) = 1 .
We will now present two algorithms for computing any point on the curve p n ( t ) (Equation (3)).

2.1. Sequential Corner-Cutting Algorithm

Theorem 1.
Introduce the following definitions:
h i ( t ) = A i n ( t ) j = 0 i A j n ( t ) , i = 0 , 1 , , n , (5) Q i ( t ) = 1 h i ( t ) Q i 1 ( t ) + h i ( t ) P i , i = 1 , 2 , , n , (6)
with the initial condition Q 0 ( t ) = P 0 . Then, t I , we have
p n ( t ) = Q n ( t ) .
For convenience, the independent variable notation t will be omitted in the following text when it does not lead to ambiguity.
Remark 1.
According to Equation (6), h 0 is not needed when calculating Q i . Defining h 0 in Equation (5) simplifies subsequent expressions involving A 0 n .
Proof. 
We define the vectors P and A as follows:
P = P 0 P 1 P n ,
A = A 0 n A 1 n A n n .
The curve p n ( t ) (Equation (3)) can be expressed by matrix multiplication as
p n ( t ) = PA T .
Next, we introduce H i as
H i = j = 0 i A j n , i = 0 , 1 , , n .
From Equations (5) and (10), we obtain
A i n = h i H i , i = 0 , 1 , , n .
Equations (4) and (10) show that for i = 0 , 1 , , n 1 , the following relationship holds:
H i = 1 A n n A n 1 n A i + 2 n A i + 1 n = 1 A n n 1 A n 1 n 1 A n n 1 A i + 1 n 1 A n n A n 1 n A i + 2 n .
From Equation (12), in conjunction with the definition of h i (Equation (5)), we derive
H i = j = i + 1 n 1 h j ,
where i = 0 , 1 , , n 1 . Specifically, it follows from Equations (4) and (10) that
H n = 1 .
Based on Equations (11), (13), and (14), the vector A (Equation (8)) takes the following form:
A = h 0 j = 1 n 1 h j h 1 j = 2 n 1 h j h n 1 1 h n h n .
Furthermore, note that Equation (5) implies h 0 = 1 . We will now show that the vector A T can be expressed as a product of n matrices. Specifically, for i = 1 , 2 , , n 1 , define
C i = 1 h i h i ,
and let O i 1 denote the ( n i ) -dimensional zero column vector, O i 2 the 2 × ( n i ) zero matrix, and E i the ( n i ) × ( n i ) identity matrix. We construct n matrices B i of size ( n i + 2 ) × ( n i + 1 ) as follows:
B i = C i O i 2 O i 1 E i , i = 1 , 2 , , n 1 ; B n = 1 h n h n .
Using the associative law of matrix multiplication and multiplying from right to left, we can compare the result with Equation (15) to obtain
B 1 B n 2 B n 1 B n = 1 h 1 0 0 h 1 0 0 0 1 0 0 0 1 1 h n 2 0 0 h n 2 0 0 0 1 0 0 0 1 1 h n 1 0 h n 1 0 0 1 1 h n h n = A T .
Thus, the matrix representation of the curve p n ( t ) (Equation (9)) can be expressed as
p n ( t ) = P B 1 B 2 B n .
By substituting the elements of the matrices on the right-hand side of Equation (16) and performing the multiplication from left to right while incorporating the definition of Q i given by Equation (6), we derive
p n ( t ) = Q 0 P 1 P n 1 h 1 0 0 h 1 0 0 0 1 0 0 0 1 B 2 B n = Q 1 P 2 P n 1 h 2 0 0 h 2 0 0 0 1 0 0 0 1 B 3 B n = = Q n 1 P n 1 h n h n = Q n .
This completes the proof of Theorem 1 (Equation (7)).    □

2.2. Reverse Corner-Cutting Algorithm

Theorem 2.
Define the following:
g i ( t ) = A n i n ( t ) j = n i n A j n ( t ) , i = 0 , 1 , , n , (17) R i ( t ) = 1 g i ( t ) R i 1 ( t ) + g i ( t ) P n i , i = 1 , 2 , , n , (18)
with the initial condition R 0 ( t ) = P n . Then, t I , we have
p n ( t ) = R n ( t ) .
Remark 2.
According to Equation (18), g 0 is not needed when calculating R i . Defining g 0 in Equation (17) simplifies subsequent expressions involving A n n .
The proof of Theorem 2 is analogous to that of Theorem 1. To avoid redundancy and facilitate subsequent analysis, only the key results are presented here.
Proof. 
Let
G i = j = n i n A j n ( t ) , i = 0 , 1 , , n ,
Then, it follows that
A i n = g n i G n i , i = 0 , 1 , , n ,
can be derived from Equations (17) and (20). Based on Equations (4), (17), and (20), we derive
G i = j = i + 1 n 1 g j , i = 0 , 1 , , n 1 ; G n = 1 .
From Equations (21) and (22), we know that the vector A (Equation (8)) has the form
A = g n g n 1 1 g n g 1 j = 2 n 1 g j g 0 j = 1 n 1 g j .
Furthermore, the transpose of vector A , denoted as A T , can be expressed as the product of n matrices:
A T = M 1 M 2 M n ,
where each matrix M i is defined as
M i = E i O i 1 O i 2 N i , i = 1 , 2 , , n 1 ; M n = g n 1 g n .
The definitions of E i , O i 1 , and O i 2 are given in Proof (Section 2.1). Additionally, N i = g i 1 g i T . Thus, the matrix representation of the curve p ( t ) (Equation (9)) has the new form
p n ( t ) = P M 1 M 2 M n .
Substituting the elements of the matrices on the right side of Equation (23) and multiplying from left to right while incorporating the definition of R i (Equation (18)), we obtain
p n ( t ) = P 0 P n 1 R 0 1 0 0 0 1 0 0 0 g 1 0 0 1 g 1 M 2 M n = P 0 P n 2 R 1 1 0 0 0 1 0 0 0 g 2 0 0 1 g 2 M 3 M n = = P 0 R n 1 g n 1 g n = R n .
This completes the proof of Theorem 2 (Equation (19)).    □

2.3. Description of the Curve Evaluation Algorithms

The validity and stability of the proposed algorithms depend on specific properties of the basis functions:
  • Form requirement: The algorithms exclusively apply to curves represented in the form of Equation (3), where the curve is a linear combination of control points and basis functions. Classical interpolation schemes (e.g., Lagrange and Hermite) that do not conform to this representation fall outside the scope of this framework.
  • Normalization condition: For all parameter values t, the partition of unity must be satisfied (i.e., i = 0 n A i ( t ) = 1 in Equation (4)). Standard parametric bases (such as Bézier and B-spline) strictly satisfy this condition and are non-negative. However, some interpolation bases proposed in the literature (such as the basis by Yan and Liang [14]) also strictly satisfy the normalization condition but differ from standard bases in lacking non-negativity. The algorithms remain valid as long as normalization is satisfied.
  • Symmetry consideration: When A i n ( 1 t ) = A n i n ( t ) , the relationship h i ( 1 t ) = g i ( t ) allows Theorem 2 to be directly derived from Theorem 1. This symmetry is not a necessary condition for the correctness of Theorem 2, as the proof only relies on normalization. For example, the non-symmetric polynomial basis proposed by Hu et al. [15] can still be evaluated using the forward corner-cutting algorithm and backward corner-cutting algorithm.
  • Non-negativity and stability: For bases satisfying A i n ( t ) 0 (such as Bézier and B-spline bases), the weights h i ( t ) and g i ( t ) belong to [ 0 , 1 ] , ensuring stable linear interpolation. For the interpolation bases with negative values proposed by Yan and Liang [14], both the forward and backward corner-cutting algorithms can still be used for evaluation, but numerical instability may occur when | A i n ( t ) | 1 .
  • Discontinuity limitation: For basis functions with C 0 discontinuities (e.g., non-uniform B-splines at repeated knots), the algorithm remains mathematically correct if normalization holds piecewise. However, numerical instability may occur near discontinuities due to division by near-zero values of H i in Equation (5). To mitigate this, two approaches can be adopted. Firstly, we can use adaptive parameter spacing to avoid sampling within [ τ ϵ , τ + ϵ ] for discontinuity at τ , with ϵ = 10 δ recommended ( δ 10 , based on IEEE double-precision floating-point accuracy). Secondly, we can employ hybrid evaluation by switching to the de Boor Algorithm locally at detected discontinuities.
The key to constructing the recursive algorithm lies in the matrix decomposition of the vector A , which consists of basis functions A i n ( t ) for i = 0 , 1 , , n . Specifically, we see the following:
  • In Theorem 1, A T = B 1 B 2 B n ;
  • In Theorem 2, A T = M 1 M 2 M n .
Each recursion step corresponds to a matrix multiplication, generating one new point per operation. For a curve defined by n + 1 initial control points, n recursions generate n new points, with the final point being p n ( t ) .
For example, when calculating a point on a curve defined by four control points, the algorithms from Theorems 1 and 2 can be visualized using Figure 1a,b, where green points represent intermediate evaluation points generated during the iteration process, and red points denote the final obtained points derived from the algorithms.

2.4. Pseudo-Code and Complexity for Curve Evaluation Algorithms

Observe that the denominators of h i and g i in Theorems 1 and 2 can be computed recursively, leading to more efficient computation. The specific formulas are as follows:
  • For h i :
    -
    h i = A i n / H i , where i = 1 , 2 , , n ;
    -
    H i = H i 1 + A i n with the initial value H 0 = A 0 n .
  • For g i :
    -
    g i = A n i n / G i , where i = 1 , 2 , , n ;
    -
    G i = G i 1 + A n i n with the initial value G 0 = A n n .
The pseudo-code reflecting this efficiency improvement is provided as Algorithms 1 and 2.
Algorithm 1: Sequential corner-cutting algorithm
Mathematics 13 02248 i001
The complexity analysis of Algorithm 1 is as follows. The algorithm executes n (the degree of the curve) iterations (Lines 3–7), where each iteration involves computing the cumulative sum of basis functions (Line 4), calculating the weight h (Line 5), and updating the control point via linear interpolation (Line 6). Each iteration performs O ( 1 ) arithmetic operations (addition and division) and vector operations, leading to an overall time complexity of O ( n ) . In terms of memory complexity, Algorithm 1 requires only O ( 1 ) additional memory, as variables H, h, and Q are updated in place, eliminating the need for storing intermediate results.
Algorithm 2: Reverse corner-cutting algorithm
Mathematics 13 02248 i002
The complexity analysis for Algorithm 2 follows a similar logic to that of Algorithm 1. It executes n iterations to update G and g, with each iteration involving O ( 1 ) arithmetic operations (addition and division) and vector updates. This leads to an overall time complexity of O ( n ) and O ( 1 ) memory complexity due to in-place computations, which is identical to Algorithm 1.

2.5. Application Examples for Curve Evaluation Algorithms

All parametric curves defined by normalized bases, such as Bézier curves, rational Bézier curves, B-spline curves, and NURBS curves, can be evaluated using Algorithm 1 or Algorithm 2. Before applying these algorithms, it is necessary to express these curves in standard form (i.e., Equation (3)).
Classical Bézier curves and various extended Bézier curves presented in the literature naturally come in the form of Equation (3), so they can be used directly.
For rational Bézier curves and other curves represented by rational fractions, they need to be converted into an equivalent form with rational basis functions.
For example, a rational Bézier curve can be expressed as a weighted combination of control points P i with the weights ω i combined with Bernstein polynomials B i n ( t ) :
p n ( t ) = i = 0 n ω i P i B i n ( t ) i = 0 n ω i B i n ( t ) .
By defining new basis functions A i n ( t ) ,
A i n ( t ) = ω i B i n ( t ) j = 0 n ω j B j n ( t ) ,
we can rewrite the rational Bézier curve in a form that conforms to Equation (3), thus enabling the application of Algorithms 1 and 2.
When the weights ω in rational Bézier curves are unevenly distributed, taking Algorithm 1 as an example, the impact on the numerical stability of the algorithm is reflected in two aspects:
On the one hand, extreme weights lead to distortion of interpolation behavior. If the weight ω k of a certain control point is much larger than the remaining ω j ( j k ), the corresponding basis function A k n ( t ) 1 (when B k n ( t ) 0 ), and the recursive weight h k ( t ) 1 , causing the interpolation result to be excessively locked to the control point P k , which destroys the smooth transition of the curve. If a certain weight ω l is much smaller than the remaining ω j ( j l ), then A l n ( t ) 0 and h l ( t ) 0 , so that P l loses its effect on the interpolation result, and the local shape of the curve is prone to disconnection from P l .
On the other hand, numerical error accumulation leads to stability collapse. When the ω values differ significantly, the calculation of ω j B j n ( t ) will cause the basis function terms with small weights to be masked as 0 due to floating-point rounding errors, resulting in the distortion of the calculation of A i n ( t ) and the deviation of h i ( t ) from the theoretical value. Due to the recursive chain dependency of Algorithm 1 ( Q i ( t ) depends on Q i 1 ( t ) ), the initial error will be iteratively amplified, eventually leading to jumps or oscillations in the interpolation results and loss of stability.
When dealing with B-spline curves and their extensions, we encounter piecewise composite curves. The expression for this type of curve is typically a summation involving control points P i and piecewise basis functions N i k ( t ) :
p ( t ) = i = 0 m P i N i k ( t ) ,
where each basis function N i k ( t ) is non-zero only on a limited number of segments. To compute the point p ( t ) on the curve for a given parameter t, follow these steps:
  • Identify the segment containing t;
  • Determine the active control points and the explicit expressions of the non-zero basis functions for that segment.
This ensures the accurate transformation of each curve segment into the desired form (i.e., Equation (3)).
According to Yan [16], local Bézier extraction operators can be applied to obtain the explicit expressions of the non-zero basis functions for each B-spline curve segment. Alternatively, one can convert the B-spline curve into a series of piecewise Bézier curves using the method described by Yan [16] before evaluation.
For NURBS curves, which are essentially rational B-spline curves, the local Bézier extraction operator introduced by Yan [16] serves two main purposes:
  • It converts NURBS curves into piecewise rational Bézier curves;
  • It determines the rational basis functions that define each segment of the curves.
After this conversion, the evaluation can proceed using methods specific to rational curves based on these determined basis functions.
Figure 2a,b illustrate the evaluation results for the same C-Bézier curve from Reference [4], using Algorithms 1 and 2, respectively. Both figures show the points on the curve corresponding to the parameter t = 2 3 α (indicated by red pentagrams), with α = π .
Figure 3 presents a degree 4 NURBS curve defined by the control point sequence P = ( 0 , 0 ) , ( 1 , 2 ) , ( 1 2 , 4 ) , ( 3 , 9 2 ) , ( 6 , 5 2 ) , ( 3 , 2 ) , weight factors W = 1 , 1 2 , 1 2 , 1 2 , 1 2 , 1 , and knot vector T = 0 , 0 , 0 , 0 , 0 , 2 , 3 , 3 , 3 , 3 , 3 . It highlights the points on the curve corresponding to parameters t = 3 2 and t = 5 2 , as determined using Algorithm 1.
  • The black circles represent the initial control points;
  • The red pentagrams denote the points on the curves corresponding to the specified parameter values;
  • The green squares indicate the new control points generated during the recursive process.
Although the example of the C-Bézier curve in Figure 2 has verified the geometric equivalence of Algorithms 1 and 2, the evaluation of the degree 4 NURBS curve in Figure 3 better illustrates the computational characteristics of the algorithm for complex models. For a NURBS curve of degree k, the evaluation process consists of two stages:
  • Preprocessing stage: Using the local Bézier extraction operator in Ref. [16], the NURBS curve is converted into a piecewise rational Bézier form. The complexity of this process is O ( k 3 ) (approximately 64 operations when k = 4 ).
  • Main computation stage: Algorithm 1 is applied to evaluate each curve segment, with the per-point computational complexity being O ( k ) (approximately 4 operations when k = 4 , compared to O ( k 2 ) = 16 operations for the traditional de Boor algorithm).
Let q denote the number of sampling points within each knot interval. The total number of operations is the following:
  • Traditional method (e.g., de Boor): O ( q · k 2 ) ;
  • Proposed method: O ( k 3 + q · k ) .
When q > k 2 (e.g., q > 16 for k = 4 ), the linear term q · k in the proposed method dominates the computation. For examples, see the following:
  • Single-point sampling ( q = 1 ): The proposed method is 0.24× slower than de Boor due to preprocessing overhead (64 + 4 = 68 operations vs. 16 operations);
  • Dense sampling with 50 points ( q = 50 ): The proposed method requires 64 + 50 × 4 = 264 operations, achieving a 3.03× speedup over de Boor ( 50 × 16 = 800 operations).
This demonstrates that in scenarios requiring dense sampling ( q k 2 ), such as CAD rendering, the proposed framework effectively offsets the preprocessing cost through the linear complexity of the main computation stage, leading to efficiency optimization.
To validate the effectiveness of the evaluation algorithm, we took Algorithm 1 as an example to conduct a comprehensive performance comparison with the traditional de Casteljau algorithm for Bézier curves of different degrees. The experiments were performed on a computer equipped with an 11th Generation Intel® Core™ i5-1135G7 @ 2.40 GHz (2.42 GHz) processor and 16.0 GB (15.8 GB available) of memory, using MATLAB R2020b with double-precision arithmetic. To ensure reproducibility, random control points were generated with a fixed seed (2025). For each curve degree n (corresponding to 6, 11, 21, 51, and 101 control points), 1000 uniformly distributed parameter values were evaluated over 10 repeated trials, and the average runtime was measured and analyzed.
Key findings (Table 1, Figure 4):
  • Linear complexity: Algorithm 1 achieved up to 17.37× speedup at n = 100 , consistent with its O ( n ) complexity compared to the O ( n 2 ) complexity of the de Casteljau algorithm;
  • Performance at low degrees: The speedup was only 0.26× at n = 5 due to the constant overhead of basis function calculations, highlighting that the linear complexity advantage becomes more prominent for higher-degree curves.
The experimental results validate that Algorithm 1 achieves significant runtime improvements over the de Casteljau algorithm for higher-degree Bézier curves, aligning with theoretical complexity analysis. Its linear scaling makes it particularly suitable for real-time applications and large-scale geometric modeling, where traditional quadratic algorithms become computationally prohibitive.

3. Surface Evaluation Algorithms

In CAGD, there is a distinction between tensor-product and non-tensor-product parametric surfaces:
  • Tensor-product parametric surfaces: Typical examples include Bézier surfaces and B-spline surfaces. The domain of these surfaces is a rectangular region, and their basis functions can be expressed as the product of two univariate basis functions.
  • Non-tensor-product parametric surfaces: Representative examples include rational Bézier surfaces, NURBS surfaces, and triangular domain Bézier surfaces. The domain of these surfaces can be either rectangular or triangular, and their basis functions cannot be expressed as the product of two single-variable basis functions.

3.1. Tensor-Product Surfaces

To facilitate analysis, let us specify the surface model given by Equation (2).
Consider a tensor-product parametric surface p m , n ( s , t ) defined on a rectangular domain D. This surface is determined by ( m + 1 ) × ( n + 1 ) control points P i , j (where i = 0 , 1 , , m ;   j = 0 , 1 , , n ), arranged in a rectangular array, along with basis functions A i , j ( s , t ) = A i m ( s ) A j n ( t ) (for i = 0 , 1 , , m ;   j = 0 , 1 , , n ). The expression for the surface is given by
p m , n ( s , t ) = i = 0 m j = 0 n P i , j A i m ( s ) A j n ( t ) ,
where ( s , t ) D .
Since p m , n ( s , t ) is a tensor-product surface, the position of any point on the surface can be determined by repeatedly applying the curve evaluation algorithm described in Section 2.1 or Section 2.2 for computing a point on a curve:
  • First step: Apply the curve evaluation algorithm to the n + 1 polygons along the s-direction of the control grid using the parameter value s. After m levels of recursion, this results in a polygon with n + 1 points along the t-direction.
  • Second step: Apply the curve evaluation algorithm to this resulting polygon using the parameter value t. After n levels of recursion, a single point is obtained, which is the desired point p m , n ( s , t ) on the surface.
This two-step process effectively computes the point on the surface by decomposing the problem into simpler one-dimensional curve evaluations.
Alternatively, one can first apply the parameter value t to the m + 1 polygons along the t-direction of the control grid. This results in a polygon with m + 1 points along the s-direction after n levels of recursion. Then, applying the parameter value s results in a single point after m levels of recursion, which is the desired point p m , n ( s , t ) on the surface. The number of recursions and the number of new points generated are the same for both sequences: m n + m + n .
For each polygon, there are two choices for the order of corner-cutting when performing the curve evaluation algorithm: sequential or reverse order. If we first perform the computation along the s-direction and then along the t-direction, there are 2 n + 2 possible ways to choose from (derived from 2 n + 1 choices for the n + 1 polygons in the s-direction and 2 1 choices for the t-direction, i.e., 2 n + 1 × 2 1 = 2 n + 2 ). Next, we present the results for the processing sequence, where we first compute along the s-direction followed by the t-direction, using the sequential corner-cutting algorithm for each polygon. Other methods can be similarly derived.
Theorem 3.
Let us introduce the following definitions:
h i m ( s ) = A i m ( s ) k = 0 i A k m ( s ) , i = 1 , 2 , , m , h j n ( t ) = A j n ( t ) k = 0 j A k n ( t ) , j = 1 , 2 , , n , Q i , j = 1 h i m ( s ) Q i 1 , j + h i m ( s ) P i , j , i = 1 , 2 , , m ;   j = 0 , 1 , , n , R m , j = 1 h j n ( t ) R m , j 1 + h j n ( t ) Q m , j , j = 1 , 2 , , n ,
with the initial conditions Q 0 , j = P 0 , j for j = 0 , 1 , , n and R m , 0 = Q m , 0 . Then, ( s , t ) D , we have
p m , n ( s , t ) = R m , n .
The evolution of control points in the recursive process is illustrated in Figure 5, using a surface determined by a 4 × 3 control mesh as an example. In this figure, green points represent those obtained through recursion along the s-direction, blue points denote those derived along the t-direction, and red points indicate the final resulting points.

3.2. Non-Tensor-Product Surfaces

Consider a non-tensor product surface p m , n ( s , t ) defined on a rectangular domain D. This surface is determined by ( m + 1 ) × ( n + 1 ) control points P i , j (where i = 0 , 1 , , m ;   j = 0 , 1 , , n ), arranged in a rectangular array, along with basis functions A i , j ( s , t ) (for i = 0 , 1 , , m ;   j = 0 , 1 , , n ). The equation for the surface is given by
p m , n ( s , t ) = i = 0 m j = 0 n P i , j A i , j ( s , t ) ,
where ( s , t ) D .
Consider another non-tensor-product surface p n ( s , t ) defined on a triangular domain T = ( s , t ) s 0 , t 0 , s + t 1 . This surface is determined by ( n + 1 ) ( n + 2 ) / 2 control points P i , j (where i = 0 , 1 , , n ;   j = 0 , 1 , , n i ), arranged in a triangular array, along with basis functions A i , j ( s , t ) (for i = 0 , 1 , , n ;   j = 0 , 1 , , n i ). The equation for the surface is given by
p n ( s , t ) = i = 0 n j = 0 n i P i , j A i , j ( s , t ) ,
where ( s , t ) T .
To extend the curve evaluation algorithm introduced in Section 2 to non-tensor-product surfaces, we transform the two-dimensional indices of control points and basis functions into a one-dimensional format. The transformation is defined by mapping a two-dimensional index ( i , j ) to a one-dimensional index I = I ( i , j ) according to the following formulas:
  • For Equation (25), the mapping is given by I ( i , j ) = ( n + 1 ) i + j ;
  • For Equation (26), the mapping is adjusted to I ( i , j ) = ( n + 1 ) i + j i ( i 1 ) 2 .
Equations (25) and (26) can thus be unified and expressed as
p N ( τ ) = I = 0 N P I A I ( τ ) .
where the following applies:
  • For Equation (25), τ = ( s , t ) D , and N = m n + m + n ;
  • For Equation (26), τ = ( s , t ) T , and N = n ( n + 3 ) 2 .
For illustration, we see the following:
  • Consider the case where m = 2 and n = 3 . The correspondence between the control points P i j in Equation (25) and the control points P I in Equation (27) is shown in Figure 6.
  • Additionally, for n = 4 , the relationship between the control points P i j in Equation (26) and the control points P I in Equation (27) is depicted in Figure 7.
By comparing Equation (27) with Equation (3), we observe that both have the same structure. This indicates that in calculating points on the surface, one can either apply the method proposed in Theorem 1 or use the approach described in Theorem 2. Next, we present the results derived from Theorem 1; similar results based on Theorem 2 can be provided in a similar manner.
Theorem 4.
Let us introduce the following definitions:
h I ( τ ) = A I ( τ ) J = 0 I A J ( τ ) , Q I ( τ ) = 1 h I ( τ ) Q I 1 ( τ ) + h I ( τ ) P I ,
where I = 1 , 2 , , N , and with the initial condition Q 0 = P 0 . Then, for all τ D or τ T , we have
p N ( τ ) = Q N ( τ ) .

3.3. Pseudo-Code and Complexity for Surface Evaluation Algorithms

In Theorems 3 and 4, the terms h i m , h j n , and h I exhibit characteristics similar to h i and g i from Theorems 1 and 2: their denominators follow recursive formulas. By leveraging this property, we can develop Algorithms 3 and 4 for Theorems 3 and 4, respectively.
Algorithm 3: Tensor-product surface evaluation algorithm
Mathematics 13 02248 i003
The time complexity of Algorithm 3 is O ( m n ) , driven by m iterations along the s-direction (each involving n + 1 linear interpolations to update the t-direction control points) and n subsequent iterations along the t-direction. Specifically, the outer loop processes m rows of control points, with each row requiring n + 1 updates to the intermediate vector Q , leading to O ( m n ) operations. The inner t-direction loop adds O ( n ) operations, resulting in an overall O ( m n ) time complexity, which simplifies to O ( n 2 ) for square meshes ( m = n ).
The memory complexity is O ( n ) , as the algorithm maintains a n + 1 -dimensional vector Q to store intermediate control points along the t-direction. This vector scales linearly with the number of t-direction control points, and scalar variables ( H s , h s , H t , h t , R ) are updated in place.
Theorem 3 and Algorithm 3 present the evaluation framework for tensor-product surfaces using s-t order (s-direction first). Consider reversing the evaluation order: first, processing the t-direction and then the s-direction. While this maintains the same O ( m n ) time complexity, the space complexity becomes O ( m ) due to the intermediate storage requirements for s-direction points. Therefore, we can select the optimal evaluation order according to the values of m and n.
Theorem 5.
For any ( m + 1 ) × ( n + 1 ) tensor-product surface, see the following:
1. When m > n , use s-t order (Algorithm 3): Space O ( n ) ;
2. When m n , use t-s order (modified framework): Space O ( m ) .
The optimal selection reduces peak memory from max ( m , n ) to min ( m , n ) control points, saving | m n | storage slots without affecting time complexity.
Algorithm 4: Non-tensor-product surface evaluation algorithm
Mathematics 13 02248 i004
Algorithm 4 achieves a time complexity of O ( N ) , where N is the total number of control points minus one. The algorithm performs N sequential iterations, each involving a basis function sum, weight calculation, and linear interpolation, all in O ( 1 ) time due to the 1D index mapping of control points. This linear scaling mirrors the curve evaluation framework in Section 2, as non-tensor-product surfaces are reduced to a sequential corner-cutting process.
The memory complexity is O ( 1 ) , as the algorithm uses only scalar variables (H, h, Q ) for in-place computations. Unlike tensor-product surfaces, no intermediate vectors or dimension-specific storage are required, making Algorithm 4 efficient for large surfaces (e.g., triangular domains with N = n ( n + 3 ) 2 control points). This constant memory usage highlights the framework’s efficiency in both computation and storage.
The recursion depth of Algorithm 4 is fixed to N, which represents the theoretical minimum for sequential evaluation under the von Neumann architecture. This is because each interpolation step depends on the result of the previous computation, forming an inherent data dependency chain. Similar depth constraints apply to Algorithms 1–3, where recursion depth equals the degree n for curves or m + n for tensor-product surfaces.

3.4. Examples for Surface Evaluation Algorithms

All tensor-product surfaces defined by normalized bases, such as Bézier surfaces and B-spline surfaces, can be evaluated using Algorithm 3. Before applying this algorithm, it is necessary to express these surfaces in standard form (i.e., Equation (24)).
The classical Bézier surfaces and various extended Bézier surfaces presented in the literature naturally come in the form of Equation (24) and can be used directly.
B-spline surfaces and their extensions are piecewise composite surfaces. To compute the position of a point on the surface for given parameter values, see the following:
  • Determine which specific surface patch the point lies within;
  • Identify the control points that define this surface patch;
  • Express the corresponding basis functions explicitly.
By following these steps, the surface patch can be represented according to the form of Equation (24).
The local Bézier extraction operator, proposed in Reference [16], can be used to determine the explicit expressions of the basis functions for each B-spline surface patch. By applying this operator, a B-spline surface can be converted into a piecewise Bézier surface for evaluation.
It should be noted that tensor-product surfaces can be regarded as a special subclass of non-tensor-product surfaces. Therefore, in addition to Algorithm 3, Algorithm 4 is also applicable to tensor-product surfaces. Both algorithms require the same number of iterations when applied to such surfaces.
When applying Algorithm 4, it is first necessary to express the surface in the form shown by Equation (27). For triangular domain Bézier surfaces, this can be achieved simply by renumbering the control points and basis functions.
For rational Bézier surfaces and surface patches expressed in rational form, their general expression can be written as
p m , n ( s , t ) = i = 0 m j = 0 n ω i , j P i , j B i m ( s ) B j n ( t ) i = 0 m j = 0 n ω i , j B i m ( s ) B j n ( t ) .
By defining new basis functions,
A i , j ( s , t ) = ω i , j B i m ( s ) B j n ( t ) k = 0 m l = 0 n ω k , l B k m ( s ) B l n ( t ) ,
we can rewrite the surface in a form that conforms to Equation (25). By subsequently renumbering the control points and basis functions, the expression can be transformed into the format required by Equation (27).
For NURBS surfaces, which are essentially piecewise combinations of rational surfaces, the local Bézier extraction operator described in Reference [16] can be utilized prior to evaluation. This operator allows for the conversion of NURBS surfaces into piecewise rational Bézier surfaces and determines the rational basis functions for each surface patch. Following this, the evaluation can proceed using the methods outlined for rational surfaces.
Figure 8a,b depict the evaluation results for the same Bézier surface of degree 3 × 2 , utilizing Algorithms 3 and 4, respectively. Both figures highlight the points on the surface corresponding to the parameter ( t , s ) = 1 2 , 3 5 .
Figure 9 presents a 3-degree triangular domain Bézier surface. It highlights the point on the surface corresponding to the parameter ( t , s ) = ( 13 16 , 1 12 ) , as determined using Algorithm 4.
Figure 10 shows a bicubic NURBS surface composed of two surface patches, with knot vectors T = [ 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 ] and S = 0 , 0 , 0 , 0 , 1 3 , 1 , 1 , 1 , 1 . The control points matrix P is given by
P = ( 1 , 0 , 0 ) ( 2 , 0 , 3 ) ( 3 , 0 , 3 ) ( 4 , 0 , 3 ) ( 5 , 0 , 3 ) ( 1 , 1 , 4 ) ( 2 , 1 , 5 ) ( 3 , 1 , 1 ) ( 4 , 1 , 1 ) ( 5 , 1 , 5 ) ( 1 , 2 , 0 ) ( 2 , 2 , 3 ) ( 3 , 2 , 3 ) ( 4 , 2 , 3 ) ( 5 , 2 , 3 ) ( 1 , 3 , 4 ) ( 2 , 3 , 5 ) ( 3 , 3 , 1 ) ( 4 , 3 , 1 ) ( 5 , 3 , 5 ) ,
and the weight matrix W is given by
W = 1 2 4 3 1 1 3 2 4 1 1 2 2 2 1 1 2 1 2 1 .
Figure 10a,b depict the points on the first and second surface patches corresponding to the parameters ( t , s ) = ( 1 2 , 1 5 ) and ( t , s ) = ( 1 2 , 11 15 ) , respectively, as determined by Algorithm 4. For better visualization, Figure 10a,b are presented from distinct viewpoints.
In Figure 8, Figure 9 and Figure 10, the black circles denote the initial control points, the red pentagrams represent the points on the surfaces corresponding to the specified parameter values, and the squares indicate the new control points generated through the recursive process. Specifically, in Figure 8a, the green squares highlight the intermediate control points derived from recursion along the s direction, and the blue square indicates the new control point obtained from recursion along the t direction.

4. Conclusions

This paper constructs a unified evaluation framework for parametric curves and surfaces through basis function matrix decomposition, extending Woźny and Chudy’s (2020) linear-complexity Bézier evaluation algorithm [13] to all parametric curves/surfaces with normalized basis functions.
For curve evaluation complexity, Bézier curves achieve O ( n ) time complexity and O ( 1 ) memory consumption through sequential/reverse corner-cutting algorithms. A total of 100 evaluations show a 17.37× speedup compared to the traditional de Casteljau algorithm ( O ( n 2 ) ). For B-spline/NURBS curves, after local Bézier extraction conversion, the core algorithm has a time complexity of O ( k ) . Taking a fourth-order NURBS as an example, the total number of operations for 50-point dense sampling is 264, achieving a 3.03× speedup over the de Boor algorithm ( O ( k 2 ) ).
Regarding surface evaluation complexity, tensor-product surfaces adopt nested curve evaluation with a time complexity of O ( m n ) . Non-tensor-product surfaces are converted into a one-dimensional structure through index linearization, with a time complexity of O ( N ) and a memory consumption of O ( 1 ) .
The algorithm is applicable to basis function models satisfying the normalization condition, including Bézier-type curves/surfaces (including tensor-product, rational, and triangular domain), B-spline/NURBS models (evaluated through local Bézier extraction conversion), and enhanced models with shape parameters or non-polynomial basis spaces (such as trigonometric function basis and hyperbolic function basis models).
Future research will focus on non-uniform rational B-spline (NURBS) models to optimize the computational complexity of their preprocessing stage. For example, NURBS curve evaluation includes preprocessing ( O ( k 3 ) ) and a core algorithm ( O ( k ) ), and reducing the preprocessing complexity can further improve overall efficiency.

Funding

This research was supported by the National Natural Science Foundation of China (grant no. 11761008).

Data Availability Statement

No new data were created in this study, as the research is based on theoretical analysis and validation of existing algorithms. All relevant formulas and validation processes are provided in the main text.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Chen, Q.Y.; Wang, G.Z. A class of Bézier-like curves. Comput. Aided Geom. Des. 2003, 20, 29–39. [Google Scholar] [CrossRef]
  2. Han, X.L. A class of general quartic spline curves with shape parameters. Comput. Aided Geom. Des. 2011, 28, 151–163. [Google Scholar] [CrossRef]
  3. Zhu, Y.P.; Tang, Y.Y. A class of rational quartic splines and their local tensor product extensions. Comput.-Aided Des. 2023, 164, 103603. [Google Scholar] [CrossRef]
  4. Zhang, J. C-curves: An extension of cubic curves. Comput. Aided Geom. Des. 1996, 13, 199–217. [Google Scholar] [CrossRef]
  5. Han, X.A.; Ma, Y.C.; Huang, X.L. The cubic trigonometric Bézier curve with two shape parameters. Appl. Math. Lett. 2009, 22, 226–231. [Google Scholar] [CrossRef]
  6. Lü, Y.G.; Wang, G.Z.; Yang, X.N. Uniform hyperbolic polynomial B-spline curves. Comput. Aided Geom. Des. 2002, 19, 379–393. [Google Scholar] [CrossRef]
  7. Xumin, L.; Weixiang, X.; Yong, G.; Yuanyuan, S. Hyperbolic polynomial uniform B-spline curves and surfaces with shape parameter. Graph. Model. 2010, 72, 1–6. [Google Scholar] [CrossRef]
  8. Jüttler, B.; Schicho, J.; Šír, Z. Apollonian de Casteljau-type algorithms for complex rational Bézier curves. Comput. Aided Geom. Des. 2023, 107, 102254. [Google Scholar] [CrossRef]
  9. Delgado, J.; Orera, H.; Peña, J.M. An evaluation algorithm for q-Bézier triangular patches formed by convex combinations. J. Comput. Appl. Math. 2023, 428, 115184. [Google Scholar] [CrossRef]
  10. Schumaker, L.L.; Volk, W. Efficient evaluation of multivariate polynomials. Comput. Aided Geom. Des. 1986, 3, 149–154. [Google Scholar] [CrossRef]
  11. Hu, S.M.; Wang, G.Z.; Jin, T.G. Properties of two types of generalized ball curves. Comput.-Aided Des. 1996, 28, 125–133. [Google Scholar] [CrossRef]
  12. Delgado, J.; Peña, J.M. A shape preserving representation with an evaluation algorithm of linear complexity. Comput. Aided Geom. Des. 2003, 20, 1–10. [Google Scholar] [CrossRef]
  13. Woźny, P.; Chudy, F. Linear-time geometric algorithm for evaluating Bézier curves. Comput.-Aided Des. 2020, 118, 102760. [Google Scholar] [CrossRef]
  14. Yan, L.L.; Liang, J.F. A class of algebraic–trigonometric blended splines. J. Comput. Appl. Math. 2011, 235, 1713–1729. [Google Scholar] [CrossRef]
  15. Hu, G.; Wu, J.L.; Qin, X.Q. A novel extension of the Bézier model and its applications to surface modeling. Adv. Eng. Softw. 2018, 125, 27–54. [Google Scholar] [CrossRef]
  16. Yan, L.L. Conversion from NURBS to Bézier representation. Comput. Aided Geom. Des. 2024, 113, 102380. [Google Scholar] [CrossRef]
Figure 1. Principle of the algorithms.
Figure 1. Principle of the algorithms.
Mathematics 13 02248 g001
Figure 2. Evaluation of a C-Bézier curve. (a) Sequential corner-cutting (Algorithm 1). (b) Reverse corner-cutting (Algorithm 2).
Figure 2. Evaluation of a C-Bézier curve. (a) Sequential corner-cutting (Algorithm 1). (b) Reverse corner-cutting (Algorithm 2).
Mathematics 13 02248 g002
Figure 3. Evaluation of a NURBS curve.
Figure 3. Evaluation of a NURBS curve.
Mathematics 13 02248 g003
Figure 4. Performance comparison of Algorithm 1 and de Casteljau algorithm: (a) Computational time vs. Number of control points; (b) speedup ratio.
Figure 4. Performance comparison of Algorithm 1 and de Casteljau algorithm: (a) Computational time vs. Number of control points; (b) speedup ratio.
Mathematics 13 02248 g004
Figure 5. Evolution of control points.
Figure 5. Evolution of control points.
Mathematics 13 02248 g005
Figure 6. Conversion of control point numbers in a rectangular array.
Figure 6. Conversion of control point numbers in a rectangular array.
Mathematics 13 02248 g006
Figure 7. Conversion of control point numbers in a triangular array.
Figure 7. Conversion of control point numbers in a triangular array.
Mathematics 13 02248 g007
Figure 8. Evaluation of a Bézier surface. (a) Algorithm 3. (b) Algorithm 4.
Figure 8. Evaluation of a Bézier surface. (a) Algorithm 3. (b) Algorithm 4.
Mathematics 13 02248 g008
Figure 9. Evaluation of a triangular domain Bézier surface.
Figure 9. Evaluation of a triangular domain Bézier surface.
Mathematics 13 02248 g009
Figure 10. Evaluation of a NURBS surface. (a) The point corresponding to ( t , s ) = ( 1 2 , 1 5 ) . (b) The point corresponding to ( t , s ) = ( 1 2 , 11 15 ) .
Figure 10. Evaluation of a NURBS surface. (a) The point corresponding to ( t , s ) = ( 1 2 , 1 5 ) . (b) The point corresponding to ( t , s ) = ( 1 2 , 11 15 ) .
Mathematics 13 02248 g010
Table 1. Runtime comparison of Algorithm 1 and de Casteljau algorithm (Time unit: ms; each trial Includes 1000 sampling points averaged over 10 repetitions).
Table 1. Runtime comparison of Algorithm 1 and de Casteljau algorithm (Time unit: ms; each trial Includes 1000 sampling points averaged over 10 repetitions).
Control PointsAlgorithm 1de CasteljauSpeedup Ratio
66.361.650.26×
118.095.920.73×
216.2512.321.97×
518.7766.897.63×
10113.71238.1417.37×
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Yan, L. Evaluation Algorithms for Parametric Curves and Surfaces. Mathematics 2025, 13, 2248. https://doi.org/10.3390/math13142248

AMA Style

Yan L. Evaluation Algorithms for Parametric Curves and Surfaces. Mathematics. 2025; 13(14):2248. https://doi.org/10.3390/math13142248

Chicago/Turabian Style

Yan, Lanlan. 2025. "Evaluation Algorithms for Parametric Curves and Surfaces" Mathematics 13, no. 14: 2248. https://doi.org/10.3390/math13142248

APA Style

Yan, L. (2025). Evaluation Algorithms for Parametric Curves and Surfaces. Mathematics, 13(14), 2248. https://doi.org/10.3390/math13142248

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop