Diamond square algorithm

后端 未结 4 1568
栀梦
栀梦 2020-12-04 12:44

I\'m trying to write the Diamond-Square algorithm in Java to generate a random map but can\'t figure out the implementation...

Anyone with some Java code (or other l

4条回答
  •  爱一瞬间的悲伤
    2020-12-04 13:13

    Check out this demo done with Processing:

    http://www.intelegance.net/code/diamondsquare.shtml

    Also, here's another page with a rough algo written out:

    http://www.javaworld.com/javaworld/jw-08-1998/jw-08-step.html?page=2

    Finally, a slightly more formal paper:

    http://www.student.math.uwaterloo.ca/~pmat370/PROJECTS/2006/Keith_Stanger_Fractal_Landscapes.pdf

    Enjoy!

提交回复
热议问题