Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 854 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 854 Bytes

DiamondSquare

Diamond Square Terrain Generation Algorithm

Landscape generation with the Diamond-Square Algorithm

Algorithm learnt from http://www.playfuljs.com/realistic-terrain-in-130-lines/

Code is completely my own, apart from external libraries. Feel free to reuse (with attribution)

Requirements:

  • Python 2.7
  • Pygame
  • Numpy
  • Matplotlib (I plan to make these optional at some stage)

Only tested on Windows.

For future improvement ideas, see the issues list

Example output:

Pygame 2d output Matplotlib 3d output graph3d output (linked)

View output in browser: http://almende.github.io/chap-links-library/js/graph3d/playground/

Change color of 3d surface graph http://matplotlib.org/examples/color/colormaps_reference.html