Created
August 29, 2019 07:42
-
-
Save quat1024/267d5fc02efddc49e1d61ebcee71ddcf to your computer and use it in GitHub Desktop.
minecraft 1.14.4 OctavePerlinNoiseSampler range test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
octaves | min | max | |
---|---|---|---|
1 | -0.9969206357348224 | 0.9548434333558826 | |
2 | -2.467316652344656 | 2.328985326760562 | |
3 | -4.87585625756149 | 5.042024033453523 | |
4 | -10.471273767083549 | 9.815261877437226 | |
5 | -19.49006180243939 | 20.237465228549873 | |
6 | -38.99800348214662 | 39.152905589627906 | |
7 | -77.5585684240792 | 85.56938743688391 | |
8 | -176.25487846647394 | 162.466075461866 | |
9 | -335.0233240038607 | 319.2838169712373 | |
10 | -612.859256447059 | 629.6142105714777 | |
11 | -1273.5553111773283 | 1313.296393508114 | |
12 | -2490.9337413888748 | 2449.4799104238764 | |
13 | -5137.78132878946 | 5683.534304531775 | |
14 | -10081.324402305305 | 11171.819039858867 | |
15 | -21582.849156391734 | 21218.389401572887 | |
16 | -40303.417090887015 | 40704.517287882176 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
System.out.println("octaves,min,max"); | |
for(int octaves = 1; octaves <= 16; octaves++) { | |
double min = 0, max = 0; | |
Random r = new Random(1338); | |
for(int i = 0; i < 100; i++) { | |
OctavePerlinNoiseSampler octavio = new OctavePerlinNoiseSampler(new Random(i), octaves); | |
for(int reps = 1; reps <= 10000; reps++) { | |
double value = octavio.sample(r.nextDouble() * 100000, r.nextDouble() * 100000, r.nextDouble() * 100000); | |
if(min > value) min = value; | |
if(max < value) max = value; | |
} | |
} | |
System.out.println(String.format("%s,%s,%s", octaves, min, max)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment