Please enable Javascript to view the contents

·  ☕ 7 分钟

## 1. 连续曲线

$$\pmb p=\pmb C(u_0)$$

$$\pmb C_u=\frac{\partial \pmb C(u)}{\partial u}$$

$$\pmb T=\frac{\pmb C_u}{\|\pmb C_u\|}$$

\begin{aligned} \pmb C_{uu}&=\frac{\partial^2\pmb C(u)}{\partial u^2}\\\\ \pmb B&=\frac{\pmb C_u\times\pmb C_{uu}}{\|\pmb C_u\times\pmb C_{uu}\|} \end{aligned}

\begin{aligned} \pmb N&=\frac{\pmb C_{uu}-(\pmb T\cdot \pmb C_{uu})\cdot\pmb T}{\|\pmb C_{uu}-(\pmb T\cdot \pmb C_{uu})\cdot\pmb T\|}\\\\ &=\pmb B\times \pmb T\\\\ &=\frac{(\pmb C_u\times\pmb C_{uu})\times\pmb C_u}{\|\pmb C_u\times\pmb C_{uu}\|\|\pmb C_u\|} \end{aligned}

\begin{aligned} \pmb N_T&=\pmb N_s=\pmb N_u\frac{\partial u}{\partial s}\\\\ \pmb T&=\pmb C_s=\pmb C_u\frac{\partial u}{\partial s}=\frac{C_u}{\|\pmb C_u\|}=\pmb C_u\frac{1}{\sqrt{\pmb C_u\cdot\pmb C_u}}\\\\ \kappa&=-\pmb T\cdot\pmb N_T\\\\ &=-\pmb C_s\cdot\pmb N_s\\\\ &=-\left(\pmb C_u\frac{\partial u}{\partial s}\right)\cdot\left(\pmb N_u\frac{\partial u}{\partial s}\right)\\\\ &=-(\pmb C_u\cdot\pmb N_u)\left(\frac{\partial u}{\partial s}\right)^2\\\\ &=-\frac{\pmb C_u\cdot\pmb N_u}{\pmb C_u\cdot\pmb C_u}\\\\ &=\frac{\|\pmb C_u\times\pmb C_{uu}\|}{\|\pmb C_u\|^3} \end{aligned}

## 2. 连续曲面

### 2.1. 基本性质

$$\pmb p=\pmb S(u_0,v_0)$$
$u$方向的切向量$\pmb S_u$：
$$\pmb S_u=\frac{\partial\pmb S(u,v)}{\partial u}$$
$v$方向的切向量$\pmb S_v$：
$$\pmb S_v=\frac{\partial\pmb S(u,v)}{\partial v}$$

$$\pmb T=u\pmb S_u+v\pmb S_v$$

\begin{aligned} \pmb T\cdot\pmb T &=\begin{pmatrix}u&v\end{pmatrix}\begin{pmatrix}\pmb S_u\\\pmb S_v\end{pmatrix}\cdot\begin{pmatrix}\pmb S_u&\pmb S_v\end{pmatrix}\begin{pmatrix}u\\v\end{pmatrix}\\\\ &=\begin{pmatrix}u&v\end{pmatrix}\begin{pmatrix}\pmb S_u\cdot\pmb S_u&\pmb S_u\cdot\pmb S_v\\\pmb S_u\cdot\pmb S_v&\pmb S_v\cdot\pmb S_v\end{pmatrix}\begin{pmatrix}u\\v\end{pmatrix}\\\\ &=\begin{pmatrix}u&v\end{pmatrix}\begin{pmatrix}\pmb E&\pmb F\\\pmb F&\pmb G\end{pmatrix}\begin{pmatrix}u\\v\end{pmatrix}\\\\ &=\begin{pmatrix}u&v\end{pmatrix}\pmb I_S\begin{pmatrix}u\\v\end{pmatrix} \end{aligned}

$$\pmb N=\frac{\pmb S_u\times\pmb S_v}{\|\pmb S_u\times\pmb S_v\|}$$

