SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Similar to the existing ray-based methods LFN and PRIF, our RayDF also has the superiority in efficiency to generate 2D images or recover the explicit surface points. To quantitatively compare the efficiency with baselines, we conduct a simple experiment to generate an  $800 \times 800$  depth image on a computer with a single NVIDIA RTX 3090 GPU card and a CPU of AMD Ryzen 7. As shown in Table 1, it can be seen that, not surprisingly, the coordinate-based methods OF/ DeepSDF/ NDF/ NeuS/ DS-NeRF are extremely slow to render a high-resolution depth image. In particular, OF [46] needs a large number of small steps to gradually approach the surface point along a given light ray direction, while DeepSDF [54] and NDF [14] rely on expensive sphere tracing to
Table 1: Rendering time consumption (seconds).
Time
OF [46]	286.057
DeepSDF [54]	17.590
NDF [14]	28.310
NeuS [77]	32.793
DS-NeRF [19]	25.612
LFN [64]	0.017
PRIF [23]	0.013
RayDF (Ours)	0.019
regress the points. NeuS [77] and DS-NeRF [19] need extra post-processing steps to calculate depth values from densities. By contrast, our RayDF and the existing ray-based methods achieve more than  $1000 \times$  faster speed to render a dense depth view.
4.2 Evaluation on Blender Dataset
The Blender dataset from NeRF [47] consists of pathtraced images of 8 synthetic objects with complicated geometry and realistic materials. Each object has 100 views for training and 200 novel views for testing. Each image has  $800 \times 800$  pixels. Since the released dataset does not include depth images, we just use the provided Blender files to generate additional depth scans of the same resolution exactly following the original 2D view poses. Note that, the physical sizes of these models are about 2.5 meters in length/height/width, so the sphere diameter  $D$  is set as 3 meters in our method. For the baselines and our method, we conduct the following two groups of experiments.
- Group 1 - 3D Shape Representation Only: Since our RayDF needs depth scans in training to learn continuous 3D shape representations, we conduct this group of experiments only on multi-view depth images. All baselines are also trained on the same number of depth views.
- Group 2 - 3D Shape and Appearance Representations: Our RayDF is also flexible to add a parallel branch to output radiance field, i.e., RGB values, so that the continuous appearance representations can be simultaneously learned. In this regard, we conduct this group of experiments on both RGB images and depth images. The baselines NeuS/ DS-NeRF/ LFN/ PRIF are also trained on the same RGBD images for comparison. The other three methods OF/ DeepSDF/ NDF are not
Table 2: Quantitative results of all baselines and our method in experiments of Groups 1&2. All scores are averaged out across 8 scenes of the Blender dataset [47].
Group 1	Group 2
ADE↓	CD (×10-3)↓ mean / median	ADE↓	CD (×10-3)↓ mean / median	PSNR↑	SSIM ↑	LPIPS ↓
OF [46]	10.57	2.982 / 0.706	-	-	-	-	-
DeepSDF [54]	12.95	3.382 / 0.679	-	-	-	-	-
NDF [14]	12.14	2.976 / 0.831	-	-	-	-	-
NeuS [77]	11.88	4.756 / 0.907	12.10	4.662 / 0.938	27.19	0.910	0.100
DS-NeRF [19]	13.22	117.270 / 1.135	14.64	143.295 / 1.760	26.63	0.933	0.063
LFN [64]	24.47	89.425 / 15.681	12.33	60.289 / 1.230	23.20	0.888	0.125
PRIF [23]	14.68	20.764 / 1.677	14.56	21.279 / 1.693	23.31	0.874	0.152
RayDF (Ours)	7.97	3.388 / 0.663	8.17	3.295 / 0.755	26.52	0.910	0.099
included here, because it is non-trivial to add RGB supervision due to their level-set formulation. Details of the parallel branch for all methods are in Appendix A.3.
Analysis: Table 2 shows the quantitative comparison. We can see that: 1) Our RayDF achieves significantly better results for explicit surface recovering on both groups of experiments, especially on the most important ADE metric, demonstrating the clear superiority over both coordinate and ray based baselines. 2) Our method also achieves comparable performance with DS-NeRF for novel view synthesis, being better than LFN and PRIF and showing the flexibility of our framework.
4.3 Evaluation on DM-SR Dataset
The DM-SR dataset from the recent DM-NeRF paper [73] consists of 8 synthetic complex 3D indoor rooms. The room types and designs follow Hypersim dataset [59], and the rendering trajectories for both training and testing images follow the Blender dataset of NeRF [47]. For each 3D scene, there are 300 views for training and 100 novel views for testing. Each view has  $400 \times 400$  pixels. Each scene has a physical size of about 10 meters in length/height/width, so the sphere diameter  $D$  is set as 11 meters in our method. Similarly, we conduct the following two groups of experiments.
- Group 1 - 3D Shape Representation Only: We conduct this group of experiments only on multi-view depth images for all methods.
- Group 2 - 3D Shape and Appearance Representations: We conduct this group of experiments on both RGB images and depth images for NeuS/ DS-NeRF/ LFN/ PRIF and our method.
Table 3: Quantitative results of all baselines and our method in experiments of Groups 1&2. All scores are averaged out across 8 scenes of the DM-SR dataset [73].
ADE↓	Group 1
CD (×10-3)↓
mean / median	ADE↓	CD (×10-3)↓
mean / median	PSNR↑	SSIM ↑	LPIPS ↓
OF [46]	15.83	11.402 / 4.888	-	-	-	-	-
DeepSDF [54]	16.97	11.281 / 5.087	-	-	-	-	-
NDF [14]	22.41	12.300 / 5.911	-	-	-	-	-
NeuS [77]	9.94	12.744 / 4.620	11.66	15.017 / 5.308	33.22	0.965	0.054
DS-NeRF [19]	10.77	25.380 / 6.032	10.77	25.548 / 6.102	31.83	0.977	0.026
LFN [64]	18.30	13.673 / 5.372	18.51	14.085 / 5.349	30.86	0.930	0.111
PRIF [23]	11.89	25.993 / 5.159	11.77	24.842 / 5.156	31.01	0.933	0.111
RayDF (Ours)	7.41	14.272 / 5.353	7.97	14.251 / 5.300	30.32	0.940	0.113
Analysis: From Table 3, it can be seen that our method again surpasses all baselines on the most critical ADE metric in both groups of experiments, though the rough metric CD scores are just comparable with baselines potentially due to the inaccuracy incurred by external TSDF fusion. In the meantime, our method still obtains high-quality novel view synthesis, without noticeably sacrificing shape representation when trained with both RGB images and depth scans in Group 2.
4.4 Evaluation on ScanNet Dataset
We further evaluate our method on the challenging real-world 3D dataset ScanNet [16]. We randomly select 6 scenes for evaluation. Originally, each scene has more than 2000 RGBD scans in a relatively
Table 4: Quantitative results of all baselines and our method in experiments of Groups 1&2. All scores are averaged out across 6 scenes of the ScanNet dataset [16].
ADE↓	Group 1
CD (×10-3)↓
mean / median	ADE↓	CD (×10-3)↓
mean / median	PSNR↑	SSIM ↑	LPIPS ↓
OF [46]	15.84	8.991 / 2.810	-	-	-	-	-
DeepSDF [54]	12.07	17.200 / 6.255	-	-	-	-	-
NDF [14]	22.15	30.436 / 8.348	-	-	-	-	-
NeuS [77]	17.20	30.475 / 3.771	24.12	67.504 / 5.658	27.00	0.817	0.253
DS-NeRF [19]	6.64	9.653 / 2.318	7.84	14.642 / 2.950	25.03	0.855	0.197
LFN [64]	6.53	7.651 / 1.864	6.77	31.928 / 2.162	28.14	0.814	0.262
PRIF [23]	10.32	19.662 / 2.828	10.65	22.902 / 2.804	21.14	0.731	0.388
RayDF (Ours)	5.42	10.517 / 1.848	5.31	10.739 / 2.009	31.58	0.856	0.224
long sequence, whose camera poses are usually facing outwards within indoor rooms. Such long camera trajectories pose a great challenge to our method due to our sphere parameterization of input rays. To overcome this issue, we take the divide and conquer strategy to process a subset of the full video frames for each scene. In particular, for each scene, we only pick up a subset of 300 continuous RGBD scans in our experiment, where 200 are uniformly sampled for training, and 100 for testing. As to these partial 3D scenes, the physical sizes are between  $4 \sim 16$  meters in length/height/width, so the sphere diameter  $D$  is set as 16 meters in our method. Similarly, we conduct the following two groups of experiments.
Analysis: Table 4 compared all methods on the challenging real-world scenes. Remarkably, our RayDF clearly outperforms all baselines in almost all evaluation metrics in both groups of experiments, showing a distinct advantage in representing noisy and complex real-world 3D scenes. This confirms that multi-view geometry consistency is indeed essential in learning 3D representations.
Since our framework just has two MLP-based neural networks, there is few hyperparameter to tune. The key component here is the dual-ray visibility classifier. To evaluate its effectiveness, we mainly conduct the following ablations on the classifier on Blender dataset [47] only with depth images.
(1) Removing the dual-ray visibility classifier: Without the classifier, the multi-view consistency loss function becomes the simple  $\ell_1$  loss:  $\ell_{mv} = |\hat{d} - d|$  for rays in the training depth scans.
(2) Replacing position  $(x,y,z)$  by ray distance  $d$  in function  $k(\cdot)$ : This is to evaluate the enhancement of explicitly adding surface point position.
(3) Removing the function  $k(\cdot)$  and only using two rays: This ablation is to demonstrate the necessity of adding surface information for accurate classification.
(4) Concatenating two rays instead of average pooling: This ablation aims to evaluate the effect of the symmetry of the input rays on our classifier.
(5) Adding noises to the well-trained visibility classifier: Various levels of noise are introduced to the well-trained classifier to assess the reliability of our visibility classifier. In particular, we directly add a random noise drawn from a normal distribution  $(0, \sigma^2)$  to the visibility score with a clip between 0 and 1, and then use the noisy score in our multi-view consistency loss  $\ell_{mv}$  in Eq. 3 to optimize our ray surface distance network.
Table 5: Ablation studies on the classifier.
Acc.↑	F1↑	ADE↓	CD (×10-3) ↓ mean / median
(1) w/o classifier hΦ	-	-	47.08	1328.934 / 1073.704
(2) use d in function k	81.56	77.67	10.82	4.984 / 0.994
(3) remove function k	81.93	76.77	10.23	4.753 / 0.890
(4) use g(r1) ⊕ g(r2)	95.06	50.17	9.77	4.740 / 0.825
Full RayDF	86.34	84.23	7.97	3.388 / 0.663
Table 6: Ablation study on the classifier with noises.
Noise level (σ2)	Acc.↑	F1↑	ADE↓	CD (×10-3) ↓ mean / median
1.0	62.51	61.46	17.03	4.032 / 0.935
0.5	66.63	65.78	15.54	3.716 / 0.869
0.1	77.09	74.61	12.64	3.454 / 0.850
0 (RayDF)	86.34	84.23	7.97	3.388 / 0.663
Analysis: Table 5 (1) clearly shows that, without the aid of our dual-ray visibility classifier, the main ray-surface distance field completely collapses and cannot predict reasonable distance values for novel rays in the test set. In Table 5 (2) and (3), with the input of surface point position, the classifier achieves higher accuracy and higher F1-score, thus providing the ray-surface distance network with more accurate visibility information to predict precise distance values. In addition, concatenating two input rays directly disrupts the inherent symmetry of input rays. This is shown in Table 5 (4), where the classifier trained in this way achieves high accuracy but exhibits a low F1-score. This indicates that such a classifier is significantly less robust than the one trained with symmetric input rays. Table 6 demonstrates that a less robust classifier results in the ray-surface distance network predicting inaccurate distances.
In addition to the dual-ray visibility classifier, we also perform various ablation studies on our entire pipeline on the Blender dataset.
Ablation on Multi-view Rays Sampling: We conduct an ablation study with different values of  $M \in \{10,20,40\}$  to determine the optimal number of multi-view rays for training a ray-surface distance network. Table 7 demonstrates that increasing the sampled multi-view rays enhances the accuracy of the ray-surface distance network. Although  $M = 40$  achieves lower ADE and CD values, the substantial GPU memory and extended training time outweigh the limited performance improvement. Therefore, we opt to sample multi-view rays with  $M = 20$  to train our ray-surface distance network in all main e
Table 7: Ablation study on the number of multi-view rays sampling.
M	ADE↓	CD (×10-3) ↓ mean / median
10	10.12	4.469 / 0.713
20 (RayDF)	7.97	3.388 / 0.663
40	7.72	2.711 / 0.621
Ablation on Sparse Depth Supervision: With the advancement of existing techniques of depth estimation from RGB images, it is quite feasible to obtain sparse depth signals using existing techniques such as SfM or learning-based monocular depth estimators. In this regard, we additionally provide experimental results using sparse depth supervision. In Table 8, our method maintains satisfactory performance, even with only  $1\%$  depth values during training. We hypothesize that such robustness comes from our multi-view consistency constraint, because many depth
values in the training set may be redundant thanks to our effective classifier.
Table 8: Ablation study on sparse depth supervision.
Depth Sparsity	ADE↓	CD (×10-3) ↓ mean / median
1%	8.54	3.301 / 0.937
5%	8.70	3.250 / 0.920
10%	8.68	3.313 / 0.924
100% (RayDF)	7.97	3.388 / 0.663
Ablation of One-stage RayDF: In the paper, we adopt a two-stage training strategy for our dual-ray visibility classifier and ray-surface distance network. For a comparison, we simply train both networks simultaneously. However, not surprisingly, the performance of one-stage training drops noticeably as shown in Table 9. This drop in performance is primarily because the classifier is inaccurate at the early stage and unlikely to provide effective constraints for
the ray-surface distance network, given the similar number of training steps. Nevertheless, exploring one-stage training remains an intriguing direction for our future research efforts.
Table 9: Ablation study on one/two-stage training.
ADE↓	CD (×10-3) ↓ mean / median
one-stage	12.41	4.032 / 0.659
two-stage (RayDF)	7.97	3.388 / 0.663
For a more comprehensive analysis, we provide extensive ablation studies and additional qualitative as well as detailed quantitative results of each scene in the Blender dataset in Appendix A.4.
In this paper, we have shown that it is truly possible to efficiently and accurately learn 3D shape representations by using a multi-view consistent ray-based framework. In contrast to the existing coordinate-based methods, we instead use a simple ray-surface distance field to represent 3D shape geometries, which is further driven by a novel dual-ray visibility classifier to be multi-view shape consistent. Extensive experiments on multiple datasets demonstrate the extremely high rendering efficiency and outstanding performance of our approach. It would be interesting to extend our framework with more advanced techniques such as faster implementation and additional regularizations.
Distance Map
Radiance Map
Blender - Lego
N
5
DM-SR - Dinning
ScanNet-Scene0010 00
Figure 5: Qualitative results of all methods on the three datasets. More qualitative results can be found in Appendix A.7 and our project page: https://vlar-group.github.io/RayDF.html
Acknowledgement: This work was supported in part by Research Grants Council of Hong Kong under Grants 15225522 & 25207822 & 15606321, in part by National Natural Science Foundation of China under Grant 62271431, and in part by The Hong Kong Polytechnic University under Grant P0031501.
[73] B. Wang, L. Chen, and B. Yang. DM-NeRF: 3D Scene Geometry Decomposition and Manipulation from 2D Images. *ICLR*, 2023.
[74] B. Wang, Z. Yu, B. Yang, J. Qin, T. Breckon, L. Shao, N. Trigoni, and A. Markham. RangeUDF: Semantic Surface Reconstruction from 3D Point Clouds. arXiv:2204.09138, 2022.
[75] H. Wang, J. Ren, Z. Huang, K. Olszewski, M. Chai, Y. Fu, and S. Tulyakov. R2L: Distilling Neural Radiance Field to Neural Light Field for Efficient Novel View Synthesis. ECCV, 2022.
[76] N. Wang, Y. Zhang, Z. Li, Y. Fu, W. Liu, and Y.-G. Jiang. Pixel2Mesh: Generating 3D Mesh Models from Single RGB Images. ECCV, 2018.
[77] P. Wang, L. Liu, Y. Liu, C. Theobalt, T. Komura, and W. Wang. Neus: Learning neural implicit surfaces by volume rendering for multi-view reconstruction. NeurIPS, 2021.
[78] P. Wang, Y. Liu, G. Lin, J. Gu, L. Liu, T. Komura, and W. Wang. Progressively-connected Light Field Network for Efficient View Synthesis. arXiv:2207.04465, 2022.
[79] Q. Xu, W. Wang, D. Ceylan, R. Mech, and U. Neumann. DISN: Deep Implicit Surface Network for High-quality Single-view 3D Reconstruction. NeurIPS, 2019.
[80] B. Yang, S. Rosa, A. Markham, N. Trigoni, and H. Wen. Dense 3D Object Reconstruction from a Single Depth View. TPAMI, 2019.
[81] B. Yang, S. Wang, A. Markham, and N. Trigoni. Robust Attentional Aggregation of Deep Feature Sets for Multi-view 3D Reconstruction. IJCV, 128:53-73, 2020.
[82] A. Yu, S. Fridovich-keil, and A. Kanazawa. Plenoxels: Radiance Fields without Neural Networks. CVPR, 2022.
[83] S. Zakharov, W. Kehl, A. Bhargava, and A. Gaidon. Autolabeling 3D Objects with Differentiable Rendering of SDF Shape Priors. CVPR, 2020.
[84] A. Zeng, S. Song, M. Niessner, M. Fisher, J. Xiao, and T. Funkhouser. 3DMatch: Learning Local Geometric Descriptors From RGB-D Reconstructions. CVPR, 2017.
[85] C. Zhang, Z. Cui, Y. Zhang, B. Zeng, M. Pollefeys, and S. Liu. Holistic 3D Scene Understanding from a Single Image with Implicit Representation. CVPR, 2021.
[86] S. Zhi, T. Laidlow, S. Leutenegger, and A. J. Davison. In-Place Scene Labelling and Understanding with Implicit Scene Representation. ICCV, 2021.
[87] C. Zou, E. Yumer, J. Yang, D. Ceylan, and D. Hoiem. 3D-PRNN: Generating Shape Primitives with Recurrent Neural Networks. ICCV, 2017.
A.1 Network Architecture and Training Details
We provide the details of our ray-surface distance field and the auxiliary dual-ray visibility classifier.
A.1.1 Ray-surface Distance Field
We use a 13-layer SIREN [63] with 1024 hidden units to learn a ray-surface distance field. We set the batch size as 8192 and train the network for 10 epochs with the Adam [35] optimizer and a cosine annealing strategy [44] with the learning rate initialized as  $10^{-5}$  and decayed to  $10^{-8}$ .
Radiance Branch: To learn a radiance field, we take an additional 2-layer SIREN with 1024 hidden units as the radiance branch and output RGB values with sigmoid activation. For optimization together with the distance field, we adopt the same multi-view consistency as the distance field with a mean-squared loss and set the loss weight to 1.
A.1.2 Dual-ray Visibility Classifier
We take a SIREN layer as the ray-feature encoder  $g()$  and another SIREN layer as the point-feature encoder  $k()$ , followed by a 7-layer SIREN with 512 hidden units and output the visibility with sigmoid activation. Both the ray-feature encoder and the point-feature encoder are with 512 hidden units. The batch sizes are 2048 for Blender dataset and ScanNet dataset, and 1024 for DM-SR dataset. We train the network for 5 epochs with the Adam optimizer and a cycle annealing strategy [66] with the maximum learning rate  $10^{-4}$ .
A.1.3 Training Data Generation
- For a scan with extrinsic parameters  $[\mathrm{R}|\mathrm{t}]$  and intrinsic parameters K, all rays of this scan start from the camera position  $\pmb{o} = (t_x,t_y,t_z)$ . The ray orientation of pixel  $(u,v)$  can be denoted as  $\pmb{m}_0 = \mathrm{RK}^{-1}\binom{u}{\nu}$ , and the unit ray direction is  $\pmb{m} = \pmb{m}_0 / \| \pmb{m}_0 \|$ . Given an oriented ray  $\pmb{r}$  starting from  $\pmb{o}$  and a pre-defined sphere with a diameter  $D$ , we follow the two-sphere parameterization [8] to compute two intersections  $\pmb{p}^{in}, \pmb{p}^{out}$  and construct our input parameters  $\pmb{r} = (\theta^{in}, \phi^{in}, \theta^{out}, \phi^{out})$ .
- To obtain the ray-surface distance  $d$  from the raw depth value  $\dot{d}$  of pixel  $(u, v)$ , we have  $d = \dot{d} \sqrt{(u - c_y)^2 + (v - c_x)^2 + f^2} / f - d_0$ , where  $f, c_y, c_x$  are the camera intrinsic parameters (i.e., focal length, the center coordinates at y-axis and x-axis of image plane), and  $d_0 = \| p^{in} - o\|$ .
- For a ray  $\mathbf{r}$  at the pixel (u, v) of a specific scan, we have the first ray-sphere intersection  $\mathbf{p}^{in}$  and ray direction  $\mathbf{m}$ , then we can compute the ray-surface point  $\mathbf{p} = \mathbf{p}^{in} + dm$ . To reproject this point to the remaining  $(K - 1)$  scans, for example, we calculate the pixel coordinate  $(u^k, v^k)$  of the  $k^{th}$  scan using its extrinsic parameters  $[\mathbb{R}|t]^k$  and intrinsic parameters  $\mathbf{K}^k$ :
$$
\left(u ^ {k}, v ^ {k}, 1\right) = \mathrm {K} ^ {k} \left(\left[ \mathrm {R} | \mathrm {t} \right] ^ {k}\right) ^ {- 1} \boldsymbol {p} / z _ {\boldsymbol {p}} \tag {5}
$$
Then we can query the raw depth value at  $(u^k, \nu^k)$  from the  $k^{th}$  scan, and obtain its ray-surface distance  $d_{u^k, \nu^k}^k$  and the ray parameters  $\boldsymbol{r}_{u^k, \nu^k}^k$  (simplified as  $d^k, \boldsymbol{r}^k$ ) following the previous steps. Besides, we calculate the multi-view distance  $\tilde{d}^k$  between the ray-surface point  $\pmb{p}$  and the first intersection  $p_k^{in}$  of ray  $\boldsymbol{r}^k$ :  $\tilde{d}^k = \| \boldsymbol{p} - \boldsymbol{p}_k^{in} \|$ . We set a closeness threshold  $\varepsilon = 10$  millimeters to determine whether the projected  $k^{th}$  ray is visible:
$$
v ^ {k} = \left\{ \begin{array}{l l} 1, & \text {i f} | \tilde {d} ^ {k} - d ^ {k} | \leq \varepsilon \\ 0, & \text {o t h e r w i s e} \end{array} \right. \tag {6}
$$
- For both training and inference, the values of input parameters are normalized to be  $[-1, 1]$ . In particular, the latitude  $\theta := 2\theta / \pi - 1$  and the longitude  $\phi := \phi / \pi$ . The input surface hitting point  $(x_1, y_1, z_1)$  of our visibility classifier is also normalized to  $[-1, 1]$  by subtracting the sphere center and then dividing by the sphere radius  $D / 2$ . The ground-truth ray-surface distance  $d$  and the multi-view distance  $\tilde{d}^k$  are scaled to be  $[0, 1]$  by dividing by the sphere diameter  $D$ .
A.2 Derivation of Surface Normal
In this section, we derive the formula of surface normal from our ray-surface distance field.
As mentioned in Section A.1.3, given a ray starting from  $\pmb{o}$  with direction  $\pmb{m}$  and a fix-sized sphere with a diameter  $D$  centered at the coordinate origin, we can construct the input parameters  $\pmb{r} = (\theta^{in},\phi^{in},\theta^{out},\phi^{out})$  from a ray-sphere intersect function  $F(\pmb{o},\pmb{m},D) = \pmb{r}$ .
By converting  $\mathbf{m}$  to the spherical coordinate system, we have  $\frac{\partial \mathbf{r}}{\partial \theta_{\mathbf{m}}}$  and  $\frac{\partial \mathbf{r}}{\partial \phi_{\mathbf{m}}}$ , which is the gradient of the above intersection function  $F(\cdot)$  w.r.t. the ray direction  $\mathbf{m}$ .
As shown in Figure 6, to compute the surface normal of a predicted surface point  $\hat{\pmb{p}}$  along the ray direction  $\pmb{m}$ , we define a sphere of radius  $R = D\hat{d} + d_0$  centered at the camera position  $\pmb{o}$  using spherical coordinates:
$$
\Phi \left(\theta_ {m}, \phi_ {m}\right) = \left(R \sin \theta_ {m} \cos \phi_ {m}, R \sin \theta_ {m} \sin \phi_ {m}, R \cos \theta_ {m}\right) \tag {7}
$$
In general, the formula for a unit normal vector is  $\pmb{n} = \frac{\frac{\partial\Phi}{\partial\phi_m}\times\frac{\partial\Phi}{\partial\theta_m}}{\|\frac{\partial\Phi}{\partial\phi_m}\times\frac{\partial\Phi}{\partial\theta_m}\|}$ . From Eq. 7, we have
$$
\frac {\partial \Phi}{\partial \phi_ {m}} = D \left[ \begin{array}{c} \left(\frac {\partial \hat {d}}{\partial \phi_ {m}} \cos \phi_ {m} - \left(\hat {d} + \frac {d _ {0}}{D}\right) \sin \phi_ {m}\right) \sin \theta_ {m} \\ \left(\frac {\partial \hat {d}}{\partial \phi_ {m}} \sin \phi_ {m} + \left(\hat {d} + \frac {d _ {0}}{D}\right) \cos \phi_ {m}\right) \sin \theta_ {m} \\ \frac {\partial \hat {d}}{\partial \phi_ {m}} \cos \theta_ {m} \end{array} \right] \tag {8}
$$