Fractal mountains using Sierpinski gasket in OpenGL

吃可爱长大的小学妹 提交于 2019-12-02 19:24:30

问题


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?

Thanks!


回答1:


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

Go from this:

______

to this:

__/\__



回答2:


By "perturb" he likely means adding a bit of noise to the new midpoint.



来源:https://stackoverflow.com/questions/3539703/fractal-mountains-using-sierpinski-gasket-in-opengl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!