# Detail-Preserving Shape Unfolding
## 3 Technical Details
### Shape Unfolding Model  
The proposed shape unfolding model inherits the advantages of mass-spring system. It stretches the distance of non-neighbor vertex pairs on \(\mathcal{S}\) while preserving the rigidity of each cell. Our model can be written in the following form:  
Figure 1: The illustration of local rigid deformation. Cell \(\mathcal{C}_{i}\) and its deformed version \(\mathcal{C}^{\prime}_{i}\) are composed of these black edges.  
\[\begin{split}\mathcal{L}(\mathbf{P}^{\prime})&=-\sum_{i} \sum_{j\
ot\in\mathcal{N}_{i}}k_{ij}\|\mathbf{p}_{i}^{\prime}-\mathbf{p}_{j}^{ \prime}\|^{2}\\ &+\beta\sum_{i}\sum_{j\in\mathcal{N}_{i}}w_{ij}\|\mathbf{p}_{i}^{ \prime}-\mathbf{p}_{j}^{\prime}-\mathbf{R}_{i}(\mathbf{p}_{i}-\mathbf{p}_{j}) \|^{2}\,,\end{split} \tag{3}\]  
where, \(\beta\) is a parameter to balance the two items, \(w_{ij}\) and \(k_{ij}\) are the weights for vertex pairs. Through large experiments, we observe that it obtains satisfactory results when \(w_{ij}\) and \(k_{ij}\) are set to 1. The influence of \(\beta\) will be discussed in Section 4.  
In Equation (3), the first item is applied to stretch the non-neighboring vertex pairs as far from each other as possible. The second item is the summation of Equation (2) for all vertex, which is used to promote a rigid local deformation.  
By setting \(\mathbf{b}_{ij}=\mathbf{R}_{i}(\mathbf{p}_{i}-\mathbf{p}_{j})\), the minimization of Equation (3) is equivalent to minimize the following equation  
\[\begin{split}\mathcal{L}(\mathbf{P}^{\prime})&=- \sum_{i}\sum_{j\
ot\in\mathcal{N}_{i}}\|\mathbf{p}_{i}^{\prime}-\mathbf{p}_{j} ^{\prime}\|^{2}+\beta\sum_{i}\sum_{j\in\mathcal{N}_{i}}\|\mathbf{p}_{i}^{ \prime}-\mathbf{p}_{j}^{\prime}\|^{2}\\ &-2\beta\sum_{i}\sum_{j\in\mathcal{N}_{i}}(\mathbf{p}_{i}^{ \prime}-\mathbf{p}_{j}^{\prime})^{T}\mathbf{b}_{ij}+\beta\sum_{i}\sum_{j\in \mathcal{N}_{i}}\|\mathbf{b}_{ij}\|^{2}.\end{split} \tag{4}\]  
Equation (4) can be further rewritten into the following matrix form  
\[\begin{split}\mathcal{L}(\mathbf{P}^{\prime})&=- \textit{Tr}(\mathbf{P}^{\prime T}\mathbf{V}_{1}\mathbf{P}^{\prime})+\beta \textit{Tr}(\mathbf{P}^{\prime T}\mathbf{V}_{2}\mathbf{P}^{\prime})\\ &-2\beta\textit{Tr}(\mathbf{P}^{\prime T}\mathbf{H})+F,\end{split} \tag{5}\]  
where, \(\textit{Tr}(.)\) represents the trace of a matrix, \(\mathbf{V}_{1}\), \(\mathbf{V}_{2}\), \(\mathbf{H}\) and constant \(F\) are given by  
\[\begin{split}\mathbf{V}_{1}&=\sum_{i}\sum_{j\
ot\in \mathcal{N}_{i}}(\mathbf{e}_{i}-\mathbf{e}_{j})^{T}(\mathbf{e}_{i}-\mathbf{e}_ {j}),\\ \mathbf{V}_{2}&=\sum_{i}\sum_{j\in\mathcal{N}_{i}}( \mathbf{e}_{i}-\mathbf{e}_{j})^{T}(\mathbf{e}_{i}-\mathbf{e}_{j}),\\ \mathbf{H}&=\sum_{i}\sum_{j\in\mathcal{N}_{i}}( \mathbf{e}_{i}-\mathbf{e}_{j})^{T}\mathbf{b}_{ij},\\ F&=\beta\sum_{i}\sum_{j\in\mathcal{N}_{i}}\| \mathbf{b}_{ij}\|^{2},\end{split} \tag{6}\]  
where, \(\mathbf{e}_{i}\) is the \(i\)th row of an identity matrix. Taking the derivative of the unknown \(\mathbf{P}^{\prime}\) and setting the derivative to zero, we can obtain \(\mathbf{P}^{\prime}\) by solving the following linear system [45]  
\[(\beta\mathbf{V}_{2}-\mathbf{V}_{1})\mathbf{P}^{\prime}=\beta\mathbf{H}\,. \tag{7}\]