Computer Graphics I

Assignment 8

Group III (Yavor Kaloyanov)

Jan Hendrik Dithmar

2031259

Pascal Gwosdek

2505221

Assignment 8  Dithmar (2031259), Gwosdek (2505221)

8.1 C^{1} and G^{1} continuity

a. For two curves q_{1}, q_{2} it holds:

C^{1} ⇒ G^{1}
C^{1} ⇔ q′_{1}(n) = q′_{2}(n)

⇒^{(∗)} ∇q_{1}(n) = ∇q_{2}(n) ⇔ G^{1}

where (∗) holds for |q′_{1}(n)| ≠ 0. b.

γ(t) = (t^{2}, t)
γ′(t) = (2t, 1)
ν(t) = (t^{3} + 4t + 1, 2t + 1)
ν′(t) = (3t^{2} + 4, 2)
γ(1) = (1, 1), ν(0) = (1, 1) ⇒ C^{0}
γ′(1) = (2, 1), ν′(0) = (4, 2) ⇒ 2γ′(1) = ν′(0) ⇒ G^{1}
γ′(1) ≠ ν′(0) ⇒ not C^{1}

c.

γ(t) = (t, t^{2} − 2t)
γ′(t) = (1, 2t − 2)
ν(t) = (t + 1, t^{2} + 1)
ν′(t) = (1, 2t)
γ′(1) = (1, 0) = ν′(0) = (1, 0) ⇒ C^{1} ⇒ G^{1}

8.2 Hermite Spline

a.

(I) p(0) = ( \begin{matrix}a_{1} & b_{1} & c_{1} & d_{1} \\ a_{2} & b_{2} & c_{2} & d_{2} \\ a_{3} & b_{3} & c_{3} & d_{3} \end{matrix} ) \underbrace{( \begin{matrix}0 \\ 0 \\ 0 \\ 1 \end{matrix} )}_{=( \begin{matrix}t^{3} \\ t^{2} \\ t^{1} \\ t^{0} \end{matrix} ) for t=0} = ( \begin{matrix}0 \\ 1 \\ 0 \end{matrix} )

(II) p(1) = ( \begin{matrix}a_{1} & b_{1} & c_{1} & d_{1} \\ a_{2} & b_{2} & c_{2} & d_{2} \\ a_{3} & b_{3} & c_{3} & d_{3} \end{matrix} ) ( \begin{matrix}1 \\ 1 \\ 1 \\ 1 \end{matrix} ) = ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} )

(III) p′(0) = ( \begin{matrix}a_{1} & b_{1} & c_{1} & d_{1} \\ a_{2} & b_{2} & c_{2} & d_{2} \\ a_{3} & b_{3} & c_{3} & d_{3} \end{matrix} ) \underbrace{( \begin{matrix}0 \\ 0 \\ 1 \\ 0 \end{matrix} )}_{=( \begin{matrix}3t^{2} \\ 2t \\ 1t^{0} \\ 0 \end{matrix} ) for t=0} = ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} )

(IV) p′(1) = ( \begin{matrix}a_{1} & b_{1} & c_{1} & d_{1} \\ a_{2} & b_{2} & c_{2} & d_{2} \\ a_{3} & b_{3} & c_{3} & d_{3} \end{matrix} ) ( \begin{matrix}3 \\ 2 \\ 1 \\ 0 \end{matrix} ) = ( \begin{matrix}0 \\ −1 \\ 0 \end{matrix} )

d = ( \begin{matrix}0 \\ 1 \\ 0 \end{matrix} ) from (I), c = ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} ) from (III)

⇒ ( \begin{matrix}a_{1} & b_{1} & 0 & 0 \\ a_{2} & b_{2} & 0 & 0 \\ a_{3} & b_{3} & 0 & 0 \end{matrix} ) ( \begin{matrix}1 \\ 1 \\ 1 \\ 1 \end{matrix} ) = ( \begin{matrix}0 \\ −1 \\ 0 \end{matrix} ) and ( \begin{matrix}a_{1} & b_{1} & 0 & 0 \\ a_{2} & b_{2} & 0 & 0 \\ a_{3} & b_{3} & 0 & 0 \end{matrix} ) ( \begin{matrix}3 \\ 2 \\ 1 \\ 0 \end{matrix} ) = ( \begin{matrix}−1 \\ −1 \\ −1 \end{matrix} )

⇒a_{1} = −b_{1}; a_{2} = −1 − b_{2}; a_{3} = −b_{3}
⇒ − 3b_{1} + 2b_{1} = −1 ⇔ b_{1} = 1; −3 − 3b_{2} + 2b_{2} = −1 ⇔ b_{2} = −2;
3b_{3} + 2b_{3} = −1 ⇔ b_{3} = 1
⇒b = ( \begin{matrix}1 \\ −2 \\ 1 \end{matrix} )
⇒a = ( \begin{matrix}−1 \\ 1 \\ −1 \end{matrix} )