\begin{aligned} \kappa&=-\pmb T\cdot\pmb N_T\\\\ &=\begin{pmatrix}u&v\end{pmatrix}\begin{pmatrix}-\pmb S_u\\-\pmb S_v\end{pmatrix}\cdot\begin{pmatrix}\pmb N_u&\pmb N_v\end{pmatrix}\begin{pmatrix}u\\v\end{pmatrix}\\\\ &=\begin{pmatrix}u&v\end{pmatrix}\begin{pmatrix}-\pmb S_u\cdot\pmb N_u&-\pmb S_u\cdot\pmb N_v\\-\pmb S_v\cdot\pmb N_u& -\pmb S_v\cdot \pmb N_v\end{pmatrix}\begin{pmatrix}u\\v\end{pmatrix}\\\\ &=\begin{pmatrix}u&v\end{pmatrix}\begin{pmatrix}\pmb S_{uu}\cdot\pmb N_{u}&-\pmb S_{uv}\cdot\pmb N_v\\\pmb S_{vu}\cdot\pmb N_u& \pmb S_{vv}\cdot \pmb N_v\end{pmatrix}\begin{pmatrix}u\\v\end{pmatrix}\\\\ &=\begin{pmatrix}u&v\end{pmatrix}\begin{pmatrix}\pmb L&\pmb M\\\pmb M&\pmb N\end{pmatrix}\begin{pmatrix}u\\v\end{pmatrix}\\\\ &=\begin{pmatrix}u&v\end{pmatrix}\pmb{II}_s\begin{pmatrix}u\\v\end{pmatrix} \end{aligned}

### 2.2. 曲率张量与局部性质

$$\begin{pmatrix} \pmb S_u\\\pmb S_v \end{pmatrix}= \begin{pmatrix} a&0\\b\cos\theta&b\sin\theta \end{pmatrix} \begin{pmatrix} \pmb S_s\\\pmb S_t \end{pmatrix}= \pmb A\begin{pmatrix} \pmb S_s\\\pmb S_t \end{pmatrix}$$

\begin{aligned} \pmb I_s &=\begin{pmatrix} \pmb S_u\\\pmb S_v \end{pmatrix}\cdot\begin{pmatrix} \pmb S_u&\pmb S_v \end{pmatrix}\\\\ &=\pmb A\begin{pmatrix} \pmb S_s\\\pmb S_t \end{pmatrix}\cdot\begin{pmatrix} \pmb S_s&\pmb S_t \end{pmatrix}\pmb A^T\\\\ &=\pmb A\pmb A^T=\begin{pmatrix}a^2&ab\cos\theta\\ab\cos\theta&b^2\end{pmatrix} \end{aligned}

\begin{aligned} T&=\begin{pmatrix}u&v\end{pmatrix} \begin{pmatrix}\pmb S_u\\\pmb S_v\end{pmatrix}= \begin{pmatrix}s&t\end{pmatrix} \begin{pmatrix}\pmb S_s\\\pmb S_t\end{pmatrix}\\\\ &=\begin{pmatrix}u&v\end{pmatrix}\pmb A \begin{pmatrix}\pmb S_s\\\pmb S_t\end{pmatrix}= \begin{pmatrix}s&t\end{pmatrix}A^{-1} \begin{pmatrix}\pmb S_u\\\pmb S_v\end{pmatrix} \end{aligned}

\begin{aligned} \begin{pmatrix}s&t\end{pmatrix}&=\begin{pmatrix}u&v\end{pmatrix}\pmb A\\\\ \begin{pmatrix}u&v\end{pmatrix}&=\begin{pmatrix}s&t\end{pmatrix}\pmb A^{-1} \end{aligned}

\begin{aligned} \kappa_T&=-\pmb T\cdot\pmb N_T\\\\ &=\begin{pmatrix}u&v\end{pmatrix} \begin{pmatrix}-\pmb S_u\\-\pmb S_v\end{pmatrix}\cdot \begin{pmatrix}\pmb N_u&\pmb N_v\end{pmatrix} \begin{pmatrix}u\\v\end{pmatrix}\\\\ &=\begin{pmatrix}u&v\end{pmatrix}\pmb {II}_s \begin{pmatrix}u\\v\end{pmatrix}\\\\ &=\begin{pmatrix}s&t\end{pmatrix}\pmb A^{-1}\pmb {II}_s(\pmb A^{-1})^T \begin{pmatrix}s\\t\end{pmatrix}\\\\ &=\begin{pmatrix}s&t\end{pmatrix}\pmb{II}_{\tilde s} \begin{pmatrix}s\\t\end{pmatrix} \end{aligned}

