## 3 Methods
### 3D Gaussian Scene Representation  
In RK-SLAM, for the map \(\mathbf{M}\) representing the scene, in addition to a 3D Gaussian \(\mathbf{G}_{0}\) representing the refined scene, there is a sliding window \(W_{s}\) containing multiple groups of sub-Gaussians \(\mathbf{G}_{k}\) awaiting fine-tuning as follows:  
\[\mathbf{M}=(\bigcup_{k\in W_{s}}\mathbf{G}_{k})\bigcup\mathbf{G}_{0}. \tag{1}\]  
For \(\mathbf{G}_{0}\), there are \(N_{0}\) 3D Gaussians. Each 3D Gaussian contains a center \(\mathbf{\mu}\in\mathbb{R}^{3}\), a spatial covariance \(\mathbf{\Sigma}\in\mathbb{R}^{3\times 3}\), an opacity \(\alpha\in\mathbb{R}\), and a color \(c\). \(c\) is represented by spherical harmonics for view-dependent radiance. \[\mathbf{G}_{0}=\{G_{i}:(\mathbf{\mu}_{i},\mathbf{\Sigma}_{i},\alpha_{i},c_{i})\mid i=1, \ldots,N_{0}\}, \tag{2}\]  
where \(\mathbf{\Sigma}_{i}=\mathbf{R}_{i}\mathbf{S}_{i}\mathbf{S}_{i}^{T}\mathbf{R}_{i}^{T}\), \(\mathbf{S}\in\mathbb{R}^{3}\) is a 3D scale vector, and \(\mathbf{R}\in\mathbb{R}^{3\times 3}\) is the rotation matrix, which participates in computation as a 4D quaternion. Similarly, the 3D Gaussians in \(\mathbf{G}_{k}\) also include these parameters. The key difference is that the parameters, particularly the centers \(\mathbf{\mu}^{\prime}\) and rotation matrices \(\mathbf{R}^{\prime}\), are based on the pose of the \(k\)-th keyframe. Therefore, the parameters of \(\mathbf{G}_{k}\) also include the extrinsic matrix \(\mathbf{w}_{k}\) of the \(k\)-th keyframe as follows:  
Figure 1: Overview of RK-SLAM. \[ \begin{split} G_{k}=\{\mathbf{w}_{k},\{G_{i}:(\mathbf{\mu}_{i}^{\prime},\mathbf{ \Sigma}_{i}^{\prime},\alpha_{i},c_{i})\mid i=1,\dots,N_{k}\}\},\\ \mathbf{\Sigma}_{i}^{\prime}=\mathbf{R}_{i}^{\prime}\mathbf{S}_{i}\mathbf{S}_{i} ^{T}\mathbf{R}_{i}^{\prime},\end{split}  \tag{3}\]  
where the extrinsic matrix \(\mathbf{w}_{k}\) contains the a rotation matrix \(\mathbf{Rot}\in\mathbb{R}^{3\times 3}\) and a translation vector \(\mathbf{Trans}\in\mathbb{R}^{3}\). It can be expressed as follows:  
\[\mathbf{w}_{k}= \begin{bmatrix}\mathbf{Rot}\ \mathbf{Trans}^{T}\\ \mathbf{0}\ \mathbf{1}\end{bmatrix} . \tag{4}\]  
When rendering the map \(\mathbf{M}\), the 3D Gaussians in \(G_{k}\) are transformed from the camera coordinate system to the world coordinate system using the extrinsic matrix \(\mathbf{w}_{k}\). After aligning with the coordinate system of \(G_{0}\), they are united. The primary parameters involved in this transformation are the center coordinates \(\mathbf{\mu}_{i}^{\prime}\) and the rotation matrices \(\mathbf{R}_{i}^{\prime}\) as follows:  
\[ \begin{cases}\mathbf{\mu}_{i}=\mathbf{w}_{k}^{-1}\mathbf{\mu}_{i}^{\prime},\\ \mathbf{R}_{i}=\mathbf{Rot}^{-1}\mathbf{R}_{i}^{\prime},\end{cases} i=1,2,\dots,N_{k}. \tag{5}\]  
In practice, after they are united, the map \(\mathbf{M}\) can be expressed as follows:  
\[ \begin{split}\mathbf{M}=\{G_{i}:(\mathbf{\mu}_{i}\mathbf{\Sigma}_{i},\mathbf{ \alpha}_{i},c_{i})\mid i=1,\dots,N\},\\ N=N_{0}+\sum_{k\in W_{s}}N_{k}.\end{split}  \tag{6}\]  
The differentiable splatting rasterized rendering follows [18]. First, we need to project the 3D coordinates of the 3D Gaussians onto the 2D plane of the target camera using the following equations:  
\[ \begin{split} d&=(\mathbf{w}_{target}\mathbf{\mu})_{z},\\ \mathbf{\mu}^{2D}&=\mathbf{K}\frac{\mathbf{w}_{target}\mathbf{\mu}}{ d},\\ \mathbf{\Sigma}^{2D}&=\mathbf{J}\mathbf{w}_{target}\mathbf{\Sigma} \mathbf{w}_{target}^{T},\end{split}  \tag{7}\]  
where \(\mathbf{K}\) is the intrinsic matrix of the target camera, \(\mathbf{w}_{target}\) is the extrinsic matrix, \(\mathbf{J}\) is the Jacobian of the affine approximation of the projective transformation, and \(d\) is the depth value on the \(z\)-axis after the 3D Gaussian center is projected onto the target camera coordinate system.