地下管线的三维建模与可视化是构建"数字城市"的重要内容,总结现有地下管线实时建模算法的不足,提出一种利用GPU编程实现的地下管线实时三维可视化建模算法。利用现代GPU的可编程特性将管线建模的计算任务全部移植到GPU端完成,CPU端只需传入管径和管线节点坐标,利用GPU提供的几何着色器完成管线模型的顶点坐标计算、管线顶点数据自动生成及管线三角网构建等工作,并通过光照和纹理映射实现管线材质的真实感效果。实验结果表明,该算法克服了现有建模算法的缺陷,能够在保证管线拟合逼真度的基础上完成大规模管网系统三维实时可视化建模的任务。
3D modeling and visualization of underground pipelines are important contents to build a"digital city".In summing up the disadvantages of existing modeling algorithms,a new method is proposed based on GPU.This paper transplants all modeling computation from CPU to GPU by using GPU programming.Geometry Shader undertakes most of the computation such as coordinates calculation,generation of vertices data and constructing the triangular nets.It uses lighting and texture mapping to make the realistic effection of pipeline.Experimental results show that with shortcomings of existing algorithms to be overcome,the algorithm is suitable for large-scale pipeline modeling on the basis of good realistic effects.