학교수업/수치해석

[Numerical Analysis] 5. Surface

hwijin97 2022. 5. 20. 16:55

Surface

- Bilinear surfaces

- Bi-cubic surfaces

- Bezier surfaces

- Spline surfaces

- Rendfering surfaces

 

To Represent boundaries of objects exactly

 

Implicit Surfaces

- in 3D, surfaces are represended as : $f(x,y,z) = 0$

Parametric Surfaces

- The value of each component $(x,y,z)$ depends on independent variables, $u$ and $v$.

- $p(u,v) = \begin{bmatrix} x(u,y) \\ y(u,v) \\ z(u,v)\end{bmatrix}$

 

Piecewise Parametric Surfaces

- Surface is partitioned into parametric patches ( $0\leq u \eq 1$, $0 \leq v \leq 1$ )

- Left Patch $Q$ - $q(1, v)$ = Right Patch $R$ - $r(0,v)$

 

Bilinear Surfaces

Linear interpolation of four corner points in the $u$ and $v$ directions $u$ : horizental, $v$ : vertical

4 control points : Left Botton - $P_{0,0}$, Left Top - $P_{0,1}$, Right Bottom - $P_{1,0}$, Right Top - $P_{1,1}$

- $P_{0,v} = (1-v)P_{0,0} + vP_{0,1}$

- $P_{1,v} = (1-v)P_{1,0} + vP_{1,1}$

- $P(u,v) = (10u)P_{0,v} + uP_{1,v} = (1-u)[(1-v)P_{0,0}+vP_{0,1}] + u[(1-v)P_{1,0} + vP_{1,1}]$

- $ = \begin{bmatrix} (1-u)(1-v) & u(1-v) & (1-u)v & uv \\ \end{bmatrix}\begin{bmatrix} P_{0,0} \\ P_{1,0} \\ P_{0,1} \\ P_{1,1}\end{bmatrix}$

- $P(u,v) = \begin{bmatrix} 1-u & u \\ \end{bmatrix}\begin{bmatrix} P_{0,v} \\ P_{1,v}\end{bmatrix}=\begin{bmatrix} 1-u & u \\ \end{bmatrix}\begin{bmatrix} P_{0,0} & P_{0,1} \\ P_{1,0} & P_{1,1} \\ \end{bmatrix}\begin{bmatrix} 1-v \\ v \end{bmatrix}$

 

- Advantage

    - Only four corner points need to be considered

- Limitations

    - Boundaries of the surface are straight

    - Surfaces generally tend to be flat

 

Bi-cubic Patches

Bi-cubic patches are represented by polynomials of degree 3 in the $u$ and $v$ directions

- $P(u,v) = \sum_{i=0}^3 \sum_{j=0}^3 a_{ij}u^i v^j$

- or written as a matrix equation, $P(u,v) = u^TMv$

 

There are 16 x 3 unknowns -> need 16 vector equations.

- Set $P(0,0), P(0,1), P(1,0), P(1,1)$

- Set $P_{u}(0,0), P_{u}(0,1), P_{u}(1,0), P_{u}(1,1)$

- Set $P_{v}(0,0), P_{v}(0,1), P_{v}(1,0), P_{v}(1,1)$

- Set "twist vectors" : $P_{uv}(0,0), P_{uv}(0,1), P_{uv}(1,0), P_{uv}(1,1)$

- ($P_u(0,0) = \frac{\partial P(0,0)}{\partial u}$) 

 

$$P(u,v) = \begin{bmatrix}
F_1(u) & F_2(u) & F_3(u)& F_4(u) \\
\end{bmatrix}\begin{bmatrix}
P(0,0) & P(0,1) & P_v(0,0) & P_v(0,1) \\
P(1,0) & P(1,1) & P_v(1,0) & P_v(1,1) \\
P_u(0,0) & P_u(0,1) & P_{uv}(0,0) & P_{uv}(0,1) \\
P_u(1,0) & P_u(1,1) & P_{uv}(1,0) & P_{uv}(1,1) \\
\end{bmatrix}\begin{bmatrix} F_1(v) \\ F_2(v) \\ F_3(v) \\ F_4(v)\end{bmatrix}$$

Where (These are the Hermite blending functions!) : $$\begin{matrix}
F_1(u) = 1-3u^2 2u^3 \\
F_2(u) = 3u^2-2u^3 \\
F_3(u) = u-2u^2 + u^3 \\
F_4(u) = -u^2 + u^3 \end{matrix}$$

 

- Advantages

    - Boundary curves are Hermite curves

    - Control over iterior points

- Limitations

    - What value to give to the twist vectors? - difficult to intuitively visualize the effect of the twist vectors

 

 

Bezier Surfaces

- The Bezier surface is an extension of the Bezier curve concept to one higher dimension

- Evaluate in $v$ to get control points in $u$.

$P(u,v) = \sum_{i=0}^n \sum_{j=0}^m P_{i,j} B_{i,n}(u) B_{j,m}(v)$

 

- We can verify that $P_{0,0}$ lies on the surface by substituing $u=0$, $v=0$ to see if we can get back $P_{0,0}$

    - $P(0,0) = P_{0,0}$ ( point )

- We can verify that the edge of the surface is a Bezier curve by substituing $u=0$

    - $P(0,v) = \sum_{j=0}^m P_{0,j} B_{j,m}(v)$ ( bezier curve )

 

- Advantages

    - Boundaries are Bezier curves

    - Intuitive control of surface interior

    - Derivatives can be evaluated using same method used to evaluate points

- Disadvantages

    - No local control (moving one control point affects entire surface)

 

 

Spline Surface

- Extension of the Spine curve

- 16 control points -> one surface ( 4 control points -> one curve )

$p(u,v) = \sum_{i=0}^3 \sum_{j=0}^3 b_i(u) b_j(v) P_{ij} = u^TM_S P M_S^T v = b(u)^T P b(v)$ -> same with Spline

 

 

 

 

'학교수업 > 수치해석' 카테고리의 다른 글

[Numerical Analysis] 7. PCA  (0) 2022.05.20
[Numerical Analysis] 6. Rendering  (0) 2022.05.20
[Numerical Analysis] 4. Curve  (0) 2022.05.20
[Numerical Analysis] 3. Transformation  (0) 2022.05.19
[Numerical Analysis] 2. Matrix  (0) 2022.05.19