b.

P (t) = ( \begin{matrix}0 \\ 1 \\ 0 \end{matrix} ) (1 − t)^{2}(1 + 2t) + ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} ) t(1 − t)^{2}

+ ( \begin{matrix}0 \\ −1 \\ 0 \end{matrix} ) t^{2}(1 − t) + ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} ) (3 − 2t)t^{2}

= ( \begin{matrix}0 \\ 1 \\ 0 \end{matrix} ) (2t^{3} + 3t^{2} + 1) + ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} ) (t^{3} − 2t^{2} + t)

+ ( \begin{matrix}0 \\ −1 \\ 0 \end{matrix} ) (t^{3} − t^{2}) + ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} ) (−2t^{3} − 3t^{2})

= ( \begin{matrix}−1 \\ 1 \\ −1 \end{matrix} ) t^{3} + ( \begin{matrix}1 \\ −2 \\ 1 \end{matrix} ) t^{2} + ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} ) t + ( \begin{matrix}0 \\ 1 \\ 0 \end{matrix} )

8.3 DeCasteljau

a.

y  x b_{0} b_{1}  b_{3} b^{4} B(\frac{1}{2}) B(\frac{1}{2}) ≈ (3.4, 1.3)

b.

B_{2}^{3} (\frac{1}{2}) = \frac{1}{2} · B_{1}^{2} (\frac{1}{2}) + \frac{1}{2} · B_{0}^{2} (\frac{1}{2})

= \frac{1}{2} · (\frac{1}{2} · B_{2}^{1} (\frac{1}{2}) + \frac{1}{2} · B_{1}^{1} (\frac{1}{2})) + \frac{1}{2} · (\frac{1}{2} · B_{1}^{1} (\frac{1}{2}) + \frac{1}{2} · B_{0}^{1} (\frac{1}{2}))

= \frac{1}{4} · B_{2}^{1} (\frac{1}{2}) + \frac{1}{2} · B_{1}^{1} (\frac{1}{2}) + \frac{1}{4} · B_{0}^{1} (\frac{1}{2})

= \frac{1}{4} (\frac{1}{2}(5, 0) + \frac{1}{2}(5, 1)) + \frac{1}{2} (\frac{1}{2}(5, 1) + \frac{1}{2}(2, 2)) + \frac{1}{4} (\frac{1}{2}(2, 2) + \frac{1}{2}(1, 1))

= (\frac{5}{4}, \frac{1}{8}) + (\frac{7}{4}, \frac{3}{4}) + (\frac{3}{8}, \frac{3}{8})

= (\frac{27}{8}, \frac{10}{8}) = (3.375, 1.250)

8.4 Bezier Splines

A(t) = a_{0}(1 − t)^{3} + 3a_{1}t(1 − t)^{2} + 3a_{2}t^{2}(1 − t) + a_{3}t^{3}
= a_{0}(−t^{3} + 3t^{2} − 3t − 1) + 3a_{1}(t^{3} − 2t^{2} + t) + 3a_{2}(−t^{3} + t^{2}) + a_{3}t^{3}

= t^{3}(−a_{0} + 3a_{1} − 3a_{2} + a_{3}) + t^{2}(3a_{0} − 6a_{1} + 3a_{2}) + t(−3a_{0} + 3a_{1}) − 3a_{0}

A′(t) = 3t^{2}(−a_{0} + 3a_{1} − 3a_{2} + a_{3}) + 2t(3a_{0} − 6a_{1} + 3a_{2}) + (−3a_{0} + 3a_{1})

analogously:

B′(t) = 3t^{2}(−b_{0} + 3b_{1} − 3b_{2} + b_{3}) + 2t(3b_{0} − 6b_{1} + 3b_{2}) + (−3b_{0} + 3b_{1})
A′(1) = 3(−a_{0} + 3a_{1} − 3a_{2} + a_{3}) + 2(3a_{0} − 6a_{1} + 3a_{2}) − (3a_{0} + 3a_{1}) = −3a_{2} + 3a_{3}
B′(0) = −3b_{0} + 3b_{1}
A′(1) = −3a_{2} + 3a_{3} = 3(a_{3} − a_{2}) =^{a_{3}−a_{2}=b_{1}−b_{2}} 3(b_{1} − b_{0})
= −3b_{0} + 3b_{1} = B′(0) ⇒ C^{1}; a_{3} = b_{0} ⇒ C^{0}