doc/texture_generation.txt
author morasa@smirgeline.hut.fi
Fri, 11 Sep 2009 16:45:04 +0300
branchnew-physics
changeset 447 fc9e4305fddf
parent 343 6675e370b377
permissions -rw-r--r--
create new physics branch
343
6675e370b377 first version of tgad
nireco
parents:
diff changeset
     1
In texture generation is used random fractal terrain generation algorithm 
6675e370b377 first version of tgad
nireco
parents:
diff changeset
     2
[http://www.gameprogrammer.com/fractal.html].
6675e370b377 first version of tgad
nireco
parents:
diff changeset
     3
6675e370b377 first version of tgad
nireco
parents:
diff changeset
     4
In 1 dimension algorithm starts with one straight line. Then it affects to that 
6675e370b377 first version of tgad
nireco
parents:
diff changeset
     5
line's midpoint with some random multiplied with H-value. After those first steps 
6675e370b377 first version of tgad
nireco
parents:
diff changeset
     6
it simply calls itself to both parts of line changing H-value smaller.
6675e370b377 first version of tgad
nireco
parents:
diff changeset
     7
6675e370b377 first version of tgad
nireco
parents:
diff changeset
     8
Two dimensional version (programmed to the code) needs step for point's between 
6675e370b377 first version of tgad
nireco
parents:
diff changeset
     9
last density and step diagonal to last density's points, otherwise quite similar 
6675e370b377 first version of tgad
nireco
parents:
diff changeset
    10
to 1 dimensional version.
6675e370b377 first version of tgad
nireco
parents:
diff changeset
    11
6675e370b377 first version of tgad
nireco
parents:
diff changeset
    12
Version of algorithm in our code is decided to be coded as iterative.
6675e370b377 first version of tgad
nireco
parents:
diff changeset
    13
6675e370b377 first version of tgad
nireco
parents:
diff changeset
    14
6675e370b377 first version of tgad
nireco
parents:
diff changeset
    15
6675e370b377 first version of tgad
nireco
parents:
diff changeset
    16