# Three-Dimensional Modeling of Heart Soft Tissue Motion
## 2 Materials and Methods  
### Re-Parameterization of Bezier Surface Modeling  
The Bezier method has a very fast calculation speed in the case of a few control points and can ensure that the surface is smooth in the case of any control point arrangement. It is generated by interpolating the control points based on the Bernstein basis function, given as Equations (2) and (3). At the same time, the model established using the Bezier method is completely and only determined by the relative positions of the control points. Therefore, this method can ensure the same modeling with the control point data and facilitate surface reconstruction. Therefore, the Bezier method is the basis of many commonly used methods [28,29]. This study gave full play to the advantages of the classical Bezier method, and at the same time, puts forward some improved ideas and methods for its shortcomings. If \(m\times n\) control points \(P_{ij}\) are given in a known space, let  
\[p_{m-1,n-1}(u,v)=\sum\limits_{i=0}^{m-1}\sum\limits_{j=0}^{n-1}B_{i,m-1}(u) \,B_{j,n-1}(v)\,P_{ij} \tag{1}\]  
where \(i=0,1,\ldots,m-1\), \(j=0,1,\ldots,n-1\), the surface \(p_{m,n}(u,v)\) represented by Formula (1) is a Bezier surface determined by \(m\times n\) control points, and \(B_{i,m}(u)\) and \(B_{j,n}(v)\) are Bernstein basis functions of different orders:  
\[B_{i,m}(u)=C_{m}^{i}u^{i}(1-u)^{m-i}=\frac{m!}{i!(m-i)!}u^{i}(1-u)^{m-i} \tag{2}\]  
\[B_{j,n}(v)=C_{n}^{j}v^{j}(1-v)^{n-j}=\frac{n!}{j!(n-j)!}v^{j}(1-v)^{n-j} \tag{3}\]  
where \(u\in[0,1],v\in[0,1]\). The data used in the geometric modeling process in this study was the actual collected cardiac local surface position information, and each frame was composed of a \(3\times 3\) dot matrix. According to the definition of a Bezier surface, it is known that the surface is a biquadratic Bezier surface, and its expression is  
\[ \begin{array}{rl}p_{2,2}(u,v)&=\sum\limits_{i=0}^{2}\sum\limits_{j=0}^{2}B_ {i,2}(u)\,B_{j,2}(v)\,P_{ij}\\ &=(1-u)^{2}(1-v)^{2}P_{00}+2(1-u)^{2}v(1-v)P_{01}+(1-u)^{2}v^{2}P_{02}\\ &+2u(1-u)(1-v)^{2}P_{10}+4u(1-u)v(1-v)P_{11}+2u(1-u)v^{2}P_{12}\\ &+u^{2}(1-v)^{2}P_{20}+2u^{2}v(1-v)P_{21}+2u_{2}v^{2}P_{22}\end{array}  \tag{4}\]The matrix form is  
\[p_{2,2}(u,v)= \begin{bmatrix}u^{2}&u&1\end{bmatrix}\begin{bmatrix}1&-2&1\\ -2&2&0\\ 1&0&0\end{bmatrix}\begin{bmatrix}P_{00}&P_{01}&P_{02}\\ P_{10}&P_{11}&P_{12}\\ P_{20}&P_{21}&P_{22}\end{bmatrix}\begin{bmatrix}1&-2&1\\ -2&2&0\\ 1&0&0\end{bmatrix}\begin{bmatrix}v^{2}\\ v\\ 1\end{bmatrix}  \tag{5}\]  
where \(p_{2,2}(u,v)\) represents the coordinates of any point on the surface and \(B_{i,2}(u)\) and \(B_{j,2}(v)\) are second-order Bernstein basis functions, where the control point coordinates are  
\[ \begin{bmatrix}P_{00}&P_{01}&P_{02}\\ P_{10}&P_{11}&P_{12}\\ P_{20}&P_{21}&P_{22}\end{bmatrix} \]  
The Bezier surface geometric modeling process needs to know the control point coordinates, and the Bezier surface calculates the points on the surface through the control points and parameters \(u,v\). Therefore, to calculate the coordinates of the control points, we need to know not only the points on the surface but also the parameters \(u,v\). Since the data set approximately represents a uniform rectangular area, the \(u,v\) corresponding to each coordinate point in this case is  
\[ \begin{bmatrix}(1,0)&(1,0.5)&(1,1)\\ (0.5,0)&(0.5,0.5)&(0.5,1)\\ (0,0)&(0,0.5)&(0,1)\end{bmatrix} \]  
The control point coordinates corresponding to the surface can be inversely calculated according to Formula (4), and then the biquadratic Bezier surface can be determined according to the Bezier surface given in Formula (1). Considering that the Bezier surface definition requires known control points but the data set acquisition usually obtains mismatching of surface points, this study re-parameterized Equation (4) so that the coordinates of the data set can be directly brought into the formula for Bezier surface modeling and calculation, thus saving a lot of the control point coordinate calculation process.