Post

[컴선설] Lec 03 Bezier Curve

[컴선설] Lec 03 Bezier Curve

1. Parametric Curve

Types of function

  • Explicit function : $y=f(x)$ : open
  • Implicit function : $f(x, y) = 0$ : closed
  • Parametric function : $f(t)$ : function of time $t$ (auxiliary variable)

Parametric curve

  • Express high-dimensional space with time $t$
\[{\bf c}(t) = \begin{bmatrix}x(t) \\ y(t) \\ z(t)\end{bmatrix} = \begin{bmatrix}a_0 + a_1t + a_2 t^2 \\ b_0 + b_1t + b_2 t^2 \\ c_0 + c_1t + c_2 t^2\end{bmatrix}\]

2. Polynomial basis

Bernstein basis

  • sum-to-one property : summing up all basis with same degree = 1
  • Degree : 1
  • $B_0^1(t) = (1-t) , B_1^1(t) = t$
  • Degree : 2
  • $B_0^2 = (1-t)^2, B_1^2 (t) = 2(1-t) t, B_2^2(t) = t^2$
\[B_i^n(t) = \begin{pmatrix} n \\ i \end{pmatrix} (1-t)^{n-i}t^i\]
  • Transform monomial form to Bernstein form : compare coefficients

Sketch Curve using Bernstein basis coefficients

  • Ex) $f(t) = 2(1-t)^3 + {10 \over 3}3(1-t)^2t+ {8\over 3} 3(1-t)t^2+3t^3$
  • $b_0 = 2, b_1 = {10\over 3}, b_2 = {8\over 3}, b_3 = 1$
  • Graph $C(t)$
\[C(t) = \begin{bmatrix}t \\ f(t)\end{bmatrix} = \begin{bmatrix}0/3 B_0^3(t) & 1/3 B_1^3(t) & 2/3 B_2^3(t) & 3/3B_3^3(t) \\ b_0B_0^3(t) & b_1 B_1^3(t) & b_2 B_2^3(t) & b_3B_3^3(t)\end{bmatrix}\]
  • Four control points
\[(i/n, b_i)\]
  • $t = \sum_{i=0}^3{i\over 3}B_i^3(t)$
  • Example!

3. Bezier curve

  • To draw bezier curve with control points
  • Each coefficient is control point on the plane

4. De Casteljau algorithm

  • Method of finding POC on bezier curve without using formula
  • to determine point with time $t$,
  • Divide with ratio $t:1-t$, and iterate

  • $P(t) = (1-t)p_0 + tp_1$
  • For division, apply $t:1-t$

  • For computing with given points, must perform $(1-t)P_{\text{left}} + tP_{\text{right}}$
1
2
3
4
<decas>
for r = 1 < n :
  for i=0 < n-r :
    coeff[i] = (1-t) coeff[i] + t coeff[i+1]

Convex hull property

  • Convex polygon that covers all points in given plane
  • Every POC is located interior of convex hull generated by Control Points

Endpoint interpolation

  • The first control point($\bf b_0$) is the POC when time $t=0$
  • The last control point($\bf b_n$) is the POC when time $t=1$

Variation Diminishing

  • Number of variation(변곡) of polygon ≥ Number of variation of Bezier curve

5. Bezier Basis Function

  • To obtain a specific basis function in a Bezier curve, set the value of the control point at that time to one, 0 elsewhere.
  • $x(t) = b_0 B_0^n(t)+ b_1B_1^n(t) + \cdots + b_nB_n^n(t)$
  • $b_i = \delta(i)$ → $x(t) = B_i^n(t)$
This post is licensed under CC BY 4.0 by the author.