$$\pmb{II}_{\tilde s}=\pmb A^{-1}\pmb {II}_s(\pmb A^{-1})^T$$

• 特征值：${\kappa_1,\kappa_2}$
• 特征向量：${\pmb E_1,\pmb E_2}$

$\pmb{II}_{\tilde s}$的特征分解
$$\pmb{II}_{\tilde s}=\hat{\pmb V}\pmb \Lambda\hat{\pmb V}^{-1}= \begin{pmatrix}s_1&s_2\\t_1&t_2\end{pmatrix} \begin{pmatrix}\kappa_1&0\\0&\kappa_2\end{pmatrix} \begin{pmatrix}s_1&s_2\\t_1&t_2\end{pmatrix}^{-1}$$

$$\begin{pmatrix}\pmb E_1&\pmb E_2\end{pmatrix}= \begin{pmatrix}\pmb S_s&\pmb S_t\end{pmatrix} \begin{pmatrix}s_1&s_2\\t_1&t_2\end{pmatrix}$$

\begin{aligned} s=\cos(\alpha+\varphi)\\ t=\sin(\alpha+\varphi) \end{aligned}

\begin{aligned} \begin{pmatrix}s\\t\end{pmatrix} &=\begin{pmatrix}\cos(\varphi+\alpha)\\\sin(\varphi+\alpha)\end{pmatrix} =\begin{pmatrix}\cos\varphi\cos\alpha-\sin\varphi\sin\alpha\\ \sin\varphi\cos\alpha+\cos\varphi\sin\alpha\end{pmatrix}\\\\ &=\begin{pmatrix}\cos\varphi&-\sin\varphi\\\sin\varphi&\cos\varphi\end{pmatrix}\begin{pmatrix}\cos\alpha\\\sin\alpha\end{pmatrix}\\\\ &=\pmb V\begin{pmatrix}\cos\alpha\\\sin\alpha\end{pmatrix} \end{aligned}

\begin{aligned} \kappa_\alpha&= \begin{pmatrix}s&t\end{pmatrix}\pmb{II}_{\tilde s}\begin{pmatrix}s\\t\end{pmatrix}\\\\ &=\begin{pmatrix}\cos(\varphi+\alpha)&\sin(\varphi+\alpha)\end{pmatrix}\pmb{II}_{\tilde s}\begin{pmatrix}\cos(\varphi+\alpha)\\\sin(\varphi+\alpha)\end{pmatrix}\\\\ &=\begin{pmatrix}\cos\alpha&\sin\alpha\end{pmatrix}\pmb V^{-1}\pmb{II}_{\tilde s}\pmb V\begin{pmatrix}\cos\alpha\\\sin\alpha\end{pmatrix}\\\\ &=\begin{pmatrix}\cos\alpha&\sin\alpha\end{pmatrix} \begin{pmatrix}\kappa_1&0\\0&\kappa_2\end{pmatrix} \begin{pmatrix}\cos\alpha\\\sin\alpha\end{pmatrix}\\\\ &=\kappa_1\cos^2\alpha+\kappa_2\sin^2\alpha \end{aligned}

\begin{aligned} \pmb W &=\pmb I_s^{-1}\pmb{II}_s\\\\ &=((\pmb A^{-1})^T\pmb A^{-1})(\pmb A\pmb{II}_{\tilde s}\pmb A^T)\\\\ &=(\pmb A^{-1})^T\pmb A^{-1}\pmb A\pmb{II}_{\tilde s}\pmb A^T\\\\ &=(\pmb A^{-1})^T(\hat{\pmb V}\pmb\Lambda\hat{\pmb V}^{-1})\pmb A^T\\\\ &=((\pmb A^{-1})^T\hat{\pmb V})\pmb\Lambda((\pmb A^{-1})^T\hat{\pmb V})^{-1}\\\\ &=\pmb V\pmb \Lambda\pmb V^{-1} \end{aligned}

\begin{aligned} \pmb W&=\pmb I_s^{-1}\pmb{II}_s\\\\ &=\frac{1}{{EG}- F^2}\begin{pmatrix} G&- F\\- F& E\end{pmatrix}\begin{pmatrix} L& M\\- M& N\end{pmatrix}\\\\ &=\frac{1}{ {EG}- F^2}\begin{pmatrix} {GL}-{FM}&{GM}-{FN}\\{EM}-{FL}&{EN}-{FM}\end{pmatrix} \end{aligned}

