开发者

Fractal mountains using Sierpinski gasket in OpenGL

开发者 https://www.devze.com 2023-01-13 01:52 出处:网络
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 m

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 a开发者_如何学编程t all how to "perturb" the location, and looking online yielded no results.

Can anyone explain what this means?

Thanks!


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:

__/\__


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

0

精彩评论

暂无评论...
验证码 换一张
取 消