fixed H value of generate_texture
authornireco
Sun, 07 Dec 2008 14:13:22 +0000
changeset 244 80a818ac288b
parent 243 25d9a0090397
child 245 1196885a4813
fixed H value of generate_texture
src/Terrain.cc
--- a/src/Terrain.cc	Sun Dec 07 13:07:58 2008 +0000
+++ b/src/Terrain.cc	Sun Dec 07 14:13:22 2008 +0000
@@ -51,13 +51,15 @@
     }
 }
 
-
+/**
+ * Algorithm read from http://www.gameprogrammer.com/fractal.html
+ */
 void Terrain::generate_texture() {
     int texturesize = 128;
     texture = std::vector<std::vector<int> >(texturesize, std::vector<int>(texturesize));
     std::vector<double> land(texture.size()*texture.size());
     double str = 0.8;
-    double H = 0.5;
+    double H = 0.8;
     for(int i = 512; i >= 1; i /= 2) {
         fractal_diamond(land, texturesize, str, i);
         fractal_step(land, texturesize, str, i);