\begin{aligned} \kappa_{1,2}&=\frac{GL-2FM+EN\pm\sqrt{(GL-2FM+EN)^2-4(EG-F^2)(LN-M^2)}}{2(EG-F^2)} \end{aligned}

$$\kappa_G=\kappa_1\kappa_2=\det(\pmb W)=\frac{LN-M^2}{EG-F^2}$$

$$\kappa_M=\frac{\kappa_1+\kappa_2}{2}=\frac{trace(\pmb W)}{2}=\frac{GL-2FM+EN}{2(EG-F^2)}$$

### 2.4. Laplace算子

$$\Delta f=\mathrm{div}\nabla f=\mathrm{div}\begin{pmatrix}f_u\\f_v\end{pmatrix}=f_{uu}+f_{vv}$$
Laplace-Beltramis算子对定义在曲面上的函数进行扩展，对于定义在流形曲面$\mathcal S$上的函数$f$，Laplace-Beltrami算子定义为：
$$\Delta_{\mathcal S}f=\mathrm{div}_\mathcal S\nabla_\mathcal Sf$$

$$\Delta_\mathcal S\pmb X=-2H\pmb n$$

## 3. 离散微分算子

### 3.1. 局部平均域

• 基本思想：计算网格上点$\pmb x$的局部邻域$\mathcal N(\pmb x)$
• 局部邻域大小决定了计算的稳定性与精度
• 大范围局部平均：平滑化
• 小范围局部平均：网格数据更精确
• 计算方法
• Barycentric cell：三角形重心（三角形中线交点）
• Voronoi cell：三角形外心
• 混合Voronoi cell：对于Voronoi cell中的钝角三角形，使用边的中点

### 3.2. 法向量

$$\pmb n(T)=\frac{(\pmb x_j-\pmb x_i)\times(\pmb x_k-\pmb x_i)}{\|(\pmb x_j-\pmb x_i)\times(\pmb x_k-\pmb x_i)\|}$$

$$\pmb n(v)=\frac{\sum_{T\in\mathcal N_1(v)}\alpha_T\pmb n(T)}{\|\sum_{T\in\mathcal N_1(v)}\alpha_T\pmb n(T)\|}$$

• $\alpha_T=1$：常数加权，计算高效，但不考虑边的长度、三角形区域或角度，因此对于非规则网格可能出现奇怪的结果
• $\alpha_T=|T|$：基于三角形面积进行加权，计算高效，但有时也可能出现反直觉结果
• $\alpha_T=\theta_T$：与邻域三角形角度相关的足够小测地圆盘，虽然计算代价增加，但总体会得到更好的结果

### 3.3. 梯度

$$f(\pmb u)=f_iB_i(\pmb u)+f_jB_j(\pmb u)+f_kB_k(\pmb u)$$

$$\nabla f(\pmb u)=f_i\nabla B_i(\pmb u)+f_j\nabla B_j(\pmb u)+f_k\nabla B_k(\pmb u)$$

$$\nabla f(\pmb u)=(f_j-f_i)\nabla B_j(\pmb u)+(f_k-f_i)\nabla B_k(\pmb u)$$

$B_i$表示为三角形投影所占的面积比，即：
$$B_i(\pmb u)=\frac{A_i}{A_T}=\frac{\left((\pmb u-\pmb x_j)\cdot\dfrac{(\pmb x_k-\pmb x_j)^\perp}{\|\pmb x_k-\pmb x_j\|_2}\right)\|\pmb x_k-\pmb x_j\|_2}{2A_T}=\frac{(\pmb x-\pmb x_j)(\pmb x_k-\pmb x_j)^\perp}{2A_T}$$

\begin{aligned} \nabla B_i(\pmb u)=\frac{(\pmb x_k-\pmb x_j)^\perp}{2A_T}\\ \nabla B_j(\pmb u)=\frac{(\pmb x_i-\pmb x_k)^\perp}{2A_T}\\ \nabla B_k(\pmb u)=\frac{(\pmb x_j-\pmb x_i)^\perp}{2A_T} \end{aligned}

