A New Geometric Representation for 3D Bijective Mappings and Applications
Extracted source text · arXiv 2308.05333
\documentclass{article}
\usepackage{arxiv}
\usepackage[utf8]{inputenc}
\usepackage{amssymb,amsmath,amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\usepackage{subcaption}
\usepackage{color}
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{arydshln}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{calc}
\DeclareUnicodeCharacter{2212}{-}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\renewcommand\algorithmicthen{:}
\renewcommand\algorithmicdo{:}
\algrenewcommand\algorithmicrequire{\textbf{Input:}}
\algrenewcommand\algorithmicensure{\textbf{Output:}}
\usepackage{hyperref}
\newcounter{rownumbers}
\newcommand\rownumber{\stepcounter{rownumbers}\arabic{rownumbers}}
\title{A Novel 3D Mapping Representation and its Applications}
\author{\hspace{1mm}Qiguang Chen\\
Department of Mathematics\\
The Chinese University of Hong Kong\\
\texttt{qgchen@math.cuhk.edu.hk} \\
%% examples of more authors
\And
\hspace{1mm}Lok Ming Lui \\
Department of Mathematics\\
The Chinese University of Hong Kong\\
\texttt{lmlui@math.cuhk.edu.hk} \\
}
\begin{document}
\maketitle
\input{Sections/abstract}
\keywords{Quasiconformal mapping, Beltrami coefficient, 3D quasiconformal representation, 3D Linear Beltrami Solver, Keyframe interpolation, 3D mapping compression}
\section{Introduction}
\input{Sections/introduction}
\section{Contributions}\label{sec:contributions}
\input{Sections/contributions}
\section{Related works}\label{sec:related_works}
\input{Sections/related_works}
\section{Mathematical background}
In the following sections, we will introduce the Mathematical background for this paper. It includes three parts, polar decomposition for decomposing rotation and dilation, quasiconformal mapping in the 2D space, and some observation related to matrix inverse.
\subsection{Polar decomposition}
\input{Sections/math_background/polar_decomposition}
\subsection{2D Quasiconformal maps and Beltrami coefficients}
\input{Sections/math_background/2DQC}
\subsection{An observation related to matrix inverse}
\input{Sections/math_background/observation}
\section{3D mapping representation} \label{sec:proposed_model} In this section, we will provide a detailed description of our proposed 3D mapping representation for diffeomorphisms. We call it a ``representation" because it includes all the information needed to reconstruct the corresponding mapping, which is a feature not present in many existing methods. Therefore we have a reconstruction method for the proposed representation.
The organization of this section is as follows. We begin by extending the Beltrami coefficients to 3D space. Since there is no Beltrami equation for 3D space, we refer to these extended coefficients as 3D quasiconformal representation. Next, we derive an elliptic partial differential equation that relates the mappings to their 3D quasiconformal representation. Finally, we discretize the equation to obtain a linear system. By solving this system with appropriate boundary conditions, we can reconstruct mappings from their representation. Then we summarize the proposed representation and reconstruction algorithm using pseudo code. Experimental results for mapping reconstruction are provided at the end of this section to demonstrate the performance of our algorithm.
\subsection{3D quasiconformal representation}
\input{Sections/3DQC/representation}
\subsection{The PDE in the continuous case}
\input{Sections/3DQC/continuous}
\subsection{Discretisation and implementation}
\input{Sections/3DQC/discrete}
\subsection{Analysis}
\input{Sections/3DQC/analysis}
\subsection{Pseudo-codes}
This section provides a summary of the algorithms discussed in the previous sections by presenting the pseudo-codes for each method, as shown in Algorithm \ref{alg:cap} and \ref{alg:recon}.
\input{pseudo_code/algorithm1}
\input{pseudo_code/algorithm2}
\subsection{Experiments}
\input{Sections/3DQC/experiment}
\section{Applications}
The above representation can be applied to 3D animation interpolation and mapping compression. In the following, we will introduce these two applications and show their experimental results.
\subsection{3D keyframe interpolation}
\input{Sections/application/interpolation}
\subsection{3D mapping compression}
\input{Sections/application/compression}
\clearpage
\section{Conclusion}
\input{Sections/conclusion}
\bibliographystyle{IEEEtran}
\bibliography{mylib}
\end{document}
\begin{abstract}
The analysis of mapping relationships and distortions in multidimensional data poses a significant challenge in contemporary research. While Beltrami coefficients offer a precise description of distortions in two-dimensional mappings, current tools lack this capability in the context of three-dimensional space. This paper presents a novel approach: a 3D quasiconformal representation that captures the local dilation of 3D mappings, along with a reconstruction algorithm that establishes a connection between this representation and the corresponding mapping. Experimental results showcase the algorithm's effectiveness in mapping reconstruction, keyframe interpolation, and mapping compression. These features bear a resemblance to the 2D Linear Beltrami Solver technique. The work presented in this paper offers a promising solution for the precise analysis and adjustment of distortions in 3D data and mappings.
\end{abstract}
In modern scientific research, one of the main motivations is to process the vast amount of information encountered by human beings. This information includes 1D, 2D, and 3D data, which we encounter daily. Acoustic algorithms have been developed to process 1D information such as voice, while image data captured by cameras, rendered in games, and used in medical scenarios, such as X-ray images, are examples of 2D data. In mathematics, we consider surfaces on a 3D object as 2D and typically parameterize them on the 2D plane for further processing. 3D information includes MRI from brain, CT scans for chest, etc.
When analyzing relationships between pairs or groups of objects, we often use mappings to represent these relationships. However, when working with mappings, it's important to be mindful of the distortion that can arise from numerical implementations. In the 2D case, Beltrami coefficients, which are based on the Beltrami equation, can be used to measure the distortion of 2D mappings effectively. By controlling or analyzing the Beltrami coefficients of mappings, we can perform registration or shape analysis. However, this approach only works for 2D space. Unfortunately, we currently lack such an effective tool to describe distortion in 3D space precisely.
For a long time, we had no efficient way to reconstruct mappings from Beltrami coefficients. Obtaining Beltrami coefficients from mappings is straightforward, but the inverse direction is not explicitly defined in the Beltrami equation. However, the Linear Beltrami Solver (LBS) \cite{lui2013texture} has tackled this problem by providing an effective link between Beltrami coefficients and mappings. LBS has been successful in the field of mapping distortion adjustment, enabling the adjustment of distortion in both forward and backward directions. Various algorithms based on LBS have been proposed to solve challenging problems such as efficient parameterization, image registration, segmentation, retargeting, deturbulence, Teichmuller mapping, and harmonic Beltrami signature. Recently, some learning-based methods have been developed based on LBS, leveraging prior knowledge from data and the topological preservation advantages of LBS to effectively address challenging tasks and outperform conventional methods in various aspects.
However, LBS is theoretically based on the Beltrami's equation, which can only provides a relationship between Beltrami coefficients and mappings in 2D space. when dealing with distortions in 3D space, LBS and its related efficient algorithms cannot be generalized for use in three dimensions. Unlike in 2D space, there is no quasiconformal representation similar to Beltrami coefficients in 3D space, nor is there an equation that relates this representation to its corresponding mapping.
In this paper, we propose a 3D quasiconformal representation that can effectively describe the local dilation of a 3D mapping and an algorithm similar to LBS, connecting this representation and its corresponding mapping. We also propose a keyframe interpolation algorithm and a 3D mapping compression algorithm based on the proposed 3D quasiconformal representation and the reconstruction algorithm. Experimental results show the effectiveness of this algorithm.
The main contributions of this paper are outlined as follows.
\medskip
\begin{enumerate}
\item We propose an effective 3D quasiconformal representation to describe the local dilation of 3D mappings.
\item We derive a partial differential equation that connects the proposed 3D quasiconformal representation and its corresponding mapping. Similar to LBS, this PDE can be discretized into a linear system, and boundary conditions and landmarks can be imposed easily.
\item We further show that under our discretization scheme, the resulting linear system is symmetric positive definite, meaning that the linear system can be solved efficiently using the conjugate gradient method.
\item Based on the above algorithm, we propose an algorithm for 3D keyframe interpolation in the film and animation industry.
\item Based on the above algorithm, we propose a 3D mapping compression algorithm for 3D unstructured mesh.
\end{enumerate}
The computational method of conformal mapping \cite{desbrun2002intrinsic,levy2002least} has proven to be highly beneficial in the field of computer graphics. After the groundbreaking study by Gu et al. \cite{gu2004genus}, there has been significant progress in using the conformal geometry framework for surface processing tasks. The work of Zayer, Rossl, and Seidel \cite{zayer2005discrete} already contains implicit generalizations of these ideas. Lui and his coauthors proposed the quasi-conformal extension of the surface registration framework, which includes the map compression \cite{lui2010compression} and the Linear Beltrami Solver (LBS) introduced in \cite{lui2013texture}. This solver has been used to develop fast spherical and disk conformal parameterization techniques \cite{choi2015flash, choi2015fast}, as well as various registration algorithms for different applications \cite{chen2019image,lam2014genus,lam2015landmark,lam2014landmark,lam2015quasi,lui2014teichmuller,lui2014geometric,lui2010shape,lui2012optimization,qiu2020inconsistent,wen2015landmark,yung2018efficient,zeng2014surface,zhang2019new,zhang2014automatic, zhang2018novel}. Additionally, LBS has been utilized in various segmentation algorithms for different applications \cite{chan2018topology,siu2020image,DaopingZhang2021Taci,zhang2021topology_3d}. Besides, it has also been applied to shape analysis \cite{CHAN2016177,chan2020quasi,choi2020tooth,choi2020shape,lui2013shape,meng2016tempo}. Learning-based methods based on LBS \cite{chen2021deep,guo2023automatic} were also proposed to perform topology-preserving registration in the 2D space. However, due to the limitation of the quasiconformal theory the LBS is based on, these useful techniques have not been generalized to process 3D data.
Some efforts have been made to apply the quasiconformal theory to process data with higher dimensions. In \cite{lee2016landmark}, a generalized conformality distortion is first defined to measure the dilatation of a n-dimensional quasiconformal map, after which optimization algorithms are proposed to obtain landmark-matching transformation. Based on this quantity, \cite{zhang2022unifying} proposes a general framework for various n-dimensional mapping problems. \cite{huang2024topology} proposes an n-dimensional measure that is consistent with the classical 2D Beltrami coefficient in terms of the relationship between the magnitude of the quantity and the determinant of the mapping. Although these quantities are effective in measuring and controlling the distortion of mappings, the generalized conformality distortion cannot be used to reconstruct 3D mappings, as they do not contain the complete information (dilation in three orthogonal directions) of mapping, and the lack of information makes obtaining the mappings from the defined quantities impossible. In other words, they are not equivalent quantities to the Beltrami coefficient in the higher dimension. %Therefore it cannot be regarded as a representation for 3D mapping.
In this paper, we focus solely on the left polar decomposition for real rectangular matrices. We begin by denoting the set of $n \times n$ real matrices as $\mathcal{M}_n$. The left polar decomposition of a matrix $J \in \mathcal{M}_n$ is a factorization of the form $J = UP$, where the columns of the matrix $U \in \mathcal{M}_n$ form an orthonormal basis, and $P \in \mathcal{M}_n$ is a symmetric positive semi-definite matrix. Specifically, $P = \sqrt{J^T J}$.
To better understand this definition, we first note that $J^T J$ is a symmetric semi-definite matrix. By applying the eigenvalue decomposition to this matrix, we have
\begin{equation*}
J^T J=WDW^{-1}
\end{equation*}
where $W$ is an orthogonal matrix because $J^T J$ is symmetric, therefore we also have $W^{-1} = W^T$. The diagonal matrix $D$ contains the eigenvalues of $J^T J$. $\Sigma$ denotes the matrix whose diagonal entries are the square root of the corresponding entries in $D$. Those diagonal entries are the singular values of $J$. Thus, we have $P = \sqrt{J^T J} = W\Sigma W^{-1}$.
Therefore, any linear transformation from $\mathbb{R}^n$ to $\mathbb{R}^n$ is a composition of a rotation/reflection and a dilation.
A surface with a conformal structure is known as a \emph{Riemann surface}. Given two Riemann surfaces $M$ and $N$, a map $f:M\rightarrow N$ is conformal if it preserves the surface metric up to a multiplicative factor called the conformal factor. Quasiconformal maps are a generalization of conformal maps that are orientation-preserving diffeomorphisms between Riemann surfaces with bounded conformal distortion, meaning that their first-order approximation maps small circles to small ellipses of bounded eccentricity (as shown in Figure \ref{fig:qcmapping}).
\begin{figure}
\centering
\input{img/2DQC_mapping}
%\includegraphics[width=0.7\textwidth]{img/QCmapping.jpg}
\caption{Illustration of how Beltrami equation $\mu$ measures the distortion of the stretch map $S$ of a quasiconformal mapping $f$ that maps a small circle to an ellipse with dilation $K=\frac{1+|\mu(p)|}{1-|\mu(p)|}$.}
\label{fig:qcmapping}
\end{figure}
Mathematically, a map $f:\mathbb{C} \rightarrow \mathbb{C}$ is quasiconformal if it satisfies the Beltrami equation $$\frac{\partial f}{\partial \Bar{z}} = \mu(z) \frac{\partial f}{\partial z}, $$ for some complex valued functions $\mu$ with $\lVert \mu \rVert_\infty < 1$ called the \emph{Beltrami coefficient}. In particular, $f$ is conformal around a small neighborhood of a point $p$ if and only if $\mu(p)=0$, that is
\begin{align*}
f(z) &= f(p) + f_{z}(p)z+f_{\Bar{z}}(p)\Bar{z}\\
&=f(p) + f_{z}(p)(z+\mu(p) \Bar{z})
\end{align*}
This equation shows that $f$ can be considered as a map composed of a translation that maps $p$ to $f(p)$, followed by a stretch map $S(z)=z+\mu \Bar{z}$, which is postcomposed by a multiplication of a conformal map $f_z(p)$. Among these terms, $S(z)$ causes $f$ to map small circles to small ellipses, and $\mu(p)$ controls the stretching effect of $S(z)$. By denoting $z=\rho+i\tau$ and $\mu=re^{i\theta}$, where $r=\left|\mu\right|$, and representing $S(z)=z+\mu \Bar{z}$ in a matrix form, we have
\begin{equation}
\left[\begin{pmatrix}
1& 0\\
0& 1
\end{pmatrix}+r\begin{pmatrix}
\cos{\theta}& -\sin{\theta}\\
\sin{\theta}& \cos{\theta}
\end{pmatrix}\begin{pmatrix}
1& 0\\
0& -1
\end{pmatrix}\right] \begin{pmatrix}
\rho\\
\tau
\end{pmatrix} = \begin{pmatrix}
1+r\cos{\theta}& r\sin{\theta}\\
r\sin{\theta}& 1-r\cos{\theta}
\end{pmatrix}\begin{pmatrix}
\rho\\
\tau
\end{pmatrix}
\end{equation}
One can check that the eigenvalues for this matrix are $1+|\mu|$ and $1-|\mu|$. The eigenvectors for this matrix are $(\cos{\frac{\theta}{2}}, \sin{\frac{\theta}{2}})^T$ and $(\sin{\frac{\theta}{2}}, -\cos{\frac{\theta}{2}})^T$ respectively. It is worth noting that the two eigenvectors are orthogonal to each other. The distortion or dilation can be measured by $K=\frac{1+|\mu|}{1-|\mu|}$. Thus the Beltrami coefficient $\mu$ gives us important information about the properties of a map.
\begin{tikzpicture}[>=stealth]
% 左侧的直角坐标系和单位圆
\begin{scope}[shift={(0,0)}]
% 坐标轴
\draw[->] (-2,0) -- (2,0) node[below] {$x$};
\draw[->] (0,-2) -- (0,2) node[left] {$y$};
% 单位圆
\draw[fill=blue!20,opacity=0.5] (0,0) circle (1);
% 原点标记
\fill (0,0) circle (0pt) node[below left, font=\scriptsize] {$O$};
% 点 (0,1) 的刻度和标签
\draw (0,1) -- ++(-0.1,0) node[left, font=\scriptsize] {$1$};
% 点 (1,0) 的刻度和标签
\draw (1,0) -- ++(0,-0.1) node[below, font=\scriptsize] {$1$};
% 圆的两条轴
\begin{scope}[rotate=30]
\draw[->, red] (0,0) -- (1,0) node[pos=0.8, above right, font=\scriptsize, black] {$\begin{pmatrix}\cos{\frac{\theta}{2}}\\ \sin{\frac{\theta}{2}}\end{pmatrix}$};
\draw[->, blue] (0,0) -- (0,-1) node[pos=0.7, below right, font=\scriptsize, black] {$\begin{pmatrix}\sin{\frac{\theta}{2}}\\-\cos{\frac{\theta}{2}}\end{pmatrix}$};
\end{scope}
\end{scope}
% 中间的箭头
\begin{scope}[shift={(3,0)}]
\draw[->, thick] (0,0) -- (1,0) node[midway, above] {$S$};
\end{scope}
% 右侧的直角坐标系和旋转的椭圆
\begin{scope}[shift={(7,0)}]
% 坐标轴
\draw[->] (-2,0) -- (2,0) node[below] {$x$};
\draw[->] (0,-2) -- (0,2) node[left] {$y$};
% 原点标记
\fill (0,0) circle (0pt) node[below left, font=\scriptsize] {$O$};
% 点 (0,1) 的刻度和标签
\draw (0,1) -- ++(-0.1,0) node[left, font=\scriptsize] {$1$};
% 点 (1,0) 的刻度和标签
\draw (1,0) -- ++(0,-0.1) node[below, font=\scriptsize] {$1$};
% 旋转的椭圆
\begin{scope}[rotate=30]
\draw[fill=green!20,opacity=0.5] (0,0) ellipse (1.5 and 0.5);
% 椭圆的两条轴
\draw[->, red] (0,0) -- (1.5,0) node[pos=0.8, above right, font=\scriptsize, black] {$(1+|\mu(p)|)\begin{pmatrix}\cos{\frac{\theta}{2}}\\ \sin{\frac{\theta}{2}}\end{pmatrix}$};
\draw[->, blue] (0,0) -- (0,-0.5) node[pos=0.7, below right, font=\scriptsize, black] {$(1-|\mu(p)|)\begin{pmatrix}\sin{\frac{\theta}{2}}\\-\cos{\frac{\theta}{2}}\end{pmatrix}$};
\end{scope}
% 原点标记
%\fill (0,0) circle (2pt);
\end{scope}
\end{tikzpicture}
In addition, we notice some interesting results related to matrix inverse, which facilitate the derivation in the following sections.
Generally, for any invertible matrix $M$, we have
\begin{align*}
M^{-1} &= \begin{pmatrix}
m_{11} & m_{12} & m_{13}\\
m_{21} & m_{22} & m_{23}\\
m_{31} & m_{32} & m_{33}\\
\end{pmatrix}^{-1}\\
&=\frac{1}{\det(M)}\begin{pmatrix}
m_{22}m_{33}-m_{23}m_{32} & m_{13}m_{32}-m_{12}m_{33} & m_{12}m_{23}-m_{13}m_{22}\\
m_{23}m_{31}-m_{21}m_{33} & m_{11}m_{33}-m_{13}m_{31} & m_{21}m_{13}-m_{11}m_{23}\\
m_{21}m_{32}-m_{22}m_{31} & m_{12}m_{31}-m_{11}m_{32} & m_{11}m_{22}-m_{21}m_{12}
\end{pmatrix}
\end{align*}
Representing the row vectors of $M$ as $\vec{r}_1$, $\vec{r}_2$, and $\vec{r}_3$, and the column vectors as $\vec{c}_1$, $\vec{c}_2$, and $\vec{c}_3$, we have
\begin{align}
\begin{pmatrix}
\text{---}&\vec{r}_1^T&\text{---}\\
\text{---}&\vec{r}_2^T&\text{---}\\
\text{---}&\vec{r}_3^T&\text{---}\\
\end{pmatrix}^{-1}&=\frac{1}{\det(M)} \begin{pmatrix}
|&|&|\\
\vec{r}_2\times\vec{r}_3&\vec{r}_3\times\vec{r}_1&\vec{r}_1\times\vec{r}_2\\
|&|&|
\end{pmatrix}\label{observation_r}\\
\begin{pmatrix}
|& |&|\\
\vec{c}_1& \vec{c}_2 & \vec{c}_3\\
|& |&|
\end{pmatrix}^{-1}&=\frac{1}{\det(M)} \begin{pmatrix}
\text{---}&(\vec{c}_2 \times \vec{c}_3)^T&\text{---}\\
\text{---}&(\vec{c}_3 \times \vec{c}_1)^T&\text{---}\\
\text{---}&(\vec{c}_1 \times \vec{c}_2)^T&\text{---}
\end{pmatrix}\label{observation_c}
\end{align}
Let $\Omega_1$ and $\Omega_2$ be oriented, simply connected open subsets of $\mathbb{R}^3$. Suppose we have a diffeomorphism $f: \Omega_1 \rightarrow \Omega_2$. $\textbf{J}_f(p)$ denotes the Jacobian matrix of $f$ at a point $p$ in $\Omega_1$. Since $f$ is diffeomorphic, it is invertible. As a result, the Jacobian determinant $\det(\textbf{J}_f(p))$ is always positive for every point $p$ in $\Omega_1$.
Let $\Sigma$ be the diagonal matrix containing the singular values $a, b, \text{ and }c$ of $\textbf{J}_f(p)$, where by convention, we require that $a \geq b \geq c$. By polar decomposition, we have
\begin{align}
\begin{split}
\textbf{J}_f(p)&=U(p)P(p)\\
P(p)&=\sqrt{\textbf{J}_f(p)^T \textbf{J}_f(p)}=W\Sigma W^{-1}
\end{split}
\label{polar_de_equ}
\end{align}
where $U$ is a rotation matrix, because the determinant of $\textbf{J}_f(p)$ and $P(p)$ are greater than 0, implying that $\det(U(p))=1$. $a, b \text{ and } c$ are the eigenvalues of $P(p)$ representing the dilation information, and $W$ is an orthogonal matrix containing eigenvectors for dilation.
Recall that in 2D space, the Beltrami coefficient $\mu$ encodes the two dilation $1+|\mu|$ and $1-|\mu|$, together with their corresponding directions $(\cos{\frac{\theta}{2}}, \sin{\frac{\theta}{2}})^T$ and $(\sin{\frac{\theta}{2}}, -\cos{\frac{\theta}{2}})^T$, which are orthogonal to each other. Now in 3D space, we have three dilations $a$, $b$, and $c$, together with their corresponding directions represented by the column vectors of $W$, which are also orthogonal to each other, as $P(p)$ is symmetric. Therefore, similar to the Beltrami coefficient, $P(p)$ encodes the dilation information of the 3D mapping $f$.
Furthermore, it is possible to represent the matrix $W$ by Euler angles. To do so, we require that the column vectors of $W$ form an orthonormal basis, and $\det(W)=1$. However, the $\det(W)$ is not necessarily positive, meaning that $W$ may not be a rotation matrix. This can be fixed by randomly multiplying a column of $W$ by $-1$ to get a matrix $\tilde{W}$. This modification ensures $\det(\tilde{W})=1$, indicating that $\tilde{W}$ is a rotation matrix, while at the same time, the matrix $P(p)$ will not be changed. To see this, the matrix $P(p)$ can be reorganized as $a\vec{w}_1\vec{w}_1^T+b\vec{w}_2\vec{w}_2^T+c\vec{w}_3\vec{w}_3^T$, where $\vec{w}_1, \vec{w}_2 \text{ and } \vec{w}_3$ are the column vectors of $W$. Let $\tilde{\vec{w}}_1=-\vec{w}_1$, then $\tilde{\vec{w}}_1\tilde{\vec{w}}_1^T=\vec{w}_1\vec{w}_1^T$. Thus reversing the direction of $\vec{w}_1$ makes no change to $P(p)$. This also holds for $\vec{w}_2$ and $\vec{w}_3$.
As is known, a rotation matrix $R$ can be written in the following form:
\begin{small}
\begin{equation}
\begin{aligned}
R &= R_z(\theta_z) R_y(\theta_y) R_x(\theta_x)\\
&= \begin{pmatrix}
\cos{\theta_z}& -\sin{\theta_z}& 0\\
\sin{\theta_z}& \cos{\theta_z}& 0\\
0& 0& 1
\end{pmatrix}\begin{pmatrix}
\cos{\theta_y}& 0& \sin{\theta_y}\\
0& 1& 0\\
-\sin{\theta_y}& 0& \cos{\theta_y}
\end{pmatrix}\begin{pmatrix}
1& 0& 0\\
0& \cos{\theta_x}& -\sin{\theta_x}\\
0& \sin{\theta_x}& \cos{\theta_x}
\end{pmatrix}\\
&=\begin{pmatrix}
\cos{\theta_z}\cos{\theta_y} & \cos{\theta_z}\sin{\theta_y}\sin{\theta_x}-\sin{\theta_z}\cos{\theta_x}& \cos{\theta_z}\sin{\theta_y}\cos{\theta_x}-\sin{\theta_z}\sin{\theta_x}\\
\sin{\theta_z}\cos{\theta_y}& \sin{\theta_z}\sin{\theta_y}\sin{\theta_x}+\cos{\theta_z}\cos{\theta_x}& \sin{\theta_z}\sin{\theta_y}\cos{\theta_x}-\cos{\theta_z}\sin{\theta_x}\\
-\sin{\theta_y}& \cos{\theta_y}\sin{\theta_x}& \cos{\theta_y}\cos{\theta_x}
\end{pmatrix}\\
&= \begin{pmatrix}
r_{11}& r_{12}& r_{13}\\
r_{21}& r_{22}& r_{23}\\
r_{31}& r_{32}& r_{33}
\end{pmatrix}
\end{aligned}
\label{rotation_matrix}
\end{equation}
\end{small}
Then we obtain the Euler angles $\theta_x, \theta_y \text{ and } \theta_z$ by
\begin{equation}
\begin{aligned}
\theta_x &= atan2(r_{32}, r_{33})\\
\theta_y &= atan2(-r_{31}, \sqrt{r_{32}^2+r_{33}^2})\\
\theta_z &= atan2(r_{21}, r_{11})
\end{aligned}
\end{equation}
In conclusion, we have the following two equivalent ways to define 3D quasiconformal representation for diffeomorphism:
\begin{enumerate}
\item The upper triangular part of the matrix $P(p)$. $P(p)$ is a symmetric positive definite matrix, therefore the upper triangular part can encode the information of the matrix;
\item The eigenvalues and the Euler angles $(a, b, c, \theta_x, \theta_y, \theta_z)$. The Euler angles encode the information of the eigenvectors, therefore they include the equivalent information of $P(p)$.
\end{enumerate}
Note that both representations include 6 numbers for each point in the domain. The first representation facilitates various computational operations, as the angles are not involved during the computation, while the second representation provides a much clearer geometric meaning. Since the two representations are equivalent and can be easily converted to each other, we will use only the first representation, i.e., the upper triangular part of $P(p)$, in the following sections without further mention.
By Equations \ref{polar_de_equ}, we have
\begin{equation}
\textbf{J}_f(p)^T \textbf{J}_f(p) = W\Sigma\Sigma W^{-1}=W\begin{pmatrix}
a^2 & 0 & 0\\
0 & b^2 & 0\\
0 & 0 & c^2
\end{pmatrix} W^{-1}
\label{DTD_detQ}
\end{equation}
\begin{equation}
\det(\textbf{J}_f(p))=\det(P(p))=\det(\Sigma)=abc
\end{equation}
Recall the assumption that $f$ is a diffeomorphism, implying $\textbf{J}_f(p)$ is invertible. Right multiplying by $\textbf{J}_f(p)^{-1}$ on both side of the above equation, we have
\begin{equation}
\textbf{J}_f(p)^T = W\begin{pmatrix}
a^2 & 0 & 0\\
0 & b^2 & 0\\
0 & 0 & c^2
\end{pmatrix} W^{-1} \frac{1}{\det(\textbf{J}_f(p))} C=W\begin{pmatrix}
\frac{a}{bc} & 0 & 0\\
0 & \frac{b}{ac} & 0\\
0 & 0 & \frac{c}{ab}
\end{pmatrix} W^{-1} C
\label{right_mul_inv_D}
\end{equation}
where $C$ is the adjugate matrix of $\textbf{J}_f(p)$. According to the observation mentioned in Equation \ref{observation_r}, $C$ has the form
\begin{equation}
C = \begin{pmatrix}
| & | & | \\
\nabla v \times \nabla w & \nabla w \times \nabla u & \nabla u \times \nabla v \\
| & | & |
\end{pmatrix}
\label{matrix_C}
\end{equation}
where $\nabla u$, $\nabla v$ and $\nabla w$ are the columns of $\textbf{J}_f(p)^T$.
Moving the terms before the matrix C on the right-hand side of Equation \ref{right_mul_inv_D} to the left, we have
\begin{equation}
%(abc)W \begin{pmatrix}
% \frac{1}{a^2} & 0 & 0\\
% 0 & \frac{1}{b^2} & 0\\
% 0 & 0 & \frac{1}{c^2}
%\end{pmatrix} W^{-1} D_f(p)^T =
W \begin{pmatrix}
\frac{bc}{a} & 0 & 0\\
0 & \frac{ac}{b} & 0\\
0 & 0 & \frac{ab}{c}
\end{pmatrix} W^{-1} \textbf{J}_f(p)^T = C
\label{A_gradient_C}
\end{equation}
Let $\mathcal{A}$ be a matrix defined as
\begin{equation}
\mathcal{A} = W \begin{pmatrix}
\frac{bc}{a} & 0 & 0\\
0 & \frac{ac}{b} & 0\\
0 & 0 & \frac{ab}{c}
\end{pmatrix} W^{-1}
\label{matrix_A}
\end{equation}
We can rewrite Equation \ref{A_gradient_C} in the following form
\begin{equation}
\mathcal{A} \begin{pmatrix}
| & | & | \\
\nabla u & \nabla v & \nabla w \\
| & | & |
\end{pmatrix} = \begin{pmatrix}
| & | & | \\
\nabla v \times \nabla w & \nabla w \times \nabla u & \nabla u \times \nabla v \\
| & | & |
\end{pmatrix}
\label{A_gradient_C_rewrite}
\end{equation}
For $\nabla u$, we have
\begin{equation}
\nabla \cdot \mathcal{A} \nabla u = \nabla \cdot (\nabla v \times \nabla w) = \nabla w \cdot (\nabla \times \nabla v) - \nabla v \cdot (\nabla \times \nabla w) = 0
\end{equation}
since $\nabla \times \nabla$ results in zero vector. This also holds for $\nabla v$ and $\nabla w$.
Therefore, we compute divergence on both sides of Equation \ref{A_gradient_C_rewrite} to get the following equations
\begin{equation}
\begin{aligned}
\nabla \cdot \mathcal{A} \nabla u &= 0\\
\nabla \cdot \mathcal{A} \nabla v &= 0\\
\nabla \cdot \mathcal{A} \nabla w &= 0\\
\end{aligned}
\label{PDE}
\end{equation}
Furthermore, we define $\nabla \cdot \mathcal{A} \nabla$ as the 3D generalized Laplacian operator.
In the 2D case, we typically triangularize the domain to obtain finite elements and then define a piecewise linear function on that domain to approximate a smooth mapping. In the 3D case, we need to define the piecewise linear function on tetrahedrons serving as the elements.
Consider a 3D simply connected domain $\Omega_1$ discretized into a tetrahedral mesh containing vertices $\mathcal{V} = \{p_1, p_2, \ldots, p_n\}$ and tetrahedrons represented by the set of index sets $\mathcal{F} = \{(i_1, i_2, i_3, i_4)\mid i_1, i_2, i_3, i_4 \in \mathbb{N}\cap [1,n], \text{ and } i_1, i_2, i_3, i_4 \text{ are distinct}\}$. Also, the order of the vertices in a tetrahedron $T=(i_1, i_2, i_3, i_4)$ should satisfy a condition: the determinant of the matrix consisting of the three vectors $(p_{i_2}-p_{i_1})$, $(p_{i_3}-p_{i_1})$, and $(p_{i_4}-p_{i_1})$ must be positive, or equivalently, $[(p_{i_2}-p_{i_1})\times(p_{i_3}-p_{i_1})]\cdot (p_{i_4}-p_{i_1})>0$.
In this setting, the mapping $f:\Omega_1 \rightarrow \Omega_2$ is piecewise linear.
To compute the 3D quasiconformal representation $\vec{q}$ for $f$, we need to compute $\vec{q}$ at each point in $\Omega$. Since $f$ is piecewise linear, the Jacobian matrices $\textbf{J}_{f}$ at each point in the same tetrahedron are equal to each other, resulting in the same polar decomposition and 3D quasiconformal representation. Therefore, we simply need to compute the Jacobian matrices at each tetrahedron $T$, denoted as $\textbf{J}_{f}(T)$, and use it to get $\vec{q}$. The linear function defined on each tetrahedron $T$ can be written as
\begin{equation}
f|_T(x, y, z) = \textbf{J}_{f}(T) \cdot \begin{pmatrix}
x\\y\\z
\end{pmatrix}+\begin{pmatrix}
\vartheta_T\\\iota_T\\\varrho_T
\end{pmatrix}
\end{equation}
We can then compute the polar decomposition of $\textbf{J}_{f}(T)$ using Equations \ref{polar_de_equ}, which subsequently provides the 3D quasiconformal representation $\vec{q}$ for $T$.
To reconstruct the mapping $f$, we need the matrix $\mathcal{A}$, which contains the 3D representation information. Once given the representation $\vec{q}$ at a point $p$, $\mathcal{A}$ at $p$ can be computed according to Equation \ref{matrix_A}. As every point in $T$ shares the same dilation, $\mathcal{A}$ is a piecewise-constant matrix-valued function, where $\mathcal{A}$ takes a constant matrix value within each $T$, which we denote as $\mathcal{A}_T$.
To construct the discrete version of Equations \ref{PDE}, we should first derive the discrete gradient operator. For a certain tetrahedron $T=(i_1, i_2, i_3, i_4)$, let $p_I=(x_I, y_I, z_I), s_I=f(p_I)=(u_I, v_I, w_I)$, where $I\in\{i_1,i_2,i_3,i_4\}$ . Then we have the equation
\begin{equation}
\textbf{J}_{f}(T) X = Y
\end{equation}
where
\begin{equation}
X = \begin{pmatrix}
|&|&|\\
p_{i_2}-p_{i_1}& p_{i_3}-p_{i_1}& p_{i_4}-p_{i_1}\\
|&|&|
\end{pmatrix} \text{ and } Y=\begin{pmatrix}
|&|&|\\
s_{i_2}-s_{i_1}& s_{i_3}-s_{i_1}& s_{i_4}-s_{i_1}\\
|&|&|
\end{pmatrix}
\end{equation}
Then moving the matrix $X$ to the right, we have
\begin{equation}
\textbf{J}_{f}(T) = Y X^{-1}
\label{move_x2right}
\end{equation}
For simplicity, we index the values in $X^{-1}$ by the form $\chi_{jk}$, where $j \text{ and } k$ are the row and column of the indexed entry.
We define
\begin{equation}
\begin{aligned}
\begin{gathered}
A_T^{i_1} = -(\chi_{11}+\chi_{21}+\chi_{31}), \ A_T^{i_2} = \chi_{11},\ A_T^{i_3} = \chi_{21} \text{ and } A_T^{i_4} = \chi_{31}\\
B_T^{i_1} = -(\chi_{12}+\chi_{22}+\chi_{32}),\ B_T^{i_2} = \chi_{12},\ B_T^{i_3} = \chi_{22} \text{ and } B_T^{i_4} = \chi_{32}\\
C_T^{i_1} = -(\chi_{13}+\chi_{23}+\chi_{33}),\ C_T^{i_2} = \chi_{13},\ C_T^{i_3} = \chi_{23} \text{ and } C_T^{i_4} = \chi_{33}\\
\partial_x=(A_T^{i_1}, A_T^{i_2}, A_T^{i_3}, A_T^{i_4})^T, \partial_y=(B_T^{i_1}, B_T^{i_2}, B_T^{i_3}, B_T^{i_4})^T, \partial_z=(C_T^{i_1}, C_T^{i_2}, C_T^{i_3}, C_T^{i_4})^T\\
u_T=(u_{i_1}, u_{i_2}, u_{i_3}, u_{i_4})^T, v_T=(v_{i_1}, v_{i_2}, v_{i_3}, v_{i_4})^T, w_T=(w_{i_1}, w_{i_2}, w_{i_3}, w_{i_4})^T
\end{gathered}
\end{aligned}
\end{equation}
Then we have the following result, from which we know that $\partial_x$, $\partial_y$, and $\partial_z$ compose the discrete gradient operator $\nabla_T$.
\begin{equation}
\textbf{J}_f(T) = \begin{pmatrix}
\partial_x\cdot u_T & \partial_y \cdot u_T & \partial_z \cdot u_T\\
\partial_x\cdot v_T & \partial_y \cdot v_T & \partial_z \cdot v_T\\
\partial_x\cdot w_T & \partial_y \cdot w_T & \partial_z \cdot w_T
\end{pmatrix}
\end{equation}
The remaining part is the divergence operator. We first look at the definition of divergence. In a connected domain $\mathcal{W}$ , the divergence of a vector field $\textbf{F}$ evaluated at a point $p\in \mathcal{W}$ is defined as
\begin{equation}
div \textbf{F}|_p = \lim_{|\mathcal{W}|\rightarrow 0} \frac{1}{|\mathcal{W}|} \oint_{\partial \mathcal{W}} \textbf{F}\cdot \hat{n} dS=\lim_{|\mathcal{W}|\rightarrow 0} \frac{1}{|\mathcal{W}|}\Phi(\textbf{F},\partial \mathcal{W})
\label{div_def}
\end{equation}
where $|\mathcal{W}|$ denotes the volume of $\mathcal{W}$, $\partial \mathcal{W}$ is the boundary surface of $\mathcal{W}$, $\hat{n}$ is the outward unit normal to $\partial \mathcal{W}$, and $\Phi(\textbf{F}, \partial \mathcal{W})$ is the flux of $\textbf{F}$ across $\partial \mathcal{W}$.
In the discrete case, a vertex $p_i$ is surrounded by a set of tetrahedrons $\mathcal{N}(p_i)$. Considering that our goal is not to develop a discrete divergence operator that can give precise divergence at every vertex, but to solve Equations \ref{PDE} to get $u$, $v$, and $w$ such that the divergence of these functions is approximately equal to 0, we propose to replace the divergence operator by computing the flux in the discrete setting. The flux of $\textbf{F}$ evaluated at $p$ can be written as follows
\begin{equation}
\Phi_{p_i}(\textbf{F}, \partial \bigl(\cup \mathcal{N}(p_i)\bigr))=\sum_{T\in \mathcal{N}(p_i)} Area(T_{\setminus i})\cdot \textbf{F}(T)\cdot \hat{n}_{T_{\setminus i}}
\label{flux}
\end{equation}
here we use $T_{\setminus i}$ to denote the triangle opposite to $p_i$, $\hat{n}_{T_{\setminus i}}$ is the outward unit normal to the triangle $T_{\setminus i}$, and $\textbf{F}(T)$ represents the vector field defined on $T$. In our setting, $\mathbf{F}(T)$ is a piecewise-constant vector field, where $\mathbf{F}(T)$ takes a constant vector value within each $T$.
Considering that we shrink $T\in \mathcal{N}(p_i)$ to $\mathcal{T}^T$ whose corresponding vertices $\{p_i, p^{\mathcal{T}}_2, p^{\mathcal{T}}_3, p^{\mathcal{T}}_4\}$ satisfy $p^{\mathcal{T}}_{2}-p_i=\frac{1}{n}(p_{i_2}-p_{i_1})$, $p^{\mathcal{T}}_{3}-p_i=\frac{1}{n}(p_{i_3}-p_{i_1})$, and $p^{\mathcal{T}}_{4}-p_i=\frac{1}{n}(p_{i_4}-p_{i_1})$. Then the flux
\begin{align*}
\Phi_{p_i}(\textbf{F}, \partial \bigl(\cup \{\mathcal{T}^T\mid T \in \mathcal{N}(p_i)\}\bigr))&=\sum_{\mathcal{T}^T, T\in \mathcal{N}(p_i)} Area(\mathcal{T}^T_{\setminus i})\cdot \textbf{F}(\mathcal{T}^T)\cdot \hat{n}_{\mathcal{T}^T_{\setminus i}}\\
&=\frac{1}{n^2}\sum_{T\in \mathcal{N}(p_i)} Area(T_{\setminus i})\cdot \textbf{F}(T)\cdot \hat{n}_{T_{\setminus i}}\\
&=\frac{1}{n^2}\Phi_{p_i}(\textbf{F}, \partial \bigl(\cup \mathcal{N}(p_i)\bigr))
\end{align*}
since in the discrete setting, $\textbf{F}(\mathcal{T}^T)=\textbf{F}(T)$, $\hat{n}_{\mathcal{T}^T_{\setminus i}}=\hat{n}_{T_{\setminus i}}$, and $Area(\mathcal{T}^T_{\setminus i})=\frac{1}{n^2}Area(T_{\setminus i})$. Therefore, if we require $\Phi_{p_i}(\textbf{F}, \partial \bigl(\cup \mathcal{N}(p_i)\bigr))=0$, then
\begin{align*}
\lim_{n\rightarrow \infty} \frac{1}{|\mathcal{W}(n)|}\Phi_{p_i}(\textbf{F}, \partial \bigl(\cup \{\mathcal{T}^T\mid T \in \mathcal{N}(p_i)\}\bigr))
=&\lim_{n\rightarrow \infty} \frac{1}{|\mathcal{W}(n)|}\frac{1}{n^2}\Phi_{p_i}(\textbf{F}, \partial \bigl(\cup \mathcal{N}(p_i)\bigr))\\
=&\lim_{n\rightarrow \infty} \frac{0}{n^2|\mathcal{W}(n)|}\\
=&0
\end{align*}
where $\mathcal{W}(n)=\cup \{\mathcal{T}^T\mid T \in \mathcal{N}(p_i)\}$, and therefore, as $n\rightarrow \infty$, $|\mathcal{W}(n)|\rightarrow 0$. Although the above equation is not strictly equivalent to $div \textbf{F}|_p=0$, it motivates us to approximate $div \textbf{F}|_p=0$ using $\Phi_{p_i}(\textbf{F}, \partial \bigl(\cup \mathcal{N}(p_i)\bigr))=0$.
To solve the problem, we need to rewrite Equation \ref{flux} into a computable form. The quantity in the summation of Equation \ref{flux} can be evaluated using the property introduced in Equation \ref{observation_c}. By comparing $X$ with the matrix $M$ in Equation \ref{observation_c}, we notice that the three row vectors of $X^{-1}$ satisfy
\begin{align*}
(A_T^{i_2}, B_T^{i_2}, C_T^{i_2})^T &=\frac{1}{\det(X)}(p_{i_3}-p_{i_1})^T\times (p_{i_4}-p_{i_1})^T=-\frac{2Area(T_{\setminus i_2})}{6Vol(T)}\cdot\hat{n}_{T_{\setminus i_2}}\\
(A_T^{i_3}, B_T^{i_3}, C_T^{i_3})^T &=\frac{1}{\det(X)}(p_{i_4}-p_{i_1})^T\times (p_{i_2}-p_{i_1})^T=-\frac{2Area(T_{\setminus i_3})}{6Vol(T)}\cdot\hat{n}_{T_{\setminus i_3}}\\
(A_T^{i_4}, B_T^{i_4}, C_T^{i_4})^T &=\frac{1}{\det(X)}(p_{i_2}-p_{i_1})^T\times (p_{i_3}-p_{i_1})^T=-\frac{2Area(T_{\setminus i_4})}{6Vol(T)}\cdot\hat{n}_{T_{\setminus i_4}}
\end{align*}
where $Vol(T)$ represents the volume of $T$ with respect to $\mathcal{V}$, and $\det(X)=6Vol(T)$.
For vertex $p_{i_1}$, the outward normal vector on $T_{\setminus i_1}$ is given by
\begin{align*}
(p_{i_3}-p_{i_2})^T\times (p_{i_4}-p_{i_2})^T =& [(p_{i_3}-p_{i_1})^T-(p_{i_2}-p_{i_1})^T] \times [(p_{i_4}-p_{i_1})^T-(p_{i_2}-p_{i_1})^T]\\
=& (p_{i_3}-p_{i_1})^T \times (p_{i_4}-p_{i_1})^T - (p_{i_3}-p_{i_1})^T\times (p_{i_2}-p_{i_1})^T\\
&-(p_{i_2}-p_{i_1})^T\times (p_{i_4}-p_{i_1})^T+(p_{i_2}-p_{i_1})^T\times (p_{i_2}-p_{i_1})^T\\
=& \det(X)[(A_T^{i_2}, B_T^{i_2}, C_T^{i_2})^T + (A_T^{i_3}, B_T^{i_3}, C_T^{i_3})^T + (A_T^{i_4}, B_T^{i_4}, C_T^{i_4})^T]\\
=& \det(X)(A_T^{i_2}+A_T^{i_3}+A_T^{i_4}, B_T^{i_2}+B_T^{i_3}+B_T^{i_4}, C_T^{i_2}+C_T^{i_3}+C_T^{i_4})^T\\
=& -\det(X)(A_T^{i_1}, B_T^{i_1}, C_T^{i_1})^T
\end{align*}
We also know that $(p_{i_3}-p_{i_2})^T\times (p_{i_4}-p_{i_2})^T = 2Area(T_{\setminus i_1})\cdot\hat{n}_{T_{\setminus i_1}}$. The geometric meaning of $-(A_T^{i}, B_T^{i}, C_T^{i})^T$ is shown in Figure \ref{tetra_cross_product}.
\begin{figure}[h]
\centering
\input{img/tetra_cross_product}
\caption{Illustration of the relation between $p_i$ and $-(A_T^{i}, B_T^{i}, C_T^{i})^T$. Here we only show the case for $p_{i_1}$ as an example. $T_{\setminus i_1}$ denotes the triangular face opposite to $p_{i_1}$, and $-(A_T^{i_1}, B_T^{i_1}, C_T^{i_1})^T$ is a multiple of $\hat{n}_{T_{\setminus i_1}}$, the unit normal vector to $T_{\setminus i_1}$.}
\label{tetra_cross_product}
\end{figure}
Together, for the term in the summation of flux evaluated at the four vertices of $T$, we have
\begin{equation*}
Area(T_{\setminus i})\cdot \textbf{F}(T)\cdot \hat{n}_{T_{\setminus i}} = -3 Vol(T)\cdot(A_T^{i}, B_T^{i}, C_T^{i})^T \cdot \textbf{F}(T), \quad i \in T
\end{equation*}
Then the flux can be rewritten as
\begin{align*}
\Phi_{p_i}(\textbf{F}(T), \partial \bigl(\cup \mathcal{N}(p_i)\bigr))=-3\sum_{T\in \mathcal{N}(p_i)} Vol(T)\cdot(A_T^{i}, B_T^{i}, C_T^{i})^T \cdot \textbf{F}(T)
\end{align*}
Denoting the three row vectors of $\textbf{J}_{f}(T)$ as $\nabla_T u, \nabla_T v \text{ and } \nabla_T w$, then by substituting $\mathcal{A}_T\nabla_T u$, $\mathcal{A}_T\nabla_T v$, and $\mathcal{A}_T\nabla_T w$ into $\textbf{F}$, we have the following equations
\begin{equation}
\begin{aligned}
\sum_{T\in \mathcal{N}(p_i)} Vol(T)\cdot(A_T^{i}, B_T^{i}, C_T^{i})^T \cdot \mathcal{A}_T\nabla_T u &= 0\\
\sum_{T\in \mathcal{N}(p_i)} Vol(T)\cdot(A_T^{i}, B_T^{i}, C_T^{i})^T \cdot \mathcal{A}_T\nabla_T v &= 0\\
\sum_{T\in \mathcal{N}(p_i)} Vol(T)\cdot(A_T^{i}, B_T^{i}, C_T^{i})^T \cdot \mathcal{A}_T\nabla_T w &= 0
\end{aligned}
\label{key_linear_system}
\end{equation}
Note that in Equations \ref{key_linear_system}, the components $Vol(T)$, $(A_T^{i}, B_T^{i}, C_T^{i})^T$, and $\nabla_T$ are derived from the source mesh, i.e., $\mathcal{V}$ and $T$, which are not related to the unknowns $u$, $v$, and $w$, and $\mathcal{A}_T$ comes from the given 3D quasiconformal representation. Reorganizing Equations \ref{key_linear_system}, we get three linear systems
\begin{equation}
\mathcal{C}u=0, \quad \mathcal{C}v=0, \quad \mathcal{C}w=0
\label{key_linear_system_mat}
\end{equation}
In order to introduce boundary conditions, for the given $\mathcal{K}$ boundary vertices for the function $u$ indexed by $i$ from $1$ to $\mathcal{K}$ with the target value $\beta_i$, we first define a vector $\vec{v}=\sum_{i=1}^{\mathcal{K}}\beta_i\Vec{e}_i$, where $\Vec{e}_i$ is the ``one-hot'' vector that has 1 in the $i$-th entry and zero in the remaining entries. Then a temporary vector $\tilde{h}=-\mathcal{C} \vec{v}$ can be computed, after which we set the $i$-th entry of $\tilde{h}$ to $\beta_i$ correspondingly to get the vector $h_u$. Similarly, for the function $v$ and $w$, we can generate $h_v$ and $h_w$.
We define an operation called ``masking'' as follows: for a given boundary vertex $p_i$, we set the $i$-th row and $i$-th column of $\mathcal{C}$ to zero, and the $i$-th diagonal entry to 1.
We perform the masking operation to $\mathcal{C}$ for all the boundary vertices to get the matrices $\mathcal{C}_u$, $\mathcal{C}_v$, and $\mathcal{C}_w$.
Then we have
\begin{equation}
\mathcal{C}_u u=h_u, \quad \mathcal{C}_v v=h_v, \quad \mathcal{C}_w w=h_w
\label{key_linear_system_mat_uvw}
\end{equation}
and the mapping $f$ can then be reconstructed.
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[scale=2, tdplot_main_coords]
% 定义四面体的顶点
\coordinate (P1) at (0, -1, -1);
\coordinate (P2) at (0, 0, 1);
\coordinate (P3) at (1, 1, -1);
\coordinate (P4) at (-1, 1, -1);
\coordinate (barycenter) at ($1/3*(P2) + 1/3*(P3) + 1/3*(P4)$);
% 绘制四面体的面
\fill[blue!20,opacity=0.5] (P1) -- (P2) -- (P3) -- cycle;
%\fill[red!20,opacity=0.5] (P1) -- (P2) -- (P4) -- cycle;
\fill[green!20,opacity=0.5] (P2) -- (P3) -- (P4) -- cycle;
%\fill[yellow!20,opacity=0.5] (P1) -- (P3) -- (P4) -- cycle;
% 绘制四面体的边
\draw (P1) -- (P2) -- (P3) -- cycle;
\draw[dashed, black] (P1) -- (P4);
\draw (P2) -- (P4);
\draw (P3) -- (P4);
\fill[red] (P1) circle (0.8pt);
\draw[-stealth, thick, blue] (P2) -- (P3);
\draw[-stealth, thick, blue] (P2) -- (P4);
% 计算 p3-p2 和 p4-p2 的叉乘
\pgfmathsetmacro{\vx}{1-0} % p3 - p2 的 x 分量
\pgfmathsetmacro{\vy}{1-0} % p3 - p2 的 y 分量
\pgfmathsetmacro{\vz}{-1-1} % p3 - p2 的 z 分量
\pgfmathsetmacro{\wx}{-1-0} % p4 - p2 的 x 分量
\pgfmathsetmacro{\wy}{1-0} % p4 - p2 的 y 分量
\pgfmathsetmacro{\wz}{-1-1} % p4 - p2 的 z 分量
\pgfmathsetmacro{\nx}{\vy*\wz-\vz*\wy} % 叉乘的 x 分量
\pgfmathsetmacro{\ny}{\vz*\wx-\vx*\wz} % 叉乘的 y 分量
\pgfmathsetmacro{\nz}{\vx*\wy-\vy*\wx} % 叉乘的 z 分量
% 绘制从重心指向 p3-p2 叉乘 p4-p2 方向的箭头
%\draw[-stealth, thick, red] (barycenter) -- ++({\nx/10}, {\ny/10}, {\nz/10});
%\draw[-stealth, thick, red] (barycenter) -- ++({\nx/3}, {\ny/3}, {\nz/3}) node[pos=1, above, black] {$-(A_T^{i_1}, B_T^{i_1}, C_T^{i_1})^T$};
\draw[-stealth, thick, red] (barycenter) -- ++({\nx/3}, {\ny/3}, {\nz/3}) node[pos=1.2, above=-5ex, black] {$-\begin{pmatrix} A_T^{i_1}\\ B_T^{i_1}\\ C_T^{i_1} \end{pmatrix}$};
\draw[-stealth, thick, black] (barycenter) -- ++({\nx/7}, {\ny/7}, {\nz/7}) node[pos=1.3, below=0.7ex] {$\hat{n}_{T_{\setminus i_1}}$};
%\path (P3) -- (P2) coordinate (vec1);
%\path (P4) -- (P2) coordinate (vec2);
%\path (vec1) -- (vec2) coordinate (crossresult);
%\draw[-stealth, thick, red] (barycenter) -- +(crossresult);
% 添加顶点标签
\node [below] at (P1) {$p_{i_1}$};
\node [above] at (P2) {$p_{i_2}$};
\node [below] at (P3) {$p_{i_3}$};
\node [right] at (P4) {$p_{i_4}$};
\coordinate (T_setminus_i1) at ($0.6*(P2) + 0.1*(P3) + 0.3*(P4)$);
\node [below] at (T_setminus_i1) {$T_{\setminus i_1}$};
\end{tikzpicture}
In this section, we would like to show that the linear systems \ref{key_linear_system_mat_uvw} are symmetric positive definite (SPD). Compared with triangular mesh encountered in the 2D cases, tetrahedral meshes possess more vertices, resulting in large linear systems that are hard to solve. But if the linear systems are SPD, then we can use efficient numerical methods, such as the conjugate gradient method, to solve it more efficiently.
We will divide this section into two parts, in which we show the symmetry of $\mathcal{C}$ and the positive definiteness of the linear systems.
\subsubsection{Symmetry of $\mathcal{C}$}
In this section, we would like to show that the matrix $\mathcal{C}$ in Equations \ref{key_linear_system_mat} is symmetric. To see this, we may turn first to the incidence matrix of a tetrahedral mesh.
The incidence matrix $E$ of a tetrahedral mesh is a matrix that describes the connectivity between the vertices and the tetrahedrons in the mesh. Specifically, it captures which vertices are part of which tetrahedrons. In our setting, the incidence matrix is an $|\mathcal{F}| \times |\mathcal{V}|$ matrix, where $|\mathcal{F}|$ is the number of tetrahedrons and $|\mathcal{V}|$ is the number of vertices. Each row corresponds to a tetrahedron, and each column corresponds to a vertex. If a vertex belongs to a tetrahedron, the corresponding entry in the matrix is set to $1$; otherwise, it is set to $0$.
Suppose we have a discrete function $f$ defined on the vertices of the mesh. If we want to sum up the function values on the vertices of each tetrahedron, we can simply compute $Ef$, which yields the desired results. If we want to compute the weighted sum, we can simply replace the entries by the weights, and then compute $Ef$.
In our case, we want to construct a matrix that can compute the discrete gradient for each tetrahedron. Recall that we compute the gradient of $u_T$ over $x$ by taking the dot product $\partial_x\cdot u_T$. In the implementation, $u$ is a $|\mathcal{V}|$ dimensional vector. To compute $\partial_x\cdot u_T$ for all tetrahedrons, we first construct the incidence matrix $E$ for the mesh, and then replace the values in $E$ by the corresponding $A_T^i$ to get the matrix $E_x$. Then we can compute the gradient over $x$ of all tetrahedrons by simply computing $E_xu$. Similarly, we can construct $E_y$ and $E_z$ with $B_T^i$ and $C_T^i$ to compute the gradient of $u_T$ over $y$ and $z$.
Now we can construct a $3|\mathcal{F}| \times |\mathcal{V}|$ matrix, where $(3i+1)$-th row ($i$ from $0$ to $|\mathcal{F}|-1$) is replaced by the $i$-th row of $E_x$, $(3i+2)$-th row is replaced by the $i$-th row of $E_y$, and $(3i+3)$-th row is replaced by the $i$-th row of $E_z$. We denote this matrix as $\nabla$, as it serves as the discrete gradient operator. $\nabla$ can be regarded as an $|\mathcal{F}|\times 1$ block matrix, each block computes the gradient vector for the corresponding tetrahedron $T\in\mathcal{F}$. Also, each block has only $4$ nonzero columns indexed by $i\in T$, the values of which are $(A_T^{i}, B_T^{i}, C_T^{i})^T, i \in T$.
Then we can consider the matrix $E^T$, which is a $|\mathcal{V}|\times |\mathcal{F}|$. For any discrete function $g$ defined on the tetrahedrons of the mesh, $E^Tg$ sums up the values on the tetrahedrons $T\in \mathcal{N}(p)$ surrounding each vertex $p$. Similarly, the weighted sum can be computed by first replacing the values in $E^T$ by the weights.
In our case, $\nabla^T$ has a similar structure to $E^T$. Suppose we have a discrete vector field defined on the tetrahedrons of the mesh, we can put the vectors into a $3|\mathcal{F}|$ dimensional vector $\mathbf{F}$ according to the index of the tetrahedrons in $\mathcal{F}$. Then, computing $\nabla^T\mathbf{F}$ is equivalent to computing $\sum_{T\in \mathcal{N}(p_i)}(A_T^{i}, B_T^{i}, C_T^{i})^T \cdot \textbf{F}(T)$.
Recall that our formula has a $Vol(T)$ term. We can further define a $3|\mathcal{F}|\times 3|\mathcal{F}|$ block diagonal matrix $G$, each diagonal block of which is $Vol(T)\cdot I$, which is a $3\times 3$ matrix. Obviously, $G$ is SPD.
The last component is a $3|\mathcal{F}|\times 3|\mathcal{F}|$ block diagonal matrix $\mathcal{A}$, each diagonal block of which is $\mathcal{A}_T$. Since the 3D representation assigned to each tetrahedron corresponds to an SPD matrix, the eigenvalues of this matrix are all positive, and they compose the eigenvalues of $\mathcal{A}_T$, we know that $\mathcal{A}_T$ is also SPD. Therefore, $\mathcal{A}$ is SPD.
Together, we have $\mathcal{C}=\nabla^T G\mathcal{A}\nabla$. As $Vol(T)\cdot I \mathcal{A}_T$ is SPD, and $Vol(T)\cdot I$ and $\mathcal{A}_T$ are the diagonal blocks of $G$ and $\mathcal{A}$ respectively, we know that $G\mathcal{A}$ is SPD as well, and as a result, $\mathcal{C}$ is a symmetric matrix. We denote $G\mathcal{A}$ as $\mathcal{A}^G$ in the following section for simplicity. Also, since $\mathcal{A}^G$ is SPD, there exists an invertible matrix $\mathcal{H}$ such that $\mathcal{A}^G=\mathcal{H}^T\mathcal{H}$.
\subsubsection{Positive definiteness}
In this section, we would like to show that $\mathcal{C}_u$, $\mathcal{C}_v$, and $\mathcal{C}_w$ in the linear systems \ref{key_linear_system_mat_uvw} are SPD. The proof of symmetry is trivial since the masking operation does not change the symmetry, but the proof of positive definiteness is not trivial, and we first prove some lemmas and propositions which facilitate the proof. For succinctness, in this section, we denote the number of vertices by $N$ (i.e., $N = |\mathcal{V}|$).
\begin{lemma}\label{rank_nabla_a_nabla}
$rank(\mathcal{C})=N-1$, and the vector $\Vec{1}=(1, 1, \ldots, 1)^T$ is the only basis vector in the null space of $\mathcal{C}$.
\end{lemma}
\begin{proof}
Matrix $\nabla$ computes the gradient of a discrete function $\vec{\alpha}$ on tetrahedrons. If $\nabla \vec{\alpha} = 0$ for some vector $\vec{\alpha}$, then by definition, the gradient of $\vec{\alpha}$ on every tetrahedron is zero, meaning that $\vec{\alpha} = \gamma\vec{1}, \Vec{1} = (1, 1, \ldots, 1)^T$ for some constant $\gamma$ on each tetrahedron. Therefore, $\Vec{1}$ is the only basis vector in the null space of $\nabla$. This shows that $\Vec{1}$ is in the null space of $\mathcal{C}$.
Then we aim to prove the uniqueness. If there exists a nonzero vector $\vec{\zeta}$ such that $\nabla^T \mathcal{H}^T \vec{\zeta} = 0$, then $\vec{\zeta}$ is orthogonal to the row vectors of $\nabla^T \mathcal{H}^T$, or equivalently, %the column vectors of $ S \nabla $, meaning that
$\vec{\zeta} \notin \textbf{C}(\mathcal{H} \nabla)$, where $\textbf{C}$ denotes the columns space. However, for any nonzero vector $\vec{\alpha}$ satisfying $\vec{\alpha}\neq \gamma\vec{1}$ for any constant $\gamma$, we have nonzero vector $\vec{\delta} = \mathcal{H} \nabla \vec{\alpha}$, $\vec{\delta} \in \textbf{C}(\mathcal{H} \nabla)$, indicating that $\nabla^T \mathcal{H}^T \vec{\delta} \neq 0$. In other words, for any nonzero vector $\vec{\alpha}\neq \gamma\vec{1}$, there does not exist a nonzero vector $\vec{\delta} = \mathcal{H} \nabla \vec{\alpha}$ such that $\nabla^T \mathcal{H}^T \vec{\delta} = 0$. Therefore, the null space of $\mathcal{C}$ is only span by $\Vec{1}$.
Hence, $ \text{rank}(\mathcal{C}) = N-1 $.
\end{proof}
\begin{lemma}\label{linear_dependent}
Any column (or row) vector in $\mathcal{C}$ can be expressed as a linear combination of the rest $N-1$ column (or row) vectors.
\end{lemma}
\begin{proof}
Matrix $\mathcal{C}$ is symmetric and therefore diagonalizable. Let $\mathcal{C} = Q \Lambda Q^T $, where $ Q $ is an orthogonal matrix containing the eigenvectors as columns, and $ \Lambda $ is a diagonal matrix with the eigenvalues. By Lemma \ref{rank_nabla_a_nabla}, $\text{rank}(\mathcal{C}) = N-1$, indicating that one of its eigenvalues is zero, and the rest are non-zero. Without loss of generality, let the last diagonal entry in $ \Lambda $ be 0, and the last column of $ Q $ be the vector $ \frac{\Vec{1}}{\|\Vec{1}\|}=\frac{1}{\sqrt{N}}\Vec{1} $. In this setting, the last row of $ Q^T $ is equal to $\frac{1}{\sqrt{N}}\Vec{1}^T $.
Each column of $\mathcal{C}$ can be expressed as a linear combination of the columns in $ Q \Lambda $, or equivalently, the first $ N-1 $ columns in $ Q\Lambda $, as the last eigenvalue is $0$. The linear combination coefficients are stored in $ Q^T $.
Let $ \tilde{Q} $ be the first $ N-1 $ columns of $ Q $, then $ \tilde{Q}^T $ is the first $ N-1 $ rows of $ Q^T $. Let $\varepsilon$ be the entry in the last row of $ Q^T $, then $\varepsilon = \frac{1}{\sqrt{N}} $. Denote the column vectors in $\tilde{Q}^T$ as $\vec{\gamma}_i$ for $ i = 1, 2, \ldots, N $, then since $Q^T$ is an orthogonal matrix, the column vectors are perpendicular to each other, and the length of each vector is $1$, we have:
\begin{align*}
\vec{\gamma}_i \cdot \vec{\gamma}_i &= 1-\varepsilon^2 = \frac{N-1}{N}=-\frac{1}{N}(1-N)\\
\vec{\gamma}_i \cdot \vec{\gamma}_j &= 0-\varepsilon^2 = -\frac{1}{N} \quad \text{for} \quad i \neq j
\end{align*}
Randomly pick $ N-1 $ column vectors from $ \tilde{Q}^T $ to form the matrix $\Gamma$. Then we have:
\begin{equation*}
\Psi = \Gamma^T \Gamma = -\frac{1}{N} \begin{pmatrix}
1-N & 1 & \ldots & 1 \\
1 & 1-N & \ldots & 1 \\
\vdots & \vdots & \vdots & \vdots \\
1 & 1 & \ldots & 1-N
\end{pmatrix} = -\frac{1}{N}(\mathcal{J} - N I)
\end{equation*}
where $ I $ is an $ (N-1) \times (N-1) $ identity matrix, and $ \mathcal{J} $ is a matrix full of 1s.
Let $\tilde{\Psi} = \mathcal{J} - N I$. Suppose $\lambda$ is an eigenvalue of $\tilde{\Psi}$, then $\det(\tilde{\Psi} - \lambda I) = 0$, or $\det(\mathcal{J} - (N + \lambda) I) = 0$. We know that the eigenvalue of $\mathcal{J}$ is $N-1$ on the eigenvector $\Vec{1}$, and 0 on the other eigenvectors. Therefore, the eigenvalues of $\mathcal{J} - (N + \lambda) I$ are $-1 - \lambda $ on $ \Vec{1}$, and $\lambda + N$ on the other eigenvectors. Hence:
\begin{equation*}
\det(\tilde{\Psi} - \lambda I) = (-1 - \lambda) \cdot (\lambda + N)^{N-2} = 0
\end{equation*}
Thus, $\lambda = -1$ with multiplicity $1$, or $\lambda = -N$ with multiplicity $N-2$, and:
\begin{equation*}
\det(\tilde{\Psi}) = -(-N)^{N-2}
\end{equation*}
which implies:
\begin{equation*}
\det(\Psi) = \det(-\frac{1}{N}\tilde{\Psi})= \left( -\frac{1}{N} \right)^{N-1} \cdot (-(-N)^{N-2}) = \frac{1}{N} > 0
\end{equation*}
which indicates $\Psi$ is full rank, and $\Gamma$ is also full rank. Therefore, any $N-1$ column vectors in $ \tilde{Q}^T $ form a basis in the $(N-1)$-dimensional space, and the remaining vector can be expressed as a linear combination of the basis.
Let $Q_{\Lambda}$ be the first $N-1$ columns of $Q\Lambda$ and let $\tilde{Q}_{\setminus i}^T = (\vec{\gamma}_1, \vec{\gamma}_2, \ldots, \vec{\gamma}_{i-1}, \vec{\gamma}_{i+1}, \ldots, \vec{\gamma}_{N})$. Then by the above proof, we know that there exists an $N-1$ dimensional nonzero vector $\Vec{\alpha}$ such that $\vec{\gamma}_i = \tilde{Q}_{\setminus i}^T \Vec{\alpha}$. Then we have $Q_{\Lambda} \vec{\gamma}_i = Q_{\Lambda} \tilde{Q}_{\setminus i}^T \Vec{\alpha}$.
In the left-hand side, $Q_{\Lambda} \vec{\gamma}_i$ is the $i$-th column of $\mathcal{C}$, while in the right-hand side, $Q_{\Lambda} \tilde{Q}_{\setminus i}^T$ is the matrix containing the remaining $N-1$ column vectors of $\mathcal{C}$. The equation $Q_{\Lambda} \vec{\gamma}_i = Q_{\Lambda} \tilde{Q}_{\setminus i}^T \Vec{\alpha}$ means that the $i$-th column vector of $\mathcal{C}$ can be expressed as a linear combination of the remaining $N-1$ column vectors of $\mathcal{C}$, and the coefficients are stored in $\Vec{\alpha}$.
As the index $i$ can be randomly chosen, we prove the statement for column vectors. Since the matrix is symmetric, this property can be extended to the row vectors as well.
\end{proof}
We can set the $i$-th row and $i$-th column of $\mathcal{C}$ to zero. With Lemma \ref{linear_dependent}, we know that the rank of this matrix is still $N-1$.
Also, we know that the vector $\Vec{e}_i$ lies in the null space of this matrix. By setting the $i$-th diagonal entry to $1$, we get a full rank matrix, which is denoted as $\mathcal{M}$.
\begin{proposition}\label{first_masking_SPD}
$\mathcal{M}$ is an SPD matrix.
\end{proposition}
\begin{proof}
Setting the $i$-th column in $\nabla$ to zero, we get a new matrix denoted as $\tilde{\nabla}$. By the above definition, we have
\begin{equation*}
\mathcal{M}=\tilde{\nabla}^T\mathcal{A}^G\tilde{\nabla}+\mathcal{E}
\end{equation*}
where $\mathcal{E}$ is an $N \times N$ matrix whose $i$-th diagonal entry is $1$, and all other entries are zero. The matrix $\tilde{\nabla}^T\mathcal{A}^G\tilde{\nabla}$ is the same matrix obtained by setting $i$-th row and $i$-th column of $\mathcal{C}$ to $0$, the rank of which is $N-1$. Then we decompose any nonzero vector $\vec{v}$ into $\vec{v}_{\setminus i}$ and $\eta \Vec{e}_i$, where $\eta$ is the value in the $i$-th entry of $\vec{v}$, and $\vec{v}_{\setminus i}$ denotes the vector with the $i$-th component removed.
Then, we have
\begin{equation*}
\vec{v}^T\mathcal{M}\vec{v}=(\vec{v}_{\setminus i}+\eta \Vec{e}_i)^T(\tilde{\nabla}^T\mathcal{A}^G\tilde{\nabla}+\mathcal{E})(\vec{v}_{\setminus i}+\eta \Vec{e}_i)=\vec{v}_{\setminus i}^T\tilde{\nabla}^T\mathcal{A}^G\tilde{\nabla}\vec{v}_{\setminus i}+\eta^2 \Vec{e}_i^T\mathcal{E}\Vec{e}_i=\|\mathcal{H}\tilde{\nabla}\vec{v}_{\setminus i}\|_2^2+\eta^2
\end{equation*}
Since $rank(\tilde{\nabla}^T\mathcal{A}^G\tilde{\nabla})=N-1$ and $\mathcal{A}^G$ is full rank, $rank(\tilde{\nabla})=N-1$. Together with the definition of $\tilde{\nabla}$, we know that its null space only includes $\Vec{e}_i$ and its row space contains the remaining components. Since $\vec{v}_{\setminus i}$ contains the complementary components of $\Vec{e}_i$, $\tilde{\nabla}\vec{v}_{\setminus i}$ is nonzero if $\vec{v}_{\setminus i}$ is nonzero. Otherwise, if $\vec{v}_{\setminus i}$ is a zero vector, then $\eta$ is nonzero because $\vec{v}$ is nonzero. Therefore, the two terms $\|\mathcal{H}\tilde{\nabla}\vec{v}_{\setminus i}\|_2^2$ and $\eta^2$ cannot be zero at the same time. Then $\vec{v}^T\mathcal{M}\vec{v}>0$, which proves the statement.
\end{proof}
For any SPD matrix $\mathcal{M}$, we set the $i$-th row and $i$-th column of $\mathcal{M}$ to be zero, and set the $i$-th diagonal entry to $1$, then we get a new matrix $\mathcal{P}$.
\begin{proposition}\label{remaining_op_SPD}
$\mathcal{P}$ is also SPD.
\end{proposition}
\begin{proof}
Since $\mathcal{M}$ is an SPD matrix, it can be decomposed to $Q\Lambda Q^T$ where $\Lambda$ contains the eigenvalues, which are all positive.
Then, by setting the $i$-th row of $Q$ to $0$, we get another matrix $\tilde{Q}$. Then we have
\begin{equation*}
\mathcal{P}=\tilde{Q}\Lambda \tilde{Q}^T+\mathcal{E}
\end{equation*}
where $\mathcal{E}$ is an $N \times N$ matrix whose $i$-th diagonal entry is $1$, and all other entries are zero.
Then we decompose any nonzero vector $\vec{v}$ into $\vec{v}_{\setminus i}$ and $\eta \Vec{e}_i$, where $\eta$ is the value in the $i$-th entry of $\vec{v}$, and $\vec{v}_{\setminus i}$ denotes the vector with the $i$-th component removed.
Then we have,
\begin{equation*}
\vec{v}^T\mathcal{P}\vec{v}=(\vec{v}_{\setminus i}+\eta \Vec{e}_i)^T(\tilde{Q}\Lambda \tilde{Q}^T+\mathcal{E})(\vec{v}_{\setminus i}+\eta \Vec{e}_i)=\vec{v}_{\setminus i}^T\tilde{Q}\Lambda \tilde{Q}^T\vec{v}_{\setminus i}+\eta^2 \Vec{e}_i^T\mathcal{E}\Vec{e}_i=\|\Sigma \tilde{Q}^T \vec{v}_{\setminus i}\|_2^2+\eta^2
\end{equation*}
where $\Sigma=\sqrt{\Lambda}$.
Since $rank(Q)=N$, $rank(\tilde{Q})=N-1$. Apparently, we notice that the vector $\Vec{e}_i$ is the only basis in the null space of $\tilde{Q}^T$. Since $\vec{v}_{\setminus i}$ contains the complementary components of $\Vec{e}_i$, $\tilde{Q}^T\vec{v}_{\setminus i}$ is nonzero if $\vec{v}_{\setminus i}$ is nonzero. Otherwise, if $\vec{v}_{\setminus i}$ is a zero vector, then $\eta$ is nonzero because $\vec{v}$ is nonzero. Therefore, the two terms $\|\Sigma\tilde{Q}^T\vec{v}_{\setminus i}\|_2^2$ and $\eta^2$ cannot be zero at the same time. Then $\vec{v}^T\mathcal{P}\vec{v}>0$, which proves the statement.
\end{proof}
With the above Lemmas and Propositions, we can now show that
\begin{theorem}
$\mathcal{C}_u$, $\mathcal{C}_v$, and $\mathcal{C}_w$ in the linear systems \ref{key_linear_system_mat_uvw} are SPD.
\end{theorem}
\begin{proof}
In Lemma \ref{rank_nabla_a_nabla}, $rank(\mathcal{C})=N-1$ is proved.
For the first masking operation, by Lemma \ref{linear_dependent} and Proposition \ref{first_masking_SPD}, we know that the resulting matrix is SPD.
For the remaining masking operations, by Proposition \ref{remaining_op_SPD}, we know that the resulting matrices are all SPD. Therefore, $\mathcal{C}_u$, $\mathcal{C}_v$, and $\mathcal{C}_w$ in the linear systems \ref{key_linear_system_mat_uvw} are SPD.
\end{proof}
\begin{algorithm}
\caption{3D quasiconformal representation computation for 3D bijective map}\label{alg:cap}
\begin{algorithmic}
\Require $\mathcal{V} = \{p_1, p_2, \ldots, p_n\}$; $f(\mathcal{V}) = \{s_1, s_2, \ldots, s_n\}$; $\mathcal{F} = \{(i_1, i_2, i_3, i_4)\mid i_1, i_2, i_3, i_4 \in \mathbb{N}\cap [1,n], \text{ and } i_1, i_2, i_3, i_4 \text{ are distinct}\}$
\Ensure 3D quasiconformal representation $\vec{q}(T)$ for $T \in \mathcal{F}$
\For{$T \in \mathcal{F}$}
\State Compute the Jacobian matrix $\textbf{J}_f(T)$ with $\mathcal{V}$, $f(\mathcal{V})$ and $T$
\State $P \leftarrow \sqrt{\textbf{J}_f(T)^T \textbf{J}_f(T)}$
\State $\vec{q}(T) \leftarrow$ upper triangular part of $P$
\EndFor
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Mapping reconstruction from 3D quasiconformal representation}\label{alg:recon}
\begin{algorithmic}
\Require $\mathcal{V} = \{p_1, p_2, \ldots, p_n\}$; $f(\mathcal{V}) = \{s_1, s_2, \ldots, s_n\}$; $\mathcal{F} = \{(i_1, i_2, i_3, i_4)\mid i_1, i_2, i_3, i_4 \in \mathbb{N}\cap [1,n], \text{ and } i_1, i_2, i_3, i_4 \text{ are distinct}\}$;
$\vec{q}(T)$ for $T \in \mathcal{F}$.
\Ensure $f({\mathcal{V}})$
\For{$T \in \mathcal{F}$}
%\If{Type 1}
\State Reorganize $\vec{q}(T)$ to get the matrix $P$
\State Compute eigenvalue decomposition of $P$ to get $a, b, c$ and $W$
\State Compute $\mathcal{A}_T$ by Equation \ref{matrix_A} with $a, b, c$ and $W$
\State Construct $X$ and compute $X^{-1}$, from which $\{A_T^i, B_T^i, C_T^i\mid i\in T\}$ can be determined
\EndFor
Build the $|\mathcal{V}|\times|\mathcal{V}|$ linear systems for $\Phi_{p_i}(\mathcal{A}_T\nabla_T\textbf{f}, \partial \bigl(\cup \mathcal{N}(p_i)\bigr))=0$ for $\textbf{f}\in\{u, v, w\}$
\State Solve the system to obtain $f({\mathcal{V}})$ using the conjugate gradient method
\end{algorithmic}
\label{code_recon}
\end{algorithm}
This section presents experimental results demonstrating the effectiveness of our proposed 3D quasiconformal representation and reconstruction algorithm on 3D tetrahedral meshes. For each experiment, we first show the source and target meshes with the same number of vertices and connections, thereby forming a mapping. Then we show the reconstructed mapping from the 3D quasiconformal representation obtained from the given mapping. As we believe the proposed representation contains sufficient information about its corresponding mapping, we expect the reconstructed mapping to be as close to the mapping as possible, resulting in small reconstruction errors determined by the $l^2$ norm between the original mappings and the reconstructed mappings.
Also in the following experiments, we use the same boundary condition that
\begin{equation*}
f(p\in \mathcal{S})\in \mathcal{S}, \quad \mathcal{S}\in BoundarySet
\end{equation*}
where $BoundarySet=\bigl\{\{(i,y,z)\},\{(x,i,z)\},\{(x,y,i)\}\mid i \in \{0,1\},x,y,z\in \mathbb{R} \bigr\}$.
Figures \ref{fig:box2_recon},\ref{fig:box8_recon}, and \ref{fig:box9_recon} show the reconstruction results for two bijective mappings, and the reconstruction errors are $6.5147\times 10^{-11}$, $2.4309\times 10^{-10}$, and $1.2845\times 10^{-9}$, respectively. These small errors demonstrate that our approach is effective at reconstructing mappings using their 3D quasiconformal representations, yielding precise results for bijective mappings.
\input{img/mesh_recon/box2/recon_box2}
\input{img/mesh_recon/box8/recon_box8}
\input{img/mesh_recon/box9/recon_box9}
\begin{figure}[h]
\centering
\begin{subfigure}[t]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{img/mesh_recon/box2/source_mesh.png}
\caption{The source mesh.}
\end{subfigure}
\begin{subfigure}[t]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{img/mesh_recon/box2/target_mesh.png}
\caption{The target mesh.}
\end{subfigure}
\begin{subfigure}[t]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{img/mesh_recon/box2/recon_mesh.png}
\caption{The reconstructed mesh.}
\end{subfigure}
\caption{Mesh reconstruction result of mapping without folding. The reconstruction error is $6.5147\times 10^{-11}$.}
\label{fig:box2_recon}
\end{figure}
\begin{figure}[h]
\centering
\begin{subfigure}[t]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{img/mesh_recon/box8/source_mesh.png}
\caption{The source mesh.}
\end{subfigure}
\begin{subfigure}[t]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{img/mesh_recon/box8/target_mesh.png}
\caption{The target mesh.}
\end{subfigure}
\begin{subfigure}[t]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{img/mesh_recon/box8/recon_mesh.png}
\caption{The reconstructed mesh.}
\end{subfigure}
\caption{Mesh reconstruction result of mapping without folding. The reconstruction error is $2.4309\times 10^{-10}$.}
\label{fig:box8_recon}
\end{figure}
\begin{figure}[h]
\centering
\begin{subfigure}[t]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{img/mesh_recon/box9/source_mesh.png}
\caption{The source mesh.}
\end{subfigure}
\begin{subfigure}[t]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{img/mesh_recon/box9/target_mesh.png}
\caption{The target mesh.}
\end{subfigure}
\begin{subfigure}[t]{0.32\textwidth}
\centering
\includegraphics[width=\textwidth]{img/mesh_recon/box9/recon_mesh.png}
\caption{The reconstructed mesh.}
\end{subfigure}
\caption{Mesh reconstruction result of mapping without folding. The reconstruction error is $1.2845\times 10^{-9}$.}
\label{fig:box9_recon}
\end{figure}
In the film and animation industry, animation is generally created by first designing two keyframes and then interpolating between them to get the intermediate frames.
In this section, we provide a novel keyframe interpolation method based on the proposed 3D representation, which takes the geometric information of the mapping into account.
Given two keyframes $K_1$ and $K_2$, which are two triangular meshes with the same number of vertices and triangulation, our first step is to embed them into unit cubic domains $\Omega_1$ and $\Omega_2$ respectively.
Then we fill $\Omega_1$ with vertices. This step is necessary because it can ensure that the resulting mapping can map $K_1$ to $K_2$ without folding. If the vertices are too sparse, there may not be enough freedom for the vertices to move while satisfying the constraint that the mapping should be diffeomorphic.
However, adding too many vertices to the domain should be avoided, as it can significantly increase the dimension of the linear system and slow down the solving process. Therefore, we propose first to use the Poisson disk sampling method \cite{cook1986stochastic} to randomly sample points in the domain evenly, and assign to each vertex a threshold, or in other words, a probability, based on the minimal distance between the vertex and the vertices on the triangular mesh. The formula used to generate the threshold is as follows
\begin{equation*}
Prob(p) = min(1,\frac{d(p, K_1)}{\sigma})\cdot e^{-\kappa\cdot d(p, K_1)}
\end{equation*}
where $d(p, K_1)$ denotes the minimal distance between the vertex $p$ and the vertices in $K_1$, $\sigma$ is the radius parameter of the Poisson disk sampling, and $\kappa$ is the weight to control the sparsity. The first term is used to discard vertices that are too close to $K_1$, and the second exponential term is used to discard those far away from $K_1$. Then for each vertex $p$, we assign it a random number in $[0,1]$ and decide whether to discard it by comparing the random number with $Prob(p)$.
$\Omega_1$ is then tetrahedralized using tetgen \cite{hang2015tetgen}. We need to find a mapping such that:
\begin{enumerate}
\item It is a diffeomorphism;
\item It maps the vertices in $K_1$ to those in $K_2$.
\end{enumerate}
These can be achieved by using the efficient algorithm proposed in \cite{zhang2022unifying}, which makes use of a generalized conformality term to control the distortion of the mapping.
%Suppose we have two meshes for the same object in different states (say, a person in different poses).
%the meshes have the same number of vertices and triangulation.
%with the representation, we can interpolate the frames between the two meshes.
%we refer to these two meshes as starting and end frames.
%The first step is to find the diffeomorphic mapping between the two meshes.
%We first embed the two mesh into rectangular domains.
%For the starting frame, we need to fill in the rectangular domain with vertices so that we can perform tetrahedralization in the domain using tetgen \cite{hang2015tetgen}.
%Here we provide two methods for reference:
%\begin{enumerate}
% \item We use Poisson disk distribution to randomly sample points in the domain evenly, and assign to each vertex a probability based on the minimal distance between the vertex and the vertices on the mesh. The formula is as follows.
%
% Then we discard the points according to the probability.
%
% This method is not recommended to use in compression task, as the user needs to save all the additional points in the domain.
%
% \item Add points by level. (TO BE COMPLETED)
% This method can be used in the compression task.
%\end{enumerate}
With this mapping, we can map all the vertices in $\Omega_1$ to $\Omega_2$ diffeomorphically.
After that, we compute the representation for the mapping, which is a $\mathbb{R}^6$ valued function. This function is piecewise constant on each tetrahedron.
Next, we can interpolate between the $\mathbb{R}^6$ valued function for each tetrahedron and the upper triangular part of the identity matrix correspondingly.
%In the implementation, we rewrite it as a set of SPD matrices.
%There are many ways to perform interpolation on SPD matrices \cite{feragen2017geometries}, and in our experiment, we use the Log-Euclidean geodesics, the formula of which is as follows
%\begin{equation*}
% \gamma(t) = exp\left((1-t) log (I) + t log(P) \right) = exp\left(t log(P) \right), \quad t\in [0,1]
%\end{equation*}
%where the $log$ and $exp$ represent the matrix logarithm and exponent, which is easy to compute in the case that the matrix is SPD, and $P$ is the dilation matrix on a certain tetrahedron, which is SPD. Empirically this interpolation method performs better than other methods.
%Analysis: This may be because the "swelling effect" of the log-euclidean metric is trivial compared with other interpolation methods. In our derivation, the determinant of the Jacobian matrix is encoded in the generalized Laplacian operator. In discrete cases, the generalized Laplacian operator is implemented with the summation of volume times divergence, and the divergence is affected by the determinant of Jacobian.
%Since the tetrahedrons inside the object are nearly isometric (check the definition?) the determinant of Jacobian for the tetrahedrons inside the object can be regarded as unchanged. But those outside the object are changed due to the landmark matching condition. Therefore, the ratio for each tetrahedron around a vertex is changed, which may cause distortion in volume.
Once we have the interpolated representation, we can reconstruct mappings for each frame with Equations \ref{key_linear_system} and boundary conditions.
%Since the matrix representation is SPD, the interpolated representations are also SPD \cite{feragen2017geometries}. Therefore the big sparse matrix in the linear system is also SPD (Proof?). We can then use the conjugate gradient method to solve the sparse system efficiently.
In the following experiments, we show the interpolation results between human face meshes generated using 3D Morphable Model (3DMM) \cite{3DMM,paysan20093d}, or registered human scans sampled from the FAUST dataset\cite{bogo2014faust}.
\begin{figure}[h!]
\centering
\includegraphics[width=0.75\textwidth]{img/interp/interpolation_face.png}
\caption{Experimental results for 3D animation interpolation. Each column contains an animation sequence of an object. The objects in the first and last rows are samples generated using 3DMM with different expression parameters, and the second and third rows are the interpolated 3D models for those in the first and last rows. The results show that our algorithm can successfully interpolate between human face meshes to get 3D animation sequences.}
\label{fig:interp_face}
\end{figure}
In Figure \ref{fig:interp_face}, we show three animation sequences generated using the proposed algorithm. The motion between the two keyframes of each sequence is mild, meaning that the distance between the 3D quasiconformal representations of the keyframes is comparatively small. Therefore, we expect it to work properly, and the experiment demonstrates that it works as expected.
\begin{figure}[h!]
\centering
\includegraphics[width=0.75\textwidth]{img/interp/interpolation_faust.png}
\caption{Experimental results for 3D animation interpolation. Each column contains an animation sequence of an object. The objects in the first and last rows are registered human scans sampled from the FAUST dataset, and the second and third rows are the generated 3D models interpolated between those in the first and last rows. The results show that our algorithm can successfully interpolate between large deformation human body scans to get 3D animation sequences.}
\label{fig:interp_faust}
\end{figure}
We also try to apply the algorithm to extreme cases, as shown in Figure \ref{fig:interp_faust}, in which we show three animation sequences of human body motion. The scale of the motion between the two keyframes of each sequence is large, meaning that the distance between the 3D quasiconformal representations of the keyframes is large. The experiment demonstrates that our algorithm may work properly in some extreme cases.
Another application is to use the proposed 3D Representation to compress a 3D mapping.
Compared with 2D mapping, the storage requirement of 3D mappings is much higher. Nowadays, the prosperity of deep learning stimulates the need to create and store large datasets. With the development of the field of 3D animation, 3D data, which are generally much larger than 2D data, should be stored properly.
In this paper, we propose to store 3D mapping data using the proposed 3D representation. This representation has a good localized property, as the representation is defined on each tetrahedron and depicts the local distortion of the corresponding tetrahedron. In the following experiment, we will show that, compared with the coordinate function, our proposed representation has a better spectral property, which makes it suitable for mapping compression.
Our idea is similar to that in \cite{lui2013texture}, in which the author compresses 2D mapping using discrete Fourier transform. However, when it comes to 3D mapping, the number of vertices increases dramatically. When the distribution of the vertices is very uneven, one may need a very dense regular grid to preserve the information of the original mesh precisely, which will boost the computation.
As we already have a mesh structure, it is a natural way to perform spectral analysis on the tetrahedral mesh directly. \cite{shuman2013emerging} introduces the idea of performing signal processing on a graph utilizing the graph Laplacian. In a discrete 2D surface with geometric information, signal processing can be applied with the Laplace-Beltrami operator, as introduced in \cite{rustamov2007laplace,crane2018discrete}. In the 3D case, the Laplace-Beltrami operator can also be computed using a 3D version cotangent formula \cite{crane2019n, Volumetric_david}.
The 3D discrete Laplace-Beltrami operator is a matrix $L \in \mathbb{R}^{|\mathcal{V}|\times|\mathcal{V}|}$. Let $\Upsilon$ be the subset of $\mathcal{F}$ containing the tetrahedrons incident to an edge connecting $p_i$ and $p_j$, then the weight of this edge is computed as
\begin{equation*}
\omega_{ij}=\frac{1}{6}\sum_{T\in \Upsilon}\ell_{T_{\setminus ij}} \cot \theta^{ij}_{T_{\setminus ij}}
\end{equation*}
where $T_{\setminus ij}$ is the edge connecting the other two vertices in $T\setminus \{i,j\}$, $\ell_{T_{\setminus ij}}$ is the length of $T_{\setminus ij}$; $\theta^{ij}_{T_{\setminus ij}}$ is the interior dihedral angle of edge connecting $p_i$ and $p_j$.
Then the nonzero entries representing the edge connecting vertex $p_i$ and $p_j$ is $$L_{ij}=-\omega_{ij}$$
and diagonal element $$L_{ii} = \sum_{j=1}^{|\mathcal{V}|}\omega_{ij}$$ for each vertex $p_i$.
Then, by solving the generalized eigenvalue problem
\begin{equation} \label{generalize_eigenvalue_problem}
L\nu = \lambda M \nu
\end{equation}
where $M$ is the mass matrix whose diagonal $M_{ii}=\frac{1}{4}\sum_{T\in\mathcal{N}(p_i)}Vol(T)$, we obtain a series of eigenvalues $\{\lambda_1, \lambda_2, \dots ,\lambda_{|\mathcal{V}|}\}$ satisfying $\lambda_1 < \lambda_2 < \dots < \lambda_{|\mathcal{V}|}$, and their corresponding eigenvector $\{\nu_1, \nu_2, \dots, \nu_{|\mathcal{V}|}\}$ satisfying $\nu_i^TM\nu_i=1$ for all generalized eigenvectors $\nu_i$.
Let $\tilde{\nu}_i=M^{\frac{1}{2}}\nu_i$, then $\nu_i=M^{-\frac{1}{2}}\tilde{\nu}_i$. Substituting it into Equation \ref{generalize_eigenvalue_problem}, we have $LM^{-\frac{1}{2}}\tilde{\nu}_i=\lambda M^{\frac{1}{2}}\tilde{\nu}_i$, which is equivalent to $M^{-\frac{1}{2}}LM^{-\frac{1}{2}}\tilde{\nu}_i=\lambda \tilde{\nu}_i$. Note that $M^{-\frac{1}{2}}LM^{-\frac{1}{2}}$ is a symmetric matrix, and $\tilde{\nu}_i$ is its eigenvector, meaning that $\tilde{\nu}_j^T \tilde{\nu}_i=0$ if $i\neq j$. Thus, $\nu_j^T M^{\frac{1}{2}} M^{\frac{1}{2}}\nu_i=\nu_i^T M \nu_j=0$, meaning that the generalized eigenvectors of $L$ are $M$-orthogonal to each other.
Therefore, we have $V^TMV=I$ for matrix $V$ whose column vectors are the generalized eigenvectors. Thus we have $(V^TM)^{-1}=V$.
For any discrete function $f$ defined on the vertices of a tetrahedral mesh, the $M$-inner product between $f$ and eigenvector $\nu_i$ is defined as $$\langle f, \nu_i\rangle_{M}=f^T M \nu_i$$
Then $$\sum_i \langle f, \nu_i\rangle_{M}\nu_i =\sum_i (f^T M \nu_i)\nu_i = V(V^T M f)=V(V^TM)f=f$$
as $(V^TM)^{-1}=V$.
Therefore, we can project any function defined on a tetrahedral mesh to the spectral domain by computing $M$-inner product with the generalized eigenvectors of the discrete Laplace-Beltrami operator. Also, the eigenvalues indicate the frequency of the eigenvectors. A larger eigenvalue corresponds to a higher frequency. With this property, we can perform low-pass or high-pass filtering to any function on the mesh.
In our case, suppose we have a pair of 3D meshes with the same number of vertices and triangulation. This couple forms a mapping. we would like to find a compressed representation for this mapping.
We first construct the discrete Laplace-Beltrami operator and the mass matrix for the source mesh.
Then we solve the generalized eigenvalue problem \ref{generalize_eigenvalue_problem} with the constraint $\nu_i^TM\nu_i=1$ for all generalized eigenvectors $\nu_i$ to get the sorted eigenvalues and eigenvectors.
With the eigenvalues and eigenvectors, we can start to perform filtering to the 3D quasiconformal representation. A 3D representation is a piecewise linear vector-valued function defined on the tetrahedrons. We can treat this function as a combination of 6 scalar-valued functions, and perform filtering to the 6 functions separately.
For each of the 6 functions, we first interpolate it to the vertices of the mesh. Then we compute the $M$-inner product $\xi_i =\langle f, \nu_i\rangle_{M} $ for each eigenvector to get the spectrum. Based on the spectrum, one can select a threshold $\mathbf{T}\leq |\mathcal{V}|$, and save $\{\xi_i\mid i \in \mathbb{N}\cap [1, \mathbf{T}]\}$ and discard the rest. The smaller $\mathbf{T}$ is, the more storage will be saved, but the reconstruction accuracy will be lower.
To reconstruct the function, one can read the saved spectral components $\{\xi_i\mid i \in \mathbb{N}\cap [1, \mathbf{T}]\}$, from the storage device. Then by computing
\begin{equation*}
\tilde{f} = \sum_{i=1}^{\mathbf{T}} \xi_i \nu_i
\end{equation*}
The vector-valued function representing the 3D representation can be reconstructed. One can reconstruct the mapping subsequently by solving the linear systems \ref{key_linear_system} with the reconstructed 3D representation.
There are two primary concerns regarding this 3D mapping compression scheme:
\begin{enumerate}
\item Dimensionality Mismatch: The interpolated 3D representation is an $\mathbb{R}^6$ valued function, whereas the coordinate function is an $\mathbb{R}^3$ valued function. Consequently, to ensure that the storage requirements are comparable to those of storing the mapping directly, we must discard half of the spectral components. This process inevitably leads to a loss of information. However, our experimental results demonstrate that this operation is justified, as the significant information is primarily concentrated in the low-frequency region, making the loss due to the removal of high-frequency components relatively minor.
\item Direct Compression of Coordinate Function: One might question why we do not compress the coordinate function directly. Our experiments reveal that attempting direct compression of the coordinate function yields poor results.
\end{enumerate}
In the following experiments, we apply the above compression scheme to two 3D mappings. The experimental results are shown in Figures \ref{box1},\ref{fig:compress_box1_spectrum},\ref{fig:compress_box1_MSE} and Figure \ref{box7},\ref{fig:compress_box7_spectrum},\ref{fig:compress_box7_MSE} respectively.
Figures \ref{box1} and \ref{box7} show the two mappings and their compression results. (a) and (b) compose a mapping, (c) is the reconstructed result of compressing the coordinate function, and (d) is the reconstructed result of compressing the 3D representation. To illustrate the perturbation of the compressed mapping at the boundary, we have colored four of the outer surfaces of the tetrahedral mesh. Additionally, the edge where the two uncolored, transparent outer surfaces meet is highlighted in red.
In Figure \ref{box1}, we see that the red edge in (c) deviates from its original position in (b). Also the four colored outer surfaces in (b) become turbulent if the mapping is compressed using the coordinate function. In comparison, the four outer surfaces and the red edge in (d) stay in their original position, as the proposed reconstruction algorithm allows us to introduce boundary conditions.
The deformation of the mapping shown in Figure \ref{box7} is much larger. Compared with the mesh in (b), apart from the deviation of the four colored outer surfaces and the red edge, we further notice that the three surfaces inside the cube are also distorted. In comparison, the shape of the three surfaces in (d) is well-preserved, which demonstrates the robustness of our algorithm.
Figures \ref{fig:compress_box1_spectrum} and \ref{fig:compress_box7_spectrum} show the spectrum of the 3D representation for the two mappings. As the 3D representation is a $\mathbb{R}^6$ valued function, we have one spectrum for each function respectively. From the two figures, we notice that most of the information is concentrated in the low-frequency domain, therefore, we can safely discard the coefficients corresponding to the high-frequency domain.
Figures \ref{fig:compress_box1_MSE} and \ref{fig:compress_box7_MSE} visualize the mean square error between the compressed mapping and the original one. The reference error is the mean square error between the source and target meshes. We see that as we discard more high-frequency coefficients, the error becomes larger. More importantly, we notice that the curves are flat except when the threshold $\tau$ is small, meaning that we can achieve a high compression ratio with the proposed mapping compression algorithm.
In conclusion, our proposed mapping compression algorithm shows the following superiority,
\begin{enumerate}
\item It can be used to compress mapping defined on unstructured mesh;
\item It allows the introduction of boundary conditions;
\item It can compress mappings with a high compression ratio.
\end{enumerate}
\input{img/compress/box1/draw_box1_result}
\begin{figure}[h!]
\centering
\includegraphics[width=\textwidth]{img/compress/box1/spectrum.png}
\caption{Spectrum for each mapping. Each chart shows the corresponding spectrum of a component of the 3D representation $\Vec{q}$. We notice that the magnitude on the left of the charts is much larger than that on the right, meaning that most information lies in the low-frequency domain. From the right column, we know that there are lots of power which are close to zero. We can discard them to compress the mapping.}
\label{fig:compress_box1_spectrum}
\end{figure}
\begin{figure}[h!]
\centering
\includegraphics[width=0.6\textwidth]{img/compress/box1/MSE_discard.png}
\caption{Chart for MSE visualization for the cube with 9261 vertices and 40000 tetrahedrons. The reference error is the MSE between the source mesh and the target mesh. The MSE line represents the MSE between the target mesh and the reconstructed after discarding a certain amount of frequency components. $\mathbf{T}$, which represents the number of discarded frequency components, is shown in the x-axis.}
\label{fig:compress_box1_MSE}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%
\input{img/compress/box7/draw_box7_result}
\begin{figure}[h!]
\centering
\includegraphics[width=\textwidth]{img/compress/box7/spectrum.png}
\caption{Spectrum for each mapping. Each chart shows the corresponding spectrum of a component of the 3D representation $\Vec{q}$. We notice that the magnitude on the left of the charts is much larger than that on the right, meaning that most information lies in the low-frequency domain. From the right column, we know that there are lots of power which are close to zero. We can discard them to compress the mapping.}
\label{fig:compress_box7_spectrum}
\end{figure}
\begin{figure}[h!]
\centering
\includegraphics[width=0.6\textwidth]{img/compress/box7/MSE_discard.png}
\caption{Chart for MSE visualization for the cube with 7283 vertices and 43891 tetrahedrons. The reference error is the MSE between the source mesh and the target mesh. The MSE line represents the MSE between the target mesh and the reconstructed after discarding a certain amount of frequency components. $\mathbf{T}$, which represents the number of discarded frequency components, is shown in the x-axis.}
\label{fig:compress_box7_MSE}
\end{figure}
\begin{figure}[h!]
\centering
\includegraphics[width=0.9\textwidth]{img/compress/box1/box1_combined_for_arxiv.png}
\caption{Comparison between the results of compressing the coordinate function and the 3D representation. (a) and (b) are the source and target meshes, which compose a mapping. (c) shows the coordinate function compression result. The mesh is reconstructed using 200 spectral coefficients for each component of the coordinate function. (d) shows the coordinate 3D representation compression result. The mesh is reconstructed using 100 spectral coefficients for each component of the 3D representation.}
\label{box1}
\end{figure}
\begin{figure}[h!]
\centering
\includegraphics[width=0.9\textwidth]{img/compress/box7/box7_combined_for_arxiv.png}
\caption{Comparison between the results of compressing the coordinate function and the 3D representation. (a) and (b) are the source and target meshes, which compose a mapping. (c) shows the coordinate function compression result. The mesh is reconstructed using 800 spectral coefficients for each component of the coordinate function. (d) shows the coordinate 3D representation compression result. The mesh is reconstructed using 400 spectral coefficients for each component of the 3D representation.}
\label{box7}
\end{figure}
In this paper, we have proposed an effective 3D quasiconformal representation to describe the local dilation of 3D mappings. This representation, along with the associated reconstruction algorithm similar to Linear Beltrami Solver, allows us to process the mapping in the space of 3D quasiconformal representation.
We demonstrate the effectiveness of our proposed 3D quasiconformal representation and reconstruction algorithm. By reconstructing randomly generated discrete mappings defined on tetrahedral meshes with high precision, we demonstrate the correctness of the proposed reconstruction algorithm and the ability of the representation to encode distortion information.
We also show two applications enabled by the proposed 3D representation and the reconstruction algorithm. In the keyframe interpolation, we propose an alternative algorithm that enables the interpolation between keyframes in the space of 3D quasiconformal representation. The algorithm gives impressive results.
In mapping compression, we propose a compression algorithm for a mapping defined on unstructured mesh. It allows us to introduce boundary conditions so that we can control the domain easily. Also, it can achieve a high compression ratio for mappings with smooth deformation.
In future work, we plan to improve the computational efficiency of our algorithm and extend it to handle more complex deformations. We also aim to explore more applications where our technique could prove useful, including 3D image registration and image segmentation.
In summary, we have introduced an effective tool that, for the first time, fills the gap of describing and manipulating distortions in 3D space. The potential applications of our work are far-reaching, and we hope this newfound capability will prove invaluable for research involving 3D shapes and information.
% Generated by IEEEtran.bst, version: 1.14 (2015/08/26)
\begin{thebibliography}{10}
\providecommand{\url}[1]{#1}
\csname url@samestyle\endcsname
\providecommand{\newblock}{\relax}
\providecommand{\bibinfo}[2]{#2}
\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}
\providecommand{\BIBentryALTinterwordstretchfactor}{4}
\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus
\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}
\providecommand{\BIBforeignlanguage}[2]{{%
\expandafter\ifx\csname l@#1\endcsname\relax
\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%
\typeout{** loaded for the language `#1'. Using the pattern for}%
\typeout{** the default language instead.}%
\else
\language=\csname l@#1\endcsname
\fi
#2}}
\providecommand{\BIBdecl}{\relax}
\BIBdecl
\bibitem{lui2013texture}
L.~M. Lui, K.~C. Lam, T.~W. Wong, and X.~Gu, ``Texture map and video compression using beltrami representation,'' \emph{SIAM Journal on Imaging Sciences}, vol.~6, no.~4, pp. 1880--1902, 2013.
\bibitem{desbrun2002intrinsic}
M.~Desbrun, M.~Meyer, and P.~Alliez, ``Intrinsic parameterizations of surface meshes,'' in \emph{Computer graphics forum}, vol.~21.\hskip 1em plus 0.5em minus 0.4em\relax Wiley Online Library, 2002, pp. 209--218.
\bibitem{levy2002least}
B.~L{\'e}vy, S.~Petitjean, N.~Ray, and J.~Maillot, ``Least squares conformal maps for automatic texture atlas generation,'' \emph{ACM transactions on graphics (TOG)}, vol.~21, no.~3, pp. 362--371, 2002.
\bibitem{gu2004genus}
X.~Gu, Y.~Wang, T.~F. Chan, P.~M. Thompson, and S.-T. Yau, ``Genus zero surface conformal mapping and its application to brain surface mapping,'' \emph{IEEE transactions on medical imaging}, vol.~23, no.~8, pp. 949--958, 2004.
\bibitem{zayer2005discrete}
R.~Zayer, C.~Rossl, and H.-P. Seidel, ``Discrete tensorial quasi-harmonic maps,'' in \emph{International Conference on Shape Modeling and Applications 2005 (SMI'05)}.\hskip 1em plus 0.5em minus 0.4em\relax IEEE, 2005, pp. 276--285.
\bibitem{lui2010compression}
L.~M. Lui, T.~W. Wong, P.~Thompson, T.~Chan, X.~Gu, and S.-T. Yau, ``Compression of surface registrations using beltrami coefficients,'' in \emph{2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition}.\hskip 1em plus 0.5em minus 0.4em\relax IEEE, 2010, pp. 2839--2846.
\bibitem{choi2015flash}
P.~T. Choi, K.~C. Lam, and L.~M. Lui, ``Flash: Fast landmark aligned spherical harmonic parameterization for genus-0 closed brain surfaces,'' \emph{SIAM Journal on Imaging Sciences}, vol.~8, no.~1, pp. 67--94, 2015.
\bibitem{choi2015fast}
P.~T. Choi and L.~M. Lui, ``Fast disk conformal parameterization of simply-connected open surfaces,'' \emph{Journal of Scientific Computing}, vol.~65, pp. 1065--1090, 2015.
\bibitem{chen2019image}
K.~Chen, L.~M. Lui, and J.~Modersitzki, ``Image and surface registration,'' in \emph{Handbook of Numerical Analysis}.\hskip 1em plus 0.5em minus 0.4em\relax Elsevier, 2019, vol.~20, pp. 579--611.
\bibitem{lam2014genus}
K.~C. Lam, X.~Gu, and L.~M. Lui, ``Genus-one surface registration via teichm{\"u}ller extremal mapping,'' in \emph{International Conference on Medical Image Computing and Computer-Assisted Intervention}.\hskip 1em plus 0.5em minus 0.4em\relax Springer, 2014, pp. 25--32.
\bibitem{lam2015landmark}
------, ``Landmark constrained genus-one surface teichm{\"u}ller map applied to surface registration in medical imaging,'' \emph{Medical image analysis}, vol.~25, no.~1, pp. 45--55, 2015.
\bibitem{lam2014landmark}
K.~C. Lam and L.~M. Lui, ``Landmark-and intensity-based registration with large deformations via quasi-conformal maps,'' \emph{SIAM Journal on Imaging Sciences}, vol.~7, no.~4, pp. 2364--2392, 2014.
\bibitem{lam2015quasi}
------, ``Quasi-conformal hybrid multi-modality image registration and its application to medical image fusion,'' in \emph{International Symposium on Visual Computing}.\hskip 1em plus 0.5em minus 0.4em\relax Springer, 2015, pp. 809--818.
\bibitem{lui2014teichmuller}
L.~M. Lui, K.~C. Lam, S.-T. Yau, and X.~Gu, ``Teichmuller mapping (t-map) and its applications to landmark matching registration,'' \emph{SIAM Journal on Imaging Sciences}, vol.~7, no.~1, pp. 391--426, 2014.
\bibitem{lui2014geometric}
L.~M. Lui and C.~Wen, ``Geometric registration of high-genus surfaces,'' \emph{SIAM Journal on Imaging Sciences}, vol.~7, no.~1, pp. 337--365, 2014.
\bibitem{lui2010shape}
L.~M. Lui, T.~W. Wong, P.~Thompson, T.~Chan, X.~Gu, and S.-T. Yau, ``Shape-based diffeomorphic registration on hippocampal surfaces using beltrami holomorphic flow,'' in \emph{International Conference on Medical Image Computing and Computer-Assisted Intervention}.\hskip 1em plus 0.5em minus 0.4em\relax Springer, 2010, pp. 323--330.
\bibitem{lui2012optimization}
L.~M. Lui, T.~W. Wong, W.~Zeng, X.~Gu, P.~M. Thompson, T.~F. Chan, and S.-T. Yau, ``Optimization of surface registrations using beltrami holomorphic flow,'' \emph{Journal of scientific computing}, vol.~50, no.~3, pp. 557--585, 2012.
\bibitem{qiu2020inconsistent}
D.~Qiu and L.~M. Lui, ``Inconsistent surface registration via optimization of mapping distortions,'' \emph{Journal of Scientific Computing}, vol.~83, no.~3, pp. 1--31, 2020.
\bibitem{wen2015landmark}
C.~Wen, D.~Wang, L.~Shi, W.~C. Chu, J.~C. Cheng, and L.~M. Lui, ``Landmark constrained registration of high-genus surfaces applied to vestibular system morphometry,'' \emph{Computerized Medical Imaging and Graphics}, vol.~44, pp. 1--12, 2015.
\bibitem{yung2018efficient}
C.~P. Yung, G.~P. Choi, K.~Chen, and L.~M. Lui, ``Efficient feature-based image registration by mapping sparsified surfaces,'' \emph{Journal of Visual Communication and Image Representation}, vol.~55, pp. 561--571, 2018.
\bibitem{zeng2014surface}
W.~Zeng, L.~Ming~Lui, and X.~Gu, ``Surface registration by optimization in constrained diffeomorphism space,'' in \emph{Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition}, 2014, pp. 4169--4176.
\bibitem{zhang2019new}
D.~Zhang, A.~Theljani, and K.~Chen, ``On a new diffeomorphic multi-modality image registration model and its convergent gauss-newton solver,'' \emph{Journal of Mathematical Research with Applications}, vol.~39, no.~6, pp. 633--656, 2019.
\bibitem{zhang2014automatic}
M.~Zhang, F.~Li, X.~Wang, Z.~Wu, S.-Q. Xin, L.-M. Lui, L.~Shi, D.~Wang, and Y.~He, ``Automatic registration of vestibular systems with exact landmark correspondence,'' \emph{Graphical models}, vol.~76, no.~5, pp. 532--541, 2014.
\bibitem{zhang2018novel}
D.~Zhang and K.~Chen, ``A novel diffeomorphic model for image registration and its algorithm,'' \emph{Journal of Mathematical Imaging and Vision}, vol.~60, no.~8, pp. 1261--1283, 2018.
\bibitem{chan2018topology}
H.-L. Chan, S.~Yan, L.-M. Lui, and X.-C. Tai, ``Topology-preserving image segmentation by beltrami representation of shapes,'' \emph{Journal of Mathematical Imaging and Vision}, vol.~60, no.~3, pp. 401--421, 2018.
\bibitem{siu2020image}
C.~Y. Siu, H.~L. Chan, and R.~L. Ming~Lui, ``Image segmentation with partial convexity shape prior using discrete conformality structures,'' \emph{SIAM Journal on Imaging Sciences}, vol.~13, no.~4, pp. 2105--2139, 2020.
\bibitem{DaopingZhang2021Taci}
D.~Zhang, X.~cheng Tai, and L.~M. Lui, ``\BIBforeignlanguage{eng}{Topology- and convexity-preserving image segmentation based on image registration},'' \emph{\BIBforeignlanguage{eng}{Applied Mathematical Modelling}}, vol. 100, p. 218, 2021.
\bibitem{zhang2021topology_3d}
D.~Zhang and L.~M. Lui, ``Topology-preserving 3d image segmentation based on hyperelastic regularization,'' \emph{Journal of Scientific Computing}, vol.~87, no.~3, pp. 1--33, 2021.
\bibitem{CHAN2016177}
\BIBentryALTinterwordspacing
H.~L. Chan, H.~Li, and L.~M. Lui, ``Quasi-conformal statistical shape analysis of hippocampal surfaces for alzheimer's disease analysis,'' \emph{Neurocomputing}, vol. 175, pp. 177--187, 2016. [Online]. Available: \url{https://www.sciencedirect.com/science/article/pii/S0925231215015064}
\BIBentrySTDinterwordspacing
\bibitem{chan2020quasi}
H.-L. Chan, H.-M. Yuen, C.-T. Au, K.~C.-C. Chan, A.~M. Li, and L.-M. Lui, ``Quasi-conformal geometry based local deformation analysis of lateral cephalogram for childhood osa classification,'' \emph{arXiv preprint arXiv:2006.11408}, 2020.
\bibitem{choi2020tooth}
G.~P. Choi, H.~L. Chan, R.~Yong, S.~Ranjitkar, A.~Brook, G.~Townsend, K.~Chen, and L.~M. Lui, ``Tooth morphometry using quasi-conformal theory,'' \emph{Pattern Recognition}, vol.~99, p. 107064, 2020.
\bibitem{choi2020shape}
G.~P. Choi, D.~Qiu, and L.~M. Lui, ``Shape analysis via inconsistent surface registration,'' \emph{Proceedings of the Royal Society A}, vol. 476, no. 2242, p. 20200147, 2020.
\bibitem{lui2013shape}
L.~M. Lui, W.~Zeng, S.-T. Yau, and X.~Gu, ``Shape analysis of planar multiply-connected objects using conformal welding,'' \emph{IEEE transactions on pattern analysis and machine intelligence}, vol.~36, no.~7, pp. 1384--1401, 2013.
\bibitem{meng2016tempo}
T.~W. Meng, G.~P.-T. Choi, and L.~M. Lui, ``Tempo: Feature-endowed teichmuller extremal mappings of point clouds,'' \emph{SIAM Journal on Imaging Sciences}, vol.~9, no.~4, pp. 1922--1962, 2016.
\bibitem{chen2021deep}
Q.~Chen, Z.~Li, and L.~M. Lui, ``A deep learning framework for diffeomorphic mapping problems via quasi-conformal geometry applied to imaging,'' \emph{arXiv preprint arXiv:2110.10580}, 2021.
\bibitem{guo2023automatic}
Y.~Guo, Q.~Chen, G.~P. Choi, and L.~M. Lui, ``Automatic landmark detection and registration of brain cortical surfaces via quasi-conformal geometry and convolutional neural networks,'' \emph{Computers in Biology and Medicine}, p. 107185, 2023.
\bibitem{lee2016landmark}
Y.~T. Lee, K.~C. Lam, and L.~M. Lui, ``Landmark-matching transformation with large deformation via n-dimensional quasi-conformal maps,'' \emph{Journal of Scientific Computing}, vol.~67, pp. 926--954, 2016.
\bibitem{zhang2022unifying}
D.~Zhang, G.~P. Choi, J.~Zhang, and L.~M. Lui, ``A unifying framework for n-dimensional quasi-conformal mappings,'' \emph{SIAM Journal on Imaging Sciences}, vol.~15, no.~2, pp. 960--988, 2022.
\bibitem{huang2024topology}
C.~Huang, K.~Chen, M.~Huang, D.~Kong, and J.~Yuan, ``Topology-preserving image registration with novel multi-dimensional beltrami regularization,'' \emph{Applied Mathematical Modelling}, vol. 125, pp. 539--556, 2024.
\bibitem{cook1986stochastic}
R.~L. Cook, ``Stochastic sampling in computer graphics,'' \emph{ACM Transactions on Graphics (TOG)}, vol.~5, no.~1, pp. 51--72, 1986.
\bibitem{hang2015tetgen}
S.~Hang, ``Tetgen, a delaunay-based quality tetrahedral mesh generator,'' \emph{ACM Trans. Math. Softw}, vol.~41, no.~2, p.~11, 2015.
\bibitem{3DMM}
\BIBentryALTinterwordspacing
V.~Blanz and T.~Vetter, ``A morphable model for the synthesis of 3d faces,'' in \emph{Proceedings of the 26th Annual Conference on Computer Graphics and Interactive Techniques}, ser. SIGGRAPH '99.\hskip 1em plus 0.5em minus 0.4em\relax USA: ACM Press/Addison-Wesley Publishing Co., 1999, p. 187–194. [Online]. Available: \url{https://doi.org/10.1145/311535.311556}
\BIBentrySTDinterwordspacing
\bibitem{paysan20093d}
P.~Paysan, R.~Knothe, B.~Amberg, S.~Romdhani, and T.~Vetter, ``A 3d face model for pose and illumination invariant face recognition,'' in \emph{2009 sixth IEEE international conference on advanced video and signal based surveillance}.\hskip 1em plus 0.5em minus 0.4em\relax Ieee, 2009, pp. 296--301.
\bibitem{bogo2014faust}
F.~Bogo, J.~Romero, M.~Loper, and M.~J. Black, ``Faust: Dataset and evaluation for 3d mesh registration,'' in \emph{Proceedings of the IEEE conference on computer vision and pattern recognition}, 2014, pp. 3794--3801.
\bibitem{shuman2013emerging}
D.~I. Shuman, S.~K. Narang, P.~Frossard, A.~Ortega, and P.~Vandergheynst, ``The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains,'' \emph{IEEE signal processing magazine}, vol.~30, no.~3, pp. 83--98, 2013.
\bibitem{rustamov2007laplace}
R.~M. Rustamov \emph{et~al.}, ``Laplace-beltrami eigenfunctions for deformation invariant shape representation,'' in \emph{Symposium on geometry processing}, vol. 257, 2007, pp. 225--233.
\bibitem{crane2018discrete}
K.~Crane, ``Discrete differential geometry: An applied introduction,'' \emph{Notices of the AMS, Communication}, vol. 1153, 2018.
\bibitem{crane2019n}
------, ``The n-dimensional cotangent formula,'' \emph{Online note. URL: https://www. cs. cmu. edu/\~{} kmcrane/Projects/Other/nDCotanFormula. pdf}, pp. 11--32, 2019.
\bibitem{Volumetric_david}
X.~Gu, Y.~Wang, and S.-T. Yau, ``{Volumetric Harmonic Map},'' \emph{Communications in Information \& Systems}, vol.~3, no.~3, pp. 191 -- 202, 2003.
\end{thebibliography}