开源分形图

发布于 2024-07-06 15:33:58 字数 1560 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

几味少女 2024-07-13 15:33:58

Fracplanet 可能有用。

Fracplanet may be of use.

一江春梦 2024-07-13 15:33:58

基本地形生成涉及创建高度图(图像)并使用像素颜色作为高度进行渲染。 因此,您可能会发现图像或纹理生成代码很有用。 这是一个很好的教程

Basic terrain generation involves creating a height map (an image) and rendering it using the pixel colour as height. So you may find image or texture generation code useful. This is a good tutorial.

智商已欠费 2024-07-13 15:33:58

对于地形方面,请查看 libnoise
它是针对 Debian 打包的,并且有优秀的文档,其中有一章介绍 地形生成,带有示例 C++ 代码。

当然,“地图”不仅仅是在高度字段上涂抹一些颜色(例如 Fracplanet 添加了河流和湖泊)。 从这些方法中获得的地形实际上并不那么现实; 大陆通常不会从海岸上升到岩石腹地,因此模拟大陆漂移、造山和侵蚀过程可能会有所帮助(或者,伪造它)。 然后,如果您想要植被或生命形式的人工制品(例如道路和城镇)来填充您的地图,您可能需要查看元胞自动机或其他“人工生命”工具。 最后,虚拟地形项目非常值得浏览以获取更多链接和想法。

For the terrain aspect take a look at libnoise.
It's packaged for Debian, and has excellent documentation with a chapter on terrain generation with example C++ code.

Of course there's a lot more to "maps" than slapping some colours on a height field (for example Fracplanet adds rivers and lakes). And the sort of terrain you get from these methods isn't actually that realistic; continents don't generally ramp up from the coast into a rocky hinterland, so maybe simulating continental drift and mountain building and erosion processes would help (alternatively, fake it). And then if you want vegetation, or the artefacts of lifeforms (roads and towns, say) to populate your map you might want to look at cellular automata or other "artificial life" tools. Finally, the Virtual Terrain Project is well worth a browse for more links and ideas.

嗫嚅 2024-07-13 15:33:58

的副本

我强烈建议购买纹理和纹理 建模:程序方法

我看到它现在是第三版(我只有第二版),但它充满了关于程序纹理使用的有用文章,包括关于它们在分形地形中使用的几章。 它也从对噪声算法的广泛讨论开始——所以你已经掌握了从基础知识开始的所有内容。 作者包括 Musgrave、Perlin 和 Worley,所以你真的不能做得更好了。

I'd highly recommend purchasing a copy of

Texturing & Modeling: A Procedural Approach

I see it's now in it's third edition (I only have the second) but it's packed full of useful articles about the use of procedural texturing including several chapters on their use in fractal terrains. It starts out with extensive discussion of noise algorithms too - so you have everything from the basics upwards. The authors include Musgrave, Perlin and Worley, so you really can't do better.

春夜浅 2024-07-13 15:33:58

如果您想要真正真实的地理,您可以使用 NASA 的 SRTM 数据集,也许与 OpenStreetMap 功能。 :-)

If you want truely realistic geography, you could use NASA's SRTM dataset, perhaps combined with OpenStreetMap features. :-)

三寸金莲 2024-07-13 15:33:58

一个非常简单的实现是使用中点位移分形,http://en.wikipedia.org /wiki/Diamond-square_algorithm,或者稍微复杂一些的 Diamond-Squares 算法。
http://www.gameprogrammer.com/fractal.html#diamond

这些是相似的Photoshop 中的“差异云”算法。

A very simple implementation would be to use the midpoint displacement fractal, http://en.wikipedia.org/wiki/Diamond-square_algorithm, or the somewhat more complicated Diamond-Squares algorithm.
http://www.gameprogrammer.com/fractal.html#diamond

These are similar algorithms to the "Difference cloud" in Photoshop.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文