# splatting **Repository Path**: wangjq4214/splatting ## Basic Information - **Project Name**: splatting - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-28 - **Last Updated**: 2021-12-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # splatting ## 主要代码 ```cpp void Splatting::foot_print(int diameter) { float m; int radius = (diameter - 1) / 2; float x, y, z; for (int i = 0; i < diameter; i++) { for (int j = 0; j < diameter; j++) { for (int k = 0; k < diameter; k++) { x = (float) (i - radius) / radius; y = (float) (j - radius) / radius; z = (float) (k - radius) / radius; if (x * x + y * y + z * z <= 1) { m = 1 - std::sqrt(x * x + y * y + z * z); table[i][j] += (float) m * 1 / radius; } } } } } ``` 是反复对体素的投影叠加效果进行运算。它用一个称为足迹的函数计算每一体素投影的影响范围,用高斯函数定义点或者小区域像素的强度分布,从而计算出其对图像的总体贡献,并加以合成,形成最后的图像。由于这个方法模仿了雪球被抛到墙壁上所留下的一个扩散状痕迹的现象,因而取名为“抛雪球法”。 ## 实验结果