• A parametric curve is described as a function of a parameter t.
  • A line is an instance of a curve.

Bézier Curves

  • A ray define by the star point and the direction vector is represented in a parametric equation.
  • Consider a line segment between two end points, p0p_{0} and p1p_{1}. Vector p1−p0p_{1} - p_{0} corresponds to the direction vector →\to line segment can be represented as:
Pasted image 20240221125313

p(t)=p0+t(p1−p0)p(t) = p_{0} + t(p_{1}-p_{0}) =(1−t)p0+tp1=(1-t)p_{0}+tp_{1}

  • A line segment connecting two end points is represented as a linear interpolation of the points.
  • The linear segment may be considered as being divided into two part by p(t)p(t), and the weight for an end point is proportional to the length of the part "on the opposite side", i.e., the weights for p0p_{0} and p1p_{1} are (1−t)(1-t) and tt, respectively.
Pasted image 20240221154334 p(t)=(x(t)y(t)z(t))=((1−t)x0+tx1(1−t)y0+ty1(1−t)z0+tz1)p(t)= \begin{pmatrix} x(t) \\ y(t) \\ z(t) \end{pmatrix} = \begin{pmatrix} (1-t)x_{0} +tx_{1} \\ (1-t)y_{0} + ty_{1} \\ (1-t)z_{0}+tz_{1} \end{pmatrix}
  • De Casteljau algorithm = recursive linear interpolations for defining a curve. The quadratic Bézier curve interpolates the end points, p0p_{0} and p2p_{2}, and is pulled toward p1p_{1}, but does not interpolate it, but does not interpolate it.
Pasted image 20240221155832
  • The cubic Bézier curve interpolates the end points, p0p_{0} and p3p_{3}, and is pulled toward p1p_{1} and p3p_{3}.
Pasted image 20240221184557

p(t)=(1−t)3p0+3t(1−t)2p1+3t2(1−t)p2+t3p3p(t) = (1-t)^{3}p_{0} + 3t(1-t)^{2}p_{1} + 3t^{2}(1-t)p_{2} + t^3p_{3}

  • The De Casteljau algorithm can be applied for a higher-degree Bézier curve. For example, a quartic (degree - 4) Bézier curve can be constructed using five points.
Pasted image 20240221185051
  • Such higher-degree curves often reveal undesired wiggles. Worse still, they to not bring significant advantages. In contrast, quadratic curves have little flexibility. Therefore, cubic Bézier curves are most popularly used in the graphics field.

  • The points pisp_{i}s are called controled points. A degree-n curve requires (n+1) control points. The coefficients associated with control point are polynomials of parameter t, and are named Bernstein polynomials.

Bin(t)=nCiti(1−t)(n−i)B^{n}_{i}(t) = _{n}C_{i}t^{i}(1-t)^{(n-i)}

p(t)=∑t=0nBin(t)pip(t) = \sum\limits_{t = 0}^{n}B_{i}^{n}(t)p_{i}

Screenshot 2024-02-21 190206
  • Different orders of the control points produce different curves.
  • The typical method to display a Bézier curve is to approximate it using a series of line segments. This process is often called tessellation. It evaluates the curve at a fixed set of parameter values, and joins the evaluated points with straight lines.

Hermit curve

Catmull-Rom Spline

Built with LogoFlowershow