摘要
分形地形的生成是三维自然景物的模拟的重要组成之一。研究了基于灰度值算法与分形插值算法的三维分形地形的生成。利用灰度值算法或Diamond-Square算法生成高度数据,同时作平滑处理,然后对高度数据着色并利用OpenGL纹理映射技术实现三维分形地形的生成并显示。这种方法可按照地形需求改变地形崎岖程度和地貌,在实验上基本上达到了真实感的效果。
The generation of fractal terrain is one of important components in the simulation of three-dimensional natural scenery.The paper has researched the generation of fractal terrain based on gray algorithm and fractal interpolation algorithm.For realizing the generation and display of three-dimensional fractal terrain,firstly,we generated the altitude data by using the Diamond-Square algorithm or Gray algorithm,and then made it smoothing,finally colored the altitude data and used the OpenGL texture mapping technology.This way can change terrain ruggedness level and landform according to terrain requirements,and achieved the effect of realistic basically in the experiments.
出处
《电脑开发与应用》
2010年第9期33-35,38,共4页
Computer Development & Applications