SFTtech/openage — pull request #179 by zuntrax (2014-12-17 13:08:40+00:00)
Title: Perlin noise generator prototype

Should be useful for #65.
This is not yet finished, but in a usable state. Some docstrings are missing and I still need to figure out a good solution for the different interpolation modes. (Maybe just offer polynomial?)

Also there are hard edges at the grid cell borders (much more noticeable with linear interpolation). I'm not sure if I messed up something here, but they might as well be due to to algorithm itself.
Anyway we will probably use the polynomial interpolation, so it shouldn't be an issue.

Please discuss.

Seed: "sftworld1", 500x500px, 10x10 grid cells, polynomial interpolation:
![perlin_sftworld1](https://cloud.githubusercontent.com/assets/6196356/5471009/6d0d9fe8-85f0-11e4-922e-bdba7486cce1.png)

Same with linear interpolation:
![noise](https://cloud.githubusercontent.com/assets/6196356/5471187/d4276018-85f2-11e4-82b0-5c94c26ee262.png)

Red: "sftworld0", green: "sftworld1", blue: "sftworld2", polynomial interpolation, dims as above:
![multicolor](https://cloud.githubusercontent.com/assets/6196356/5471422/ba4ec386-85f5-11e4-9408-b4e1632d1668.png)