doc/texture_generation.txt
author Tero Marttila <terom@fixme.fi>
Sun, 02 Jun 2013 16:15:23 +0300
changeset 448 34bdf0783874
parent 343 6675e370b377
permissions -rw-r--r--
network: fix size_t compile errors
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