在OpenGL中使用Sierpinski垫圈的分形山脉 [英] Fractal mountains using Sierpinski gasket in OpenGL

查看:162
本文介绍了在OpenGL中使用Sierpinski垫圈的分形山脉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读Edward Angel撰写的有关OpenGL的书"Interactive Computer Graphics".在其中,他要求您修改Sierpinski垫片算法以产生分形山脉.为此,它说找到每一侧的中点,然后在细分之前扰动该位置.他根本没有解释如何扰动"该位置,并且在网上寻找都没有结果.

I'm reading a book on OpenGL, "Interactive Computer Graphics" by Edward Angel. In it, he asks you to modify a Sierpinski gasket algorithm to yield fractal mountains. To do so, it says to find the midpoint of each side, then perturb this location before subdivision. He doesn't explain at all how to "perturb" the location, and looking online yielded no results.

任何人都可以解释这是什么意思吗?

Can anyone explain what this means?

谢谢!

推荐答案

这里有个想法:通过沿垂直于侧面的方向移动中点来扰动"中点,并形成一个小的帽子形部分.

Here's a thought: "perturb" the midpoint by displacing it in the direction perpendicular to the side and form a small hat-shaped segment.

从这里开始:

______

对此:

__/\__

这篇关于在OpenGL中使用Sierpinski垫圈的分形山脉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