\begin{aligned} \nabla f(\pmb u)&= f_i\frac{(\pmb x_k-\pmb x_j)^\perp}{2A_T}+ f_j\frac{(\pmb x_i-\pmb x_k)^\perp}{2A_T}+ f_k\frac{(\pmb x_j-\pmb x_i)^\perp}{2A_T}\\\\ &=(f_j-f_i)\frac{(\pmb x_i-\pmb x_k)^\perp}{2A_T}+(f_k-f_i)\frac{(\pmb x_j-\pmb x_i)^\perp}{2A_T} \end{aligned}

### 3.4. 离散Laplace-Beltramis算子

#### 3.4.1. Uniform Laplacian

$$\Delta f(v_i)=\frac{1}{|\mathcal N_1(v_i)|}\sum_{v_j\in\mathcal N_1(v_i)}(f_j-f_i)$$

• 仅依赖于连接性：简单、高效
• 对于非规则三角化逼近效果较差

#### 3.4.2. Cotangent formula

$$\int_{A_i}\Delta f(\pmb u)\mathrm dA=\int_{A_i}\mathrm{div}\nabla f(\pmb u)\mathrm dA=\int_{\partial A_i}\nabla f(\pmb u)\cdot\pmb n(\pmb u)\mathrm ds$$

\begin{aligned} \int_{\partial A_i\cap T}\nabla f(\pmb u)\cdot\pmb n(\pmb u)\mathrm ds &=\nabla f(\pmb u)\cdot(\pmb a-\pmb b)^\perp\\ &=\frac{1}{2}\nabla f(\pmb u)\cdot(\pmb x_j-\pmb x_k)^\perp \end{aligned}

\begin{aligned} \int_{\partial A_i\cap T}\nabla f(\pmb u)\cdot\pmb n(\pmb u)\mathrm ds &=(f_j-f_i)\frac{(\pmb x_i-\pmb x_k)^\perp\cdot(\pmb x_j-\pmb x_k)^\perp}{4A_T}+ (f_k-f_i)\frac{(\pmb x_j-\pmb x_i)^\perp\cdot(\pmb x_j-\pmb x_k)^\perp}{4A_T} \end{aligned}

$$A_T=\frac{1}{2}\sin\gamma_j\|\pmb x_j-\pmb x_i\|\|\pmb x_j-\pmb x_k\| =\frac{1}{2}\sin\gamma_k\|\pmb x_i-\pmb x_k\|\|\pmb x_j-\pmb x_k\|$$

$$\cos\gamma_j=\frac{(\pmb x_j-\pmb x_i)\cdot(\pmb x_j-\pmb x_k)}{\|\pmb x_j-\pmb x_i\|\|\pmb x_j-\pmb x_k\|}\quad \cos\gamma_j=\frac{(\pmb x_i-\pmb x_k)\cdot(\pmb x_j-\pmb x_k)}{\|\pmb x_i-\pmb x_k\|\|\pmb x_j-\pmb x_k\|}$$

\begin{aligned} \int_{\partial A_i\cap T}\nabla f(\pmb u)\cdot\pmb n(\pmb u)\mathrm ds= \frac{1}{2}(\cot\gamma_k(f_j-f_i)+\cot\gamma_j(f_k-f_i)) \end{aligned}

$$\int_{A_i}\Delta f(\pmb u)\mathrm dA=\frac{1}{2}\sum_{v_j\in\mathcal N_1(v_i)}(\cot\alpha_{i,j}+\cot\beta_{i,j})(f_j-f_i)$$

$$\Delta f(v_i):=\frac{1}{2A_i}\sum_{v_j\in\mathcal N_1(v_i)}(\cot\alpha_{i,j}+\cot\beta_{i,j})(f_j-f_i)$$

• 可能出现负权重
• 与三角化相关

### 3.5. 离散曲率

$$\Delta\pmb x=-2H\pmb n$$

$$H(v_i)=\frac{1}{2}\|\Delta\pmb x_i\|$$

$$G(v_i)=\frac{1}{A_i}\left(2\pi-\sum_{v_j\in\mathcal N_1(v_i)}\theta_j\right)$$

$$\kappa_{1,2}(v_i)=H(v_i)\pm\sqrt{H(v_i)^2-K(v_i)}$$

### 3.6. 离散曲率张量

$$\pmb C(v)=\frac{1}{A(v)}\sum_{\pmb e\in A(v)}\beta(\pmb e)\|\pmb e\cap A(v)\|\overline{\pmb e}\overline{\pmb e}^T$$

Wenbo Chen
CG Student