Download presentation
Presentation is loading. Please wait.
1
Building Fractal Landscapes
Henry Kwan
2
Diamond-square algorithm
Generate random terrain with iterations of: Diamond Step Set square(s) center value(s) = Average of four corner values + random value Square Step Set diamond(s) center value(s) = Average of corner values + random value Initial Terrain 1st Pass Diamond Step 1st Pass Square Step 2nd Pass Diamond Step 2nd Pass Square Step
3
33x33 Landscape To generate a 33x33 landscape, run:
>> landscape_fractal(5)
4
129x129 Landscape To generate a 129x129 landscape, run:
>> landscape_fractal(7)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.