propane 3.9.0-java → 3.10.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +2 -2
  4. data/README.md +3 -3
  5. data/Rakefile +6 -6
  6. data/lib/java/japplemenubar/JAppleMenuBar.java +88 -0
  7. data/lib/java/japplemenubar/libjAppleMenuBar.jnilib +0 -0
  8. data/lib/java/monkstone/ColorUtil.java +127 -0
  9. data/lib/java/monkstone/MathToolModule.java +287 -0
  10. data/lib/java/monkstone/PropaneLibrary.java +46 -0
  11. data/lib/java/monkstone/core/LibraryProxy.java +136 -0
  12. data/lib/java/monkstone/fastmath/DegLutTables.java +111 -0
  13. data/lib/java/monkstone/fastmath/Deglut.java +71 -0
  14. data/lib/java/monkstone/fastmath/package-info.java +6 -0
  15. data/lib/java/monkstone/filechooser/Chooser.java +39 -0
  16. data/{src/main → lib}/java/monkstone/noise/FastTerrain.java +0 -0
  17. data/{src/main → lib}/java/monkstone/noise/Noise.java +0 -0
  18. data/{src/main → lib}/java/monkstone/noise/NoiseGenerator.java +0 -0
  19. data/{src/main → lib}/java/monkstone/noise/NoiseMode.java +0 -0
  20. data/lib/java/monkstone/noise/OpenSimplex2F.java +881 -0
  21. data/lib/java/monkstone/noise/OpenSimplex2S.java +1106 -0
  22. data/{src/main → lib}/java/monkstone/noise/SmoothTerrain.java +0 -0
  23. data/lib/java/monkstone/slider/CustomHorizontalSlider.java +164 -0
  24. data/lib/java/monkstone/slider/CustomVerticalSlider.java +178 -0
  25. data/lib/java/monkstone/slider/SimpleHorizontalSlider.java +145 -0
  26. data/lib/java/monkstone/slider/SimpleSlider.java +166 -0
  27. data/lib/java/monkstone/slider/SimpleVerticalSlider.java +157 -0
  28. data/lib/java/monkstone/slider/Slider.java +61 -0
  29. data/lib/java/monkstone/slider/SliderBar.java +245 -0
  30. data/lib/java/monkstone/slider/SliderGroup.java +56 -0
  31. data/lib/java/monkstone/slider/WheelHandler.java +35 -0
  32. data/lib/java/monkstone/vecmath/GfxRender.java +86 -0
  33. data/lib/java/monkstone/vecmath/JRender.java +56 -0
  34. data/lib/java/monkstone/vecmath/ShapeRender.java +87 -0
  35. data/lib/java/monkstone/vecmath/package-info.java +20 -0
  36. data/lib/java/monkstone/vecmath/vec2/Vec2.java +802 -0
  37. data/lib/java/monkstone/vecmath/vec2/package-info.java +6 -0
  38. data/lib/java/monkstone/vecmath/vec3/Vec3.java +727 -0
  39. data/lib/java/monkstone/vecmath/vec3/package-info.java +6 -0
  40. data/lib/java/monkstone/videoevent/CaptureEvent.java +27 -0
  41. data/lib/java/monkstone/videoevent/MovieEvent.java +32 -0
  42. data/lib/java/monkstone/videoevent/package-info.java +20 -0
  43. data/lib/java/processing/awt/PGraphicsJava2D.java +3040 -0
  44. data/lib/java/processing/awt/PImageAWT.java +377 -0
  45. data/lib/java/processing/awt/PShapeJava2D.java +387 -0
  46. data/lib/java/processing/awt/PSurfaceAWT.java +1581 -0
  47. data/lib/java/processing/awt/ShimAWT.java +581 -0
  48. data/lib/java/processing/core/PApplet.java +15156 -0
  49. data/lib/java/processing/core/PConstants.java +523 -0
  50. data/lib/java/processing/core/PFont.java +1126 -0
  51. data/lib/java/processing/core/PGraphics.java +8600 -0
  52. data/lib/java/processing/core/PImage.java +3377 -0
  53. data/lib/java/processing/core/PMatrix.java +208 -0
  54. data/lib/java/processing/core/PMatrix2D.java +562 -0
  55. data/lib/java/processing/core/PMatrix3D.java +890 -0
  56. data/lib/java/processing/core/PShape.java +3561 -0
  57. data/lib/java/processing/core/PShapeOBJ.java +483 -0
  58. data/lib/java/processing/core/PShapeSVG.java +2016 -0
  59. data/lib/java/processing/core/PStyle.java +63 -0
  60. data/lib/java/processing/core/PSurface.java +198 -0
  61. data/lib/java/processing/core/PSurfaceNone.java +431 -0
  62. data/lib/java/processing/core/PVector.java +1066 -0
  63. data/lib/java/processing/core/ThinkDifferent.java +115 -0
  64. data/lib/java/processing/data/DoubleDict.java +850 -0
  65. data/lib/java/processing/data/DoubleList.java +928 -0
  66. data/lib/java/processing/data/FloatDict.java +847 -0
  67. data/lib/java/processing/data/FloatList.java +936 -0
  68. data/lib/java/processing/data/IntDict.java +807 -0
  69. data/lib/java/processing/data/IntList.java +936 -0
  70. data/lib/java/processing/data/JSONArray.java +1260 -0
  71. data/lib/java/processing/data/JSONObject.java +2282 -0
  72. data/lib/java/processing/data/JSONTokener.java +435 -0
  73. data/lib/java/processing/data/LongDict.java +802 -0
  74. data/lib/java/processing/data/LongList.java +937 -0
  75. data/lib/java/processing/data/Sort.java +46 -0
  76. data/lib/java/processing/data/StringDict.java +613 -0
  77. data/lib/java/processing/data/StringList.java +800 -0
  78. data/lib/java/processing/data/Table.java +4936 -0
  79. data/lib/java/processing/data/TableRow.java +198 -0
  80. data/lib/java/processing/data/XML.java +1156 -0
  81. data/lib/java/processing/dxf/RawDXF.java +404 -0
  82. data/lib/java/processing/event/Event.java +125 -0
  83. data/lib/java/processing/event/KeyEvent.java +70 -0
  84. data/lib/java/processing/event/MouseEvent.java +114 -0
  85. data/lib/java/processing/event/TouchEvent.java +57 -0
  86. data/lib/java/processing/javafx/PGraphicsFX2D.java +32 -0
  87. data/lib/java/processing/javafx/PSurfaceFX.java +173 -0
  88. data/lib/java/processing/net/Client.java +744 -0
  89. data/lib/java/processing/net/Server.java +388 -0
  90. data/lib/java/processing/opengl/FontTexture.java +378 -0
  91. data/lib/java/processing/opengl/FrameBuffer.java +513 -0
  92. data/lib/java/processing/opengl/LinePath.java +627 -0
  93. data/lib/java/processing/opengl/LineStroker.java +681 -0
  94. data/lib/java/processing/opengl/PGL.java +3483 -0
  95. data/lib/java/processing/opengl/PGraphics2D.java +615 -0
  96. data/lib/java/processing/opengl/PGraphics3D.java +281 -0
  97. data/lib/java/processing/opengl/PGraphicsOpenGL.java +13753 -0
  98. data/lib/java/processing/opengl/PJOGL.java +2008 -0
  99. data/lib/java/processing/opengl/PShader.java +1484 -0
  100. data/lib/java/processing/opengl/PShapeOpenGL.java +5269 -0
  101. data/lib/java/processing/opengl/PSurfaceJOGL.java +1385 -0
  102. data/lib/java/processing/opengl/Texture.java +1696 -0
  103. data/lib/java/processing/opengl/VertexBuffer.java +88 -0
  104. data/lib/java/processing/opengl/cursors/arrow.png +0 -0
  105. data/lib/java/processing/opengl/cursors/cross.png +0 -0
  106. data/lib/java/processing/opengl/cursors/hand.png +0 -0
  107. data/lib/java/processing/opengl/cursors/license.txt +27 -0
  108. data/lib/java/processing/opengl/cursors/move.png +0 -0
  109. data/lib/java/processing/opengl/cursors/text.png +0 -0
  110. data/lib/java/processing/opengl/cursors/wait.png +0 -0
  111. data/lib/java/processing/opengl/shaders/ColorFrag.glsl +32 -0
  112. data/lib/java/processing/opengl/shaders/ColorVert.glsl +34 -0
  113. data/lib/java/processing/opengl/shaders/LightFrag.glsl +33 -0
  114. data/lib/java/processing/opengl/shaders/LightVert.glsl +151 -0
  115. data/lib/java/processing/opengl/shaders/LineFrag.glsl +32 -0
  116. data/lib/java/processing/opengl/shaders/LineVert.glsl +100 -0
  117. data/lib/java/processing/opengl/shaders/MaskFrag.glsl +40 -0
  118. data/lib/java/processing/opengl/shaders/PointFrag.glsl +32 -0
  119. data/lib/java/processing/opengl/shaders/PointVert.glsl +56 -0
  120. data/lib/java/processing/opengl/shaders/TexFrag.glsl +37 -0
  121. data/lib/java/processing/opengl/shaders/TexLightFrag.glsl +37 -0
  122. data/lib/java/processing/opengl/shaders/TexLightVert.glsl +157 -0
  123. data/lib/java/processing/opengl/shaders/TexVert.glsl +38 -0
  124. data/lib/java/processing/pdf/PGraphicsPDF.java +581 -0
  125. data/lib/java/processing/svg/PGraphicsSVG.java +378 -0
  126. data/lib/propane/app.rb +8 -13
  127. data/lib/propane/version.rb +1 -1
  128. data/mvnw +3 -3
  129. data/mvnw.cmd +2 -2
  130. data/pom.rb +7 -2
  131. data/pom.xml +14 -2
  132. data/propane.gemspec +2 -2
  133. data/src/main/java/monkstone/FastNoiseModuleJava.java +127 -0
  134. data/src/main/java/monkstone/MathToolModule.java +30 -30
  135. data/src/main/java/monkstone/PropaneLibrary.java +2 -0
  136. data/src/main/java/monkstone/SmoothNoiseModuleJava.java +127 -0
  137. data/src/main/java/monkstone/fastmath/DegLutTables.java +15 -15
  138. data/src/main/java/monkstone/filechooser/Chooser.java +1 -1
  139. data/src/main/java/monkstone/noise/OpenSimplex2F.java +752 -820
  140. data/src/main/java/monkstone/noise/OpenSimplex2S.java +1138 -1106
  141. data/src/main/java/monkstone/slider/WheelHandler.java +1 -1
  142. data/src/main/java/monkstone/vecmath/JRender.java +6 -6
  143. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +20 -19
  144. data/src/main/java/monkstone/vecmath/vec3/Vec3.java +12 -12
  145. data/src/main/java/processing/awt/PGraphicsJava2D.java +11 -3
  146. data/src/main/java/processing/core/PApplet.java +89 -89
  147. data/src/main/java/processing/core/PConstants.java +155 -163
  148. data/src/main/java/processing/opengl/PJOGL.java +6 -5
  149. data/vendors/Rakefile +1 -1
  150. metadata +136 -19
@@ -1,1106 +1,1138 @@
1
- package monkstone.noise;
2
-
3
- /**
4
- * K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
5
- *
6
- * - 2D is standard simplex, modified to support larger kernels. Implemented
7
- * using a lookup table. - 3D is "Re-oriented 8-point BCC noise" which
8
- * constructs a congruent BCC lattice in a much different way than usual. - 4D
9
- * uses a naïve pregenerated lookup table, and averages out to the expected
10
- * performance.
11
- *
12
- * Multiple versions of each function are provided. See the documentation above
13
- * each, for more info.
14
- */
15
- public class OpenSimplex2S implements Noise {
16
-
17
- private static final int PSIZE = 2048;
18
- private static final int PMASK = 2047;
19
-
20
- private final short[] perm;
21
- private final Grad2[] permGrad2;
22
- private final Grad3[] permGrad3;
23
- private final Grad4[] permGrad4;
24
-
25
- public OpenSimplex2S(long seed) {
26
- perm = new short[PSIZE];
27
- permGrad2 = new Grad2[PSIZE];
28
- permGrad3 = new Grad3[PSIZE];
29
- permGrad4 = new Grad4[PSIZE];
30
- short[] source = new short[PSIZE];
31
- for (short i = 0; i < PSIZE; i++) {
32
- source[i] = i;
33
- }
34
- for (int i = PSIZE - 1; i >= 0; i--) {
35
- seed = seed * 6364136223846793005L + 1442695040888963407L;
36
- int r = (int) ((seed + 31) % (i + 1));
37
- if (r < 0) {
38
- r += (i + 1);
39
- }
40
- perm[i] = source[r];
41
- permGrad2[i] = GRADIENTS_2D[perm[i]];
42
- permGrad3[i] = GRADIENTS_3D[perm[i]];
43
- permGrad4[i] = GRADIENTS_4D[perm[i]];
44
- source[r] = source[i];
45
- }
46
- }
47
-
48
- /*
49
- * Noise Evaluators
50
- */
51
- /**
52
- * 2D SuperSimplex noise, standard lattice orientation.
53
- *
54
- * @param x
55
- * @param y
56
- * @return
57
- */
58
- public double noise2(double x, double y) {
59
-
60
- // Get points for A2* lattice
61
- double s = 0.366025403784439 * (x + y);
62
- double xs = x + s, ys = y + s;
63
-
64
- return noise2_Base(xs, ys);
65
- }
66
-
67
- /**
68
- * 2D SuperSimplex noise, with Y pointing down the main diagonal.Might be
69
- * better for a 2D sandbox style game, where Y is vertical.Probably slightly
70
- * less optimal for heightmaps or continent maps.
71
- *
72
- * @param x
73
- * @param y
74
- * @return
75
- */
76
- public double noise2_XBeforeY(double x, double y) {
77
-
78
- // Skew transform and rotation baked into one.
79
- double xx = x * 0.7071067811865476;
80
- double yy = y * 1.224744871380249;
81
-
82
- return noise2_Base(yy + xx, yy - xx);
83
- }
84
-
85
- /**
86
- * 2D SuperSimplex noise base. Lookup table implementation inspired by
87
- * DigitalShadow.
88
- */
89
- private double noise2_Base(double xs, double ys) {
90
- double value = 0;
91
-
92
- // Get base points and offsets
93
- int xsb = fastFloor(xs), ysb = fastFloor(ys);
94
- double xsi = xs - xsb, ysi = ys - ysb;
95
-
96
- // Index to point list
97
- int a = (int) (xsi + ysi);
98
- int index
99
- = (a << 2)
100
- | (int) (xsi - ysi / 2 + 1 - a / 2.0) << 3
101
- | (int) (ysi - xsi / 2 + 1 - a / 2.0) << 4;
102
-
103
- double ssi = (xsi + ysi) * -0.211324865405187;
104
- double xi = xsi + ssi, yi = ysi + ssi;
105
-
106
- // Point contributions
107
- for (int i = 0; i < 4; i++) {
108
- LatticePoint2D c = LOOKUP_2D[index + i];
109
-
110
- double dx = xi + c.dx, dy = yi + c.dy;
111
- double attn = 2.0 / 3.0 - dx * dx - dy * dy;
112
- if (attn <= 0) {
113
- continue;
114
- }
115
-
116
- int pxm = (xsb + c.xsv) & PMASK, pym = (ysb + c.ysv) & PMASK;
117
- Grad2 grad = permGrad2[perm[pxm] ^ pym];
118
- double extrapolation = grad.dx * dx + grad.dy * dy;
119
-
120
- attn *= attn;
121
- value += attn * attn * extrapolation;
122
- }
123
-
124
- return value;
125
- }
126
-
127
- /**
128
- * 3D Re-oriented 8-point BCC noise, classic orientation Proper substitute
129
- * for what 3D SuperSimplex would be, in light of Forbidden Formulae.Use
130
- * noise3_XYBeforeZ or noise3_XZBeforeY instead, wherever appropriate.
131
- *
132
- * @param x
133
- * @param y
134
- * @param z
135
- * @return
136
- */
137
- public double noise3_Classic(double x, double y, double z) {
138
-
139
- // Re-orient the cubic lattices via rotation, to produce the expected look on cardinal planar slices.
140
- // If texturing objects that don't tend to have cardinal plane faces, you could even remove this.
141
- // Orthonormal rotation. Not a skew transform.
142
- double r = (2.0 / 3.0) * (x + y + z);
143
- double xr = r - x, yr = r - y, zr = r - z;
144
-
145
- // Evaluate both lattices to form a BCC lattice.
146
- return noise3_BCC(xr, yr, zr);
147
- }
148
-
149
- /**
150
- * 3D Re-oriented 8-point BCC noise, with better visual isotropy in (X,
151
- * Z).Recommended for 3D terrain and time-varied animations.The Y coordinate
152
- * should always be the "different" coordinate in your use case.If Y is
153
- * vertical in world coordinates, call noise3_XZBeforeY(x, Y, z).If Z is
154
- * vertical in world coordinates, call noise3_XZBeforeY(x, Z, y) or use
155
- * noise3_XYBeforeZ. For a time varied animation, call noise3_XZBeforeY(x,
156
- * T, y) or use noise3_XYBeforeZ.
157
- *
158
- * @param x
159
- * @param y
160
- * @param z
161
- * @return
162
- */
163
- public double noise3_XZBeforeY(double x, double y, double z) {
164
-
165
- // Re-orient the cubic lattices without skewing, to make X and Z triangular like 2D.
166
- // Orthonormal rotation. Not a skew transform.
167
- double xz = x + z;
168
- double s2 = xz * -0.211324865405187;
169
- double yy = y * 0.577350269189626;
170
- double xr = x + s2 - yy;
171
- double zr = z + s2 - yy;
172
- double yr = xz * 0.577350269189626 + yy;
173
-
174
- // Evaluate both lattices to form a BCC lattice.
175
- return noise3_BCC(xr, yr, zr);
176
- }
177
-
178
- /**
179
- * Generate overlapping cubic lattices for 3D Re-oriented BCC noise. Lookup
180
- * table implementation inspired by DigitalShadow. It was actually faster to
181
- * narrow down the points in the loop itself, than to build up the index
182
- * with enough info to isolate 8 points.
183
- */
184
- private double noise3_BCC(double xr, double yr, double zr) {
185
-
186
- // Get base and offsets inside cube of first lattice.
187
- int xrb = fastFloor(xr), yrb = fastFloor(yr), zrb = fastFloor(zr);
188
- double xri = xr - xrb, yri = yr - yrb, zri = zr - zrb;
189
-
190
- // Identify which octant of the cube we're in. This determines which cell
191
- // in the other cubic lattice we're in, and also narrows down one point on each.
192
- int xht = (int) (xri + 0.5), yht = (int) (yri + 0.5), zht = (int) (zri + 0.5);
193
- int index = (xht) | (yht << 1) | (zht << 2);
194
-
195
- // Point contributions
196
- double value = 0;
197
- LatticePoint3D c = LOOKUP_3D[index];
198
- while (c != null) {
199
- double dxr = xri + c.dxr, dyr = yri + c.dyr, dzr = zri + c.dzr;
200
- double attn = 0.75 - dxr * dxr - dyr * dyr - dzr * dzr;
201
- if (attn < 0) {
202
- c = c.nextOnFailure;
203
- } else {
204
- int pxm = (xrb + c.xrv) & PMASK, pym = (yrb + c.yrv) & PMASK, pzm = (zrb + c.zrv) & PMASK;
205
- Grad3 grad = permGrad3[perm[perm[pxm] ^ pym] ^ pzm];
206
- double extrapolation = grad.dx * dxr + grad.dy * dyr + grad.dz * dzr;
207
-
208
- attn *= attn;
209
- value += attn * attn * extrapolation;
210
- c = c.nextOnSuccess;
211
- }
212
- }
213
- return value;
214
- }
215
-
216
- /**
217
- * 4D SuperSimplex noise, classic lattice orientation.
218
- *
219
- * @param x
220
- * @param y
221
- * @param z
222
- * @param w
223
- * @return
224
- */
225
- public double noise4_Classic(double x, double y, double z, double w) {
226
-
227
- // Get points for A4 lattice
228
- double s = 0.309016994374947 * (x + y + z + w);
229
- double xs = x + s, ys = y + s, zs = z + s, ws = w + s;
230
-
231
- return noise4_Base(xs, ys, zs, ws);
232
- }
233
-
234
- /**
235
- * 4D SuperSimplex noise, with XY and ZW forming orthogonal triangular-based
236
- * planes.Recommended for 3D terrain, where X and Y (or Z and W) are
237
- * horizontal.Recommended for noise(x, y, sin(time), cos(time)) trick.
238
- *
239
- * @param x
240
- * @param y
241
- * @param z
242
- * @param w
243
- * @return
244
- */
245
- public double noise4_XYBeforeZW(double x, double y, double z, double w) {
246
-
247
- double s2 = (x + y) * -0.28522513987434876941 + (z + w) * 0.83897065470611435718;
248
- double t2 = (z + w) * 0.21939749883706435719 + (x + y) * -0.48214856493302476942;
249
- double xs = x + s2, ys = y + s2, zs = z + t2, ws = w + t2;
250
-
251
- return noise4_Base(xs, ys, zs, ws);
252
- }
253
-
254
- /**
255
- * 4D SuperSimplex noise, with XYZ oriented like noise3_Classic, and W for
256
- * an extra degree of freedom.Recommended for time-varied animations which
257
- * texture a 3D object (W=time)
258
- *
259
- * @param x
260
- * @param y
261
- * @param z
262
- * @param w
263
- * @return
264
- */
265
- public double noise4_XYZBeforeW(double x, double y, double z, double w) {
266
-
267
- double xyz = x + y + z;
268
- double ww = w * 1.118033988749894;
269
- double s2 = xyz * -0.16666666666666666 + ww;
270
- double xs = x + s2, ys = y + s2, zs = z + s2, ws = -0.5 * xyz + ww;
271
-
272
- return noise4_Base(xs, ys, zs, ws);
273
- }
274
-
275
- /**
276
- * 4D SuperSimplex noise base. Using ultra-simple 4x4x4x4 lookup
277
- * partitioning. This isn't as elegant or SIMD/GPU/etc. portable as other
278
- * approaches, but it does compete performance-wise with optimized
279
- * OpenSimplex1.
280
- */
281
- private double noise4_Base(double xs, double ys, double zs, double ws) {
282
- double value = 0;
283
-
284
- // Get base points and offsets
285
- int xsb = fastFloor(xs), ysb = fastFloor(ys), zsb = fastFloor(zs), wsb = fastFloor(ws);
286
- double xsi = xs - xsb, ysi = ys - ysb, zsi = zs - zsb, wsi = ws - wsb;
287
-
288
- // Unskewed offsets
289
- double ssi = (xsi + ysi + zsi + wsi) * -0.138196601125011;
290
- double xi = xsi + ssi, yi = ysi + ssi, zi = zsi + ssi, wi = wsi + ssi;
291
-
292
- int index = ((fastFloor(xs * 4) & 3))
293
- | ((fastFloor(ys * 4) & 3) << 2)
294
- | ((fastFloor(zs * 4) & 3) << 4)
295
- | ((fastFloor(ws * 4) & 3) << 6);
296
-
297
- // Point contributions
298
- for (LatticePoint4D c : LOOKUP_4D[index]) {
299
- double dx = xi + c.dx, dy = yi + c.dy, dz = zi + c.dz, dw = wi + c.dw;
300
- double attn = 0.8 - dx * dx - dy * dy - dz * dz - dw * dw;
301
- if (attn > 0) {
302
- attn *= attn;
303
-
304
- int pxm = (xsb + c.xsv) & PMASK, pym = (ysb + c.ysv) & PMASK;
305
- int pzm = (zsb + c.zsv) & PMASK, pwm = (wsb + c.wsv) & PMASK;
306
- Grad4 grad = permGrad4[perm[perm[perm[pxm] ^ pym] ^ pzm] ^ pwm];
307
- double extrapolation = grad.dx * dx + grad.dy * dy + grad.dz * dz + grad.dw * dw;
308
-
309
- value += attn * attn * extrapolation;
310
- }
311
- }
312
- return value;
313
- }
314
-
315
- /*
316
- * Utility
317
- */
318
- private static int fastFloor(double x) {
319
- int xi = (int) x;
320
- return x < xi ? xi - 1 : xi;
321
- }
322
-
323
- /*
324
- * Definitions
325
- */
326
- private static final LatticePoint2D[] LOOKUP_2D;
327
- private static final LatticePoint3D[] LOOKUP_3D;
328
- private static final LatticePoint4D[][] LOOKUP_4D;
329
-
330
- static {
331
- LOOKUP_2D = new LatticePoint2D[8 * 4];
332
- LOOKUP_3D = new LatticePoint3D[8];
333
- LOOKUP_4D = new LatticePoint4D[256][];
334
-
335
- for (int i = 0; i < 8; i++) {
336
- int i1, j1, i2, j2;
337
- if ((i & 1) == 0) {
338
- if ((i & 2) == 0) {
339
- i1 = -1;
340
- j1 = 0;
341
- } else {
342
- i1 = 1;
343
- j1 = 0;
344
- }
345
- if ((i & 4) == 0) {
346
- i2 = 0;
347
- j2 = -1;
348
- } else {
349
- i2 = 0;
350
- j2 = 1;
351
- }
352
- } else {
353
- if ((i & 2) != 0) {
354
- i1 = 2;
355
- j1 = 1;
356
- } else {
357
- i1 = 0;
358
- j1 = 1;
359
- }
360
- if ((i & 4) != 0) {
361
- i2 = 1;
362
- j2 = 2;
363
- } else {
364
- i2 = 1;
365
- j2 = 0;
366
- }
367
- }
368
- LOOKUP_2D[i * 4 + 0] = new LatticePoint2D(0, 0);
369
- LOOKUP_2D[i * 4 + 1] = new LatticePoint2D(1, 1);
370
- LOOKUP_2D[i * 4 + 2] = new LatticePoint2D(i1, j1);
371
- LOOKUP_2D[i * 4 + 3] = new LatticePoint2D(i2, j2);
372
- }
373
-
374
- for (int i = 0; i < 8; i++) {
375
- int i1, j1, k1, i2, j2, k2;
376
- i1 = (i) & 1;
377
- j1 = (i >> 1) & 1;
378
- k1 = (i >> 2) & 1;
379
- i2 = i1 ^ 1;
380
- j2 = j1 ^ 1;
381
- k2 = k1 ^ 1;
382
-
383
- // The two points within this octant, one from each of the two cubic half-lattices.
384
- LatticePoint3D c0 = new LatticePoint3D(i1, j1, k1, 0);
385
- LatticePoint3D c1 = new LatticePoint3D(i1 + i2, j1 + j2, k1 + k2, 1);
386
-
387
- // (1, 0, 0) vs (0, 1, 1) away from octant.
388
- LatticePoint3D c2 = new LatticePoint3D(i1 ^ 1, j1, k1, 0);
389
- LatticePoint3D c3 = new LatticePoint3D(i1, j1 ^ 1, k1 ^ 1, 0);
390
-
391
- // (1, 0, 0) vs (0, 1, 1) away from octant, on second half-lattice.
392
- LatticePoint3D c4 = new LatticePoint3D(i1 + (i2 ^ 1), j1 + j2, k1 + k2, 1);
393
- LatticePoint3D c5 = new LatticePoint3D(i1 + i2, j1 + (j2 ^ 1), k1 + (k2 ^ 1), 1);
394
-
395
- // (0, 1, 0) vs (1, 0, 1) away from octant.
396
- LatticePoint3D c6 = new LatticePoint3D(i1, j1 ^ 1, k1, 0);
397
- LatticePoint3D c7 = new LatticePoint3D(i1 ^ 1, j1, k1 ^ 1, 0);
398
-
399
- // (0, 1, 0) vs (1, 0, 1) away from octant, on second half-lattice.
400
- LatticePoint3D c8 = new LatticePoint3D(i1 + i2, j1 + (j2 ^ 1), k1 + k2, 1);
401
- LatticePoint3D c9 = new LatticePoint3D(i1 + (i2 ^ 1), j1 + j2, k1 + (k2 ^ 1), 1);
402
-
403
- // (0, 0, 1) vs (1, 1, 0) away from octant.
404
- LatticePoint3D cA = new LatticePoint3D(i1, j1, k1 ^ 1, 0);
405
- LatticePoint3D cB = new LatticePoint3D(i1 ^ 1, j1 ^ 1, k1, 0);
406
-
407
- // (0, 0, 1) vs (1, 1, 0) away from octant, on second half-lattice.
408
- LatticePoint3D cC = new LatticePoint3D(i1 + i2, j1 + j2, k1 + (k2 ^ 1), 1);
409
- LatticePoint3D cD = new LatticePoint3D(i1 + (i2 ^ 1), j1 + (j2 ^ 1), k1 + k2, 1);
410
-
411
- // First two points are guaranteed.
412
- c0.nextOnFailure = c0.nextOnSuccess = c1;
413
- c1.nextOnFailure = c1.nextOnSuccess = c2;
414
-
415
- // If c2 is in range, then we know c3 and c4 are not.
416
- c2.nextOnFailure = c3;
417
- c2.nextOnSuccess = c5;
418
- c3.nextOnFailure = c4;
419
- c3.nextOnSuccess = c4;
420
-
421
- // If c4 is in range, then we know c5 is not.
422
- c4.nextOnFailure = c5;
423
- c4.nextOnSuccess = c6;
424
- c5.nextOnFailure = c5.nextOnSuccess = c6;
425
-
426
- // If c6 is in range, then we know c7 and c8 are not.
427
- c6.nextOnFailure = c7;
428
- c6.nextOnSuccess = c9;
429
- c7.nextOnFailure = c8;
430
- c7.nextOnSuccess = c8;
431
-
432
- // If c8 is in range, then we know c9 is not.
433
- c8.nextOnFailure = c9;
434
- c8.nextOnSuccess = cA;
435
- c9.nextOnFailure = c9.nextOnSuccess = cA;
436
-
437
- // If cA is in range, then we know cB and cC are not.
438
- cA.nextOnFailure = cB;
439
- cA.nextOnSuccess = cD;
440
- cB.nextOnFailure = cC;
441
- cB.nextOnSuccess = cC;
442
-
443
- // If cC is in range, then we know cD is not.
444
- cC.nextOnFailure = cD;
445
- cC.nextOnSuccess = null;
446
- cD.nextOnFailure = cD.nextOnSuccess = null;
447
-
448
- LOOKUP_3D[i] = c0;
449
- }
450
-
451
- int[][] lookup4DPregen = {
452
- {0x15, 0x45, 0x51, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
453
- {0x15, 0x45, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA6, 0xAA},
454
- {0x01, 0x05, 0x11, 0x15, 0x41, 0x45, 0x51, 0x55, 0x56, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xAA},
455
- {0x01, 0x15, 0x16, 0x45, 0x46, 0x51, 0x52, 0x55, 0x56, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
456
- {0x15, 0x45, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA9, 0xAA},
457
- {0x05, 0x15, 0x45, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xAA},
458
- {0x05, 0x15, 0x45, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xAA},
459
- {0x05, 0x15, 0x16, 0x45, 0x46, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xAA, 0xAB},
460
- {0x04, 0x05, 0x14, 0x15, 0x44, 0x45, 0x54, 0x55, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA},
461
- {0x05, 0x15, 0x45, 0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xAA},
462
- {0x05, 0x15, 0x45, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x9A, 0xAA},
463
- {0x05, 0x15, 0x16, 0x45, 0x46, 0x55, 0x56, 0x59, 0x5A, 0x5B, 0x6A, 0x9A, 0xAA, 0xAB},
464
- {0x04, 0x15, 0x19, 0x45, 0x49, 0x54, 0x55, 0x58, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
465
- {0x05, 0x15, 0x19, 0x45, 0x49, 0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xAA, 0xAE},
466
- {0x05, 0x15, 0x19, 0x45, 0x49, 0x55, 0x56, 0x59, 0x5A, 0x5E, 0x6A, 0x9A, 0xAA, 0xAE},
467
- {0x05, 0x15, 0x1A, 0x45, 0x4A, 0x55, 0x56, 0x59, 0x5A, 0x5B, 0x5E, 0x6A, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
468
- {0x15, 0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0xA5, 0xA6, 0xA9, 0xAA},
469
- {0x11, 0x15, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0xA5, 0xA6, 0xAA},
470
- {0x11, 0x15, 0x51, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x96, 0xA6, 0xAA},
471
- {0x11, 0x15, 0x16, 0x51, 0x52, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x96, 0xA6, 0xAA, 0xAB},
472
- {0x14, 0x15, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x99, 0xA5, 0xA9, 0xAA},
473
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x9A, 0xA6, 0xA9, 0xAA},
474
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
475
- {0x15, 0x16, 0x55, 0x56, 0x5A, 0x66, 0x6A, 0x6B, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
476
- {0x14, 0x15, 0x54, 0x55, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x99, 0xA9, 0xAA},
477
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
478
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x9A, 0xAA},
479
- {0x15, 0x16, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x6B, 0x9A, 0xAA, 0xAB},
480
- {0x14, 0x15, 0x19, 0x54, 0x55, 0x58, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x99, 0xA9, 0xAA, 0xAE},
481
- {0x15, 0x19, 0x55, 0x59, 0x5A, 0x69, 0x6A, 0x6E, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
482
- {0x15, 0x19, 0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x6E, 0x9A, 0xAA, 0xAE},
483
- {0x15, 0x1A, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x6B, 0x6E, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
484
- {0x10, 0x11, 0x14, 0x15, 0x50, 0x51, 0x54, 0x55, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA},
485
- {0x11, 0x15, 0x51, 0x55, 0x56, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xAA},
486
- {0x11, 0x15, 0x51, 0x55, 0x56, 0x65, 0x66, 0x6A, 0xA6, 0xAA},
487
- {0x11, 0x15, 0x16, 0x51, 0x52, 0x55, 0x56, 0x65, 0x66, 0x67, 0x6A, 0xA6, 0xAA, 0xAB},
488
- {0x14, 0x15, 0x54, 0x55, 0x59, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA9, 0xAA},
489
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
490
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA6, 0xAA},
491
- {0x15, 0x16, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x6B, 0xA6, 0xAA, 0xAB},
492
- {0x14, 0x15, 0x54, 0x55, 0x59, 0x65, 0x69, 0x6A, 0xA9, 0xAA},
493
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA9, 0xAA},
494
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xAA},
495
- {0x15, 0x16, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x6B, 0xAA, 0xAB},
496
- {0x14, 0x15, 0x19, 0x54, 0x55, 0x58, 0x59, 0x65, 0x69, 0x6A, 0x6D, 0xA9, 0xAA, 0xAE},
497
- {0x15, 0x19, 0x55, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x6E, 0xA9, 0xAA, 0xAE},
498
- {0x15, 0x19, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x6E, 0xAA, 0xAE},
499
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x69, 0x6A, 0x6B, 0x6E, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
500
- {0x10, 0x15, 0x25, 0x51, 0x54, 0x55, 0x61, 0x64, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
501
- {0x11, 0x15, 0x25, 0x51, 0x55, 0x56, 0x61, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xAA, 0xBA},
502
- {0x11, 0x15, 0x25, 0x51, 0x55, 0x56, 0x61, 0x65, 0x66, 0x6A, 0x76, 0xA6, 0xAA, 0xBA},
503
- {0x11, 0x15, 0x26, 0x51, 0x55, 0x56, 0x62, 0x65, 0x66, 0x67, 0x6A, 0x76, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
504
- {0x14, 0x15, 0x25, 0x54, 0x55, 0x59, 0x64, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA9, 0xAA, 0xBA},
505
- {0x15, 0x25, 0x55, 0x65, 0x66, 0x69, 0x6A, 0x7A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
506
- {0x15, 0x25, 0x55, 0x56, 0x65, 0x66, 0x69, 0x6A, 0x7A, 0xA6, 0xAA, 0xBA},
507
- {0x15, 0x26, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x6B, 0x7A, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
508
- {0x14, 0x15, 0x25, 0x54, 0x55, 0x59, 0x64, 0x65, 0x69, 0x6A, 0x79, 0xA9, 0xAA, 0xBA},
509
- {0x15, 0x25, 0x55, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x7A, 0xA9, 0xAA, 0xBA},
510
- {0x15, 0x25, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x7A, 0xAA, 0xBA},
511
- {0x15, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x6B, 0x7A, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
512
- {0x14, 0x15, 0x29, 0x54, 0x55, 0x59, 0x65, 0x68, 0x69, 0x6A, 0x6D, 0x79, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
513
- {0x15, 0x29, 0x55, 0x59, 0x65, 0x69, 0x6A, 0x6E, 0x7A, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
514
- {0x15, 0x55, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x6E, 0x7A, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
515
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x6B, 0x6E, 0x7A, 0xAA, 0xAB, 0xAE, 0xBA, 0xBF},
516
- {0x45, 0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
517
- {0x41, 0x45, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xAA},
518
- {0x41, 0x45, 0x51, 0x55, 0x56, 0x5A, 0x66, 0x95, 0x96, 0x9A, 0xA6, 0xAA},
519
- {0x41, 0x45, 0x46, 0x51, 0x52, 0x55, 0x56, 0x5A, 0x66, 0x95, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
520
- {0x44, 0x45, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x69, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA9, 0xAA},
521
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xA9, 0xAA},
522
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xAA, 0xAB},
523
- {0x45, 0x46, 0x55, 0x56, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0x9B, 0xA6, 0xAA, 0xAB},
524
- {0x44, 0x45, 0x54, 0x55, 0x59, 0x5A, 0x69, 0x95, 0x99, 0x9A, 0xA9, 0xAA},
525
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
526
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xAA},
527
- {0x45, 0x46, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x96, 0x9A, 0x9B, 0xAA, 0xAB},
528
- {0x44, 0x45, 0x49, 0x54, 0x55, 0x58, 0x59, 0x5A, 0x69, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
529
- {0x45, 0x49, 0x55, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0x9E, 0xA9, 0xAA, 0xAE},
530
- {0x45, 0x49, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x99, 0x9A, 0x9E, 0xAA, 0xAE},
531
- {0x45, 0x4A, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x9A, 0x9B, 0x9E, 0xAA, 0xAB, 0xAE, 0xAF},
532
- {0x50, 0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x66, 0x69, 0x95, 0x96, 0x99, 0xA5, 0xA6, 0xA9, 0xAA},
533
- {0x51, 0x55, 0x56, 0x59, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
534
- {0x51, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xAA, 0xAB},
535
- {0x51, 0x52, 0x55, 0x56, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xA7, 0xAA, 0xAB},
536
- {0x54, 0x55, 0x56, 0x59, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
537
- {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
538
- {0x15, 0x45, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
539
- {0x55, 0x56, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
540
- {0x54, 0x55, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xAE},
541
- {0x15, 0x45, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
542
- {0x15, 0x45, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xA9, 0xAA, 0xAB, 0xAE},
543
- {0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
544
- {0x54, 0x55, 0x58, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAD, 0xAE},
545
- {0x55, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
546
- {0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
547
- {0x55, 0x56, 0x59, 0x5A, 0x6A, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
548
- {0x50, 0x51, 0x54, 0x55, 0x65, 0x66, 0x69, 0x95, 0xA5, 0xA6, 0xA9, 0xAA},
549
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
550
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x95, 0x96, 0xA5, 0xA6, 0xAA},
551
- {0x51, 0x52, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x96, 0xA6, 0xA7, 0xAA, 0xAB},
552
- {0x54, 0x55, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
553
- {0x15, 0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
554
- {0x15, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xBA},
555
- {0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
556
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x6A, 0x95, 0x99, 0xA5, 0xA9, 0xAA},
557
- {0x15, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAE, 0xBA},
558
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x9A, 0xA6, 0xA9, 0xAA},
559
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
560
- {0x54, 0x55, 0x58, 0x59, 0x65, 0x69, 0x6A, 0x99, 0xA9, 0xAA, 0xAD, 0xAE},
561
- {0x55, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
562
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
563
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x69, 0x6A, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
564
- {0x50, 0x51, 0x54, 0x55, 0x61, 0x64, 0x65, 0x66, 0x69, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
565
- {0x51, 0x55, 0x61, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xB6, 0xBA},
566
- {0x51, 0x55, 0x56, 0x61, 0x65, 0x66, 0x6A, 0xA5, 0xA6, 0xAA, 0xB6, 0xBA},
567
- {0x51, 0x55, 0x56, 0x62, 0x65, 0x66, 0x6A, 0xA6, 0xA7, 0xAA, 0xAB, 0xB6, 0xBA, 0xBB},
568
- {0x54, 0x55, 0x64, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xB9, 0xBA},
569
- {0x55, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
570
- {0x55, 0x56, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
571
- {0x55, 0x56, 0x65, 0x66, 0x6A, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
572
- {0x54, 0x55, 0x59, 0x64, 0x65, 0x69, 0x6A, 0xA5, 0xA9, 0xAA, 0xB9, 0xBA},
573
- {0x55, 0x59, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
574
- {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
575
- {0x15, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
576
- {0x54, 0x55, 0x59, 0x65, 0x68, 0x69, 0x6A, 0xA9, 0xAA, 0xAD, 0xAE, 0xB9, 0xBA, 0xBE},
577
- {0x55, 0x59, 0x65, 0x69, 0x6A, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
578
- {0x15, 0x55, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
579
- {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xAA, 0xAB, 0xAE, 0xBA, 0xBF},
580
- {0x40, 0x41, 0x44, 0x45, 0x50, 0x51, 0x54, 0x55, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
581
- {0x41, 0x45, 0x51, 0x55, 0x56, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xAA},
582
- {0x41, 0x45, 0x51, 0x55, 0x56, 0x95, 0x96, 0x9A, 0xA6, 0xAA},
583
- {0x41, 0x45, 0x46, 0x51, 0x52, 0x55, 0x56, 0x95, 0x96, 0x97, 0x9A, 0xA6, 0xAA, 0xAB},
584
- {0x44, 0x45, 0x54, 0x55, 0x59, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA9, 0xAA},
585
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
586
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xAA},
587
- {0x45, 0x46, 0x55, 0x56, 0x5A, 0x95, 0x96, 0x9A, 0x9B, 0xA6, 0xAA, 0xAB},
588
- {0x44, 0x45, 0x54, 0x55, 0x59, 0x95, 0x99, 0x9A, 0xA9, 0xAA},
589
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA9, 0xAA},
590
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xAA},
591
- {0x45, 0x46, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0x9B, 0xAA, 0xAB},
592
- {0x44, 0x45, 0x49, 0x54, 0x55, 0x58, 0x59, 0x95, 0x99, 0x9A, 0x9D, 0xA9, 0xAA, 0xAE},
593
- {0x45, 0x49, 0x55, 0x59, 0x5A, 0x95, 0x99, 0x9A, 0x9E, 0xA9, 0xAA, 0xAE},
594
- {0x45, 0x49, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0x9E, 0xAA, 0xAE},
595
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x96, 0x99, 0x9A, 0x9B, 0x9E, 0xAA, 0xAB, 0xAE, 0xAF},
596
- {0x50, 0x51, 0x54, 0x55, 0x65, 0x95, 0x96, 0x99, 0xA5, 0xA6, 0xA9, 0xAA},
597
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
598
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xAA},
599
- {0x51, 0x52, 0x55, 0x56, 0x66, 0x95, 0x96, 0x9A, 0xA6, 0xA7, 0xAA, 0xAB},
600
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
601
- {0x45, 0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
602
- {0x45, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xEA},
603
- {0x55, 0x56, 0x5A, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
604
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA},
605
- {0x45, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAE, 0xEA},
606
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xA9, 0xAA},
607
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xAA, 0xAB},
608
- {0x54, 0x55, 0x58, 0x59, 0x69, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xAD, 0xAE},
609
- {0x55, 0x59, 0x5A, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
610
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
611
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x96, 0x99, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
612
- {0x50, 0x51, 0x54, 0x55, 0x65, 0x95, 0xA5, 0xA6, 0xA9, 0xAA},
613
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA},
614
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xAA},
615
- {0x51, 0x52, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xA7, 0xAA, 0xAB},
616
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA},
617
- {0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA, 0xEA},
618
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
619
- {0x51, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xAA, 0xAB},
620
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA9, 0xAA},
621
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
622
- {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
623
- {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA6, 0xA9, 0xAA, 0xAB},
624
- {0x54, 0x55, 0x58, 0x59, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA9, 0xAA, 0xAD, 0xAE},
625
- {0x54, 0x55, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xAE},
626
- {0x55, 0x56, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA6, 0xA9, 0xAA, 0xAE},
627
- {0x55, 0x56, 0x59, 0x5A, 0x66, 0x69, 0x6A, 0x96, 0x99, 0x9A, 0xA6, 0xA9, 0xAA, 0xAB, 0xAE, 0xAF},
628
- {0x50, 0x51, 0x54, 0x55, 0x61, 0x64, 0x65, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xB5, 0xBA},
629
- {0x51, 0x55, 0x61, 0x65, 0x66, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xB6, 0xBA},
630
- {0x51, 0x55, 0x56, 0x61, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xAA, 0xB6, 0xBA},
631
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x96, 0xA5, 0xA6, 0xA7, 0xAA, 0xAB, 0xB6, 0xBA, 0xBB},
632
- {0x54, 0x55, 0x64, 0x65, 0x69, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xB9, 0xBA},
633
- {0x55, 0x65, 0x66, 0x69, 0x6A, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
634
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
635
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x96, 0xA5, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
636
- {0x54, 0x55, 0x59, 0x64, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA9, 0xAA, 0xB9, 0xBA},
637
- {0x54, 0x55, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
638
- {0x55, 0x56, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
639
- {0x55, 0x56, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x96, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xBA, 0xBB},
640
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x6A, 0x99, 0xA5, 0xA9, 0xAA, 0xAD, 0xAE, 0xB9, 0xBA, 0xBE},
641
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x6A, 0x99, 0xA5, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
642
- {0x55, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
643
- {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x9A, 0xA6, 0xA9, 0xAA, 0xAB, 0xAE, 0xBA},
644
- {0x40, 0x45, 0x51, 0x54, 0x55, 0x85, 0x91, 0x94, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
645
- {0x41, 0x45, 0x51, 0x55, 0x56, 0x85, 0x91, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xAA, 0xEA},
646
- {0x41, 0x45, 0x51, 0x55, 0x56, 0x85, 0x91, 0x95, 0x96, 0x9A, 0xA6, 0xAA, 0xD6, 0xEA},
647
- {0x41, 0x45, 0x51, 0x55, 0x56, 0x86, 0x92, 0x95, 0x96, 0x97, 0x9A, 0xA6, 0xAA, 0xAB, 0xD6, 0xEA, 0xEB},
648
- {0x44, 0x45, 0x54, 0x55, 0x59, 0x85, 0x94, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xEA},
649
- {0x45, 0x55, 0x85, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xDA, 0xEA},
650
- {0x45, 0x55, 0x56, 0x85, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xAA, 0xDA, 0xEA},
651
- {0x45, 0x55, 0x56, 0x86, 0x95, 0x96, 0x9A, 0x9B, 0xA6, 0xAA, 0xAB, 0xDA, 0xEA, 0xEB},
652
- {0x44, 0x45, 0x54, 0x55, 0x59, 0x85, 0x94, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xD9, 0xEA},
653
- {0x45, 0x55, 0x59, 0x85, 0x95, 0x96, 0x99, 0x9A, 0xA9, 0xAA, 0xDA, 0xEA},
654
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x85, 0x95, 0x96, 0x99, 0x9A, 0xAA, 0xDA, 0xEA},
655
- {0x45, 0x55, 0x56, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0x9B, 0xA6, 0xAA, 0xAB, 0xDA, 0xEA, 0xEB},
656
- {0x44, 0x45, 0x54, 0x55, 0x59, 0x89, 0x95, 0x98, 0x99, 0x9A, 0x9D, 0xA9, 0xAA, 0xAE, 0xD9, 0xEA, 0xEE},
657
- {0x45, 0x55, 0x59, 0x89, 0x95, 0x99, 0x9A, 0x9E, 0xA9, 0xAA, 0xAE, 0xDA, 0xEA, 0xEE},
658
- {0x45, 0x55, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0x9E, 0xA9, 0xAA, 0xAE, 0xDA, 0xEA, 0xEE},
659
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0x9B, 0x9E, 0xAA, 0xAB, 0xAE, 0xDA, 0xEA, 0xEF},
660
- {0x50, 0x51, 0x54, 0x55, 0x65, 0x91, 0x94, 0x95, 0x96, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
661
- {0x51, 0x55, 0x91, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xE6, 0xEA},
662
- {0x51, 0x55, 0x56, 0x91, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xAA, 0xE6, 0xEA},
663
- {0x51, 0x55, 0x56, 0x92, 0x95, 0x96, 0x9A, 0xA6, 0xA7, 0xAA, 0xAB, 0xE6, 0xEA, 0xEB},
664
- {0x54, 0x55, 0x94, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xE9, 0xEA},
665
- {0x55, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
666
- {0x55, 0x56, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
667
- {0x55, 0x56, 0x95, 0x96, 0x9A, 0xA6, 0xAA, 0xAB, 0xEA, 0xEB},
668
- {0x54, 0x55, 0x59, 0x94, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xE9, 0xEA},
669
- {0x55, 0x59, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
670
- {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
671
- {0x45, 0x55, 0x56, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xAA, 0xAB, 0xEA, 0xEB},
672
- {0x54, 0x55, 0x59, 0x95, 0x98, 0x99, 0x9A, 0xA9, 0xAA, 0xAD, 0xAE, 0xE9, 0xEA, 0xEE},
673
- {0x55, 0x59, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xAE, 0xEA, 0xEE},
674
- {0x45, 0x55, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA9, 0xAA, 0xAE, 0xEA, 0xEE},
675
- {0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xAA, 0xAB, 0xAE, 0xEA, 0xEF},
676
- {0x50, 0x51, 0x54, 0x55, 0x65, 0x91, 0x94, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xE5, 0xEA},
677
- {0x51, 0x55, 0x65, 0x91, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA, 0xE6, 0xEA},
678
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x91, 0x95, 0x96, 0xA5, 0xA6, 0xAA, 0xE6, 0xEA},
679
- {0x51, 0x55, 0x56, 0x66, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xA7, 0xAA, 0xAB, 0xE6, 0xEA, 0xEB},
680
- {0x54, 0x55, 0x65, 0x94, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xE9, 0xEA},
681
- {0x55, 0x65, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
682
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
683
- {0x51, 0x55, 0x56, 0x66, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xAA, 0xAB, 0xEA, 0xEB},
684
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x94, 0x95, 0x99, 0xA5, 0xA9, 0xAA, 0xE9, 0xEA},
685
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
686
- {0x55, 0x56, 0x59, 0x65, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
687
- {0x55, 0x56, 0x5A, 0x66, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xEA, 0xEB},
688
- {0x54, 0x55, 0x59, 0x69, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xAD, 0xAE, 0xE9, 0xEA, 0xEE},
689
- {0x54, 0x55, 0x59, 0x69, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xAE, 0xEA, 0xEE},
690
- {0x55, 0x59, 0x5A, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAE, 0xEA, 0xEE},
691
- {0x55, 0x56, 0x59, 0x5A, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xA9, 0xAA, 0xAB, 0xAE, 0xEA},
692
- {0x50, 0x51, 0x54, 0x55, 0x65, 0x95, 0xA1, 0xA4, 0xA5, 0xA6, 0xA9, 0xAA, 0xB5, 0xBA, 0xE5, 0xEA, 0xFA},
693
- {0x51, 0x55, 0x65, 0x95, 0xA1, 0xA5, 0xA6, 0xA9, 0xAA, 0xB6, 0xBA, 0xE6, 0xEA, 0xFA},
694
- {0x51, 0x55, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA, 0xB6, 0xBA, 0xE6, 0xEA, 0xFA},
695
- {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xA7, 0xAA, 0xAB, 0xB6, 0xBA, 0xE6, 0xEA, 0xFB},
696
- {0x54, 0x55, 0x65, 0x95, 0xA4, 0xA5, 0xA6, 0xA9, 0xAA, 0xB9, 0xBA, 0xE9, 0xEA, 0xFA},
697
- {0x55, 0x65, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA, 0xEA, 0xFA},
698
- {0x51, 0x55, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA, 0xEA, 0xFA},
699
- {0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xAA, 0xAB, 0xBA, 0xEA, 0xFB},
700
- {0x54, 0x55, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xB9, 0xBA, 0xE9, 0xEA, 0xFA},
701
- {0x54, 0x55, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA, 0xEA, 0xFA},
702
- {0x55, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA, 0xEA, 0xFA},
703
- {0x55, 0x56, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xBA, 0xEA},
704
- {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA9, 0xAA, 0xAD, 0xAE, 0xB9, 0xBA, 0xE9, 0xEA, 0xFE},
705
- {0x55, 0x59, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA9, 0xAA, 0xAE, 0xBA, 0xEA, 0xFE},
706
- {0x55, 0x59, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAE, 0xBA, 0xEA},
707
- {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xAE, 0xBA, 0xEA},};
708
- LatticePoint4D[] latticePoints = new LatticePoint4D[256];
709
- for (int i = 0; i < 256; i++) {
710
- int cx = ((i) & 3) - 1;
711
- int cy = ((i >> 2) & 3) - 1;
712
- int cz = ((i >> 4) & 3) - 1;
713
- int cw = ((i >> 6) & 3) - 1;
714
- latticePoints[i] = new LatticePoint4D(cx, cy, cz, cw);
715
- }
716
- for (int i = 0; i < 256; i++) {
717
- LOOKUP_4D[i] = new LatticePoint4D[lookup4DPregen[i].length];
718
- for (int j = 0; j < lookup4DPregen[i].length; j++) {
719
- LOOKUP_4D[i][j] = latticePoints[lookup4DPregen[i][j]];
720
- }
721
- }
722
- }
723
-
724
- @Override
725
- public float noise(float x, float y, float z) {
726
- return (float) noise3_Classic(x, y, z);
727
- }
728
-
729
- @Override
730
- public float noise(float x, float y, float z, float w) {
731
- return (float) noise4_Classic(x, y, z, w);
732
- }
733
-
734
- @Override
735
- public void noiseMode(NoiseMode mode) {
736
-
737
- }
738
-
739
- @Override
740
- public void noiseSeed(long seed) {
741
-
742
- }
743
-
744
- private static class LatticePoint2D {
745
-
746
- int xsv, ysv;
747
- double dx, dy;
748
-
749
- public LatticePoint2D(int xsv, int ysv) {
750
- this.xsv = xsv;
751
- this.ysv = ysv;
752
- double ssv = (xsv + ysv) * -0.211324865405187;
753
- this.dx = -xsv - ssv;
754
- this.dy = -ysv - ssv;
755
- }
756
- }
757
-
758
- private static class LatticePoint3D {
759
-
760
- public double dxr, dyr, dzr;
761
- public int xrv, yrv, zrv;
762
- LatticePoint3D nextOnFailure, nextOnSuccess;
763
-
764
- public LatticePoint3D(int xrv, int yrv, int zrv, int lattice) {
765
- this.dxr = -xrv + lattice * 0.5;
766
- this.dyr = -yrv + lattice * 0.5;
767
- this.dzr = -zrv + lattice * 0.5;
768
- this.xrv = xrv + lattice * 1024;
769
- this.yrv = yrv + lattice * 1024;
770
- this.zrv = zrv + lattice * 1024;
771
- }
772
- }
773
-
774
- private static class LatticePoint4D {
775
-
776
- int xsv, ysv, zsv, wsv;
777
- double dx, dy, dz, dw;
778
-
779
- public LatticePoint4D(int xsv, int ysv, int zsv, int wsv) {
780
- this.xsv = xsv;
781
- this.ysv = ysv;
782
- this.zsv = zsv;
783
- this.wsv = wsv;
784
- double ssv = (xsv + ysv + zsv + wsv) * -0.138196601125011;
785
- this.dx = -xsv - ssv;
786
- this.dy = -ysv - ssv;
787
- this.dz = -zsv - ssv;
788
- this.dw = -wsv - ssv;
789
- }
790
- }
791
-
792
- /*
793
- * Gradients
794
- */
795
- private static class Grad2 {
796
-
797
- double dx, dy;
798
-
799
- public Grad2(double dx, double dy) {
800
- this.dx = dx;
801
- this.dy = dy;
802
- }
803
- }
804
-
805
- private static class Grad3 {
806
-
807
- double dx, dy, dz;
808
-
809
- public Grad3(double dx, double dy, double dz) {
810
- this.dx = dx;
811
- this.dy = dy;
812
- this.dz = dz;
813
- }
814
- }
815
-
816
- private static class Grad4 {
817
-
818
- double dx, dy, dz, dw;
819
-
820
- public Grad4(double dx, double dy, double dz, double dw) {
821
- this.dx = dx;
822
- this.dy = dy;
823
- this.dz = dz;
824
- this.dw = dw;
825
- }
826
- }
827
-
828
- private static final double N2 = 0.05481866495625118;
829
- private static final double N3 = 0.2781926117527186;
830
- private static final double N4 = 0.11127401889945551;
831
- private static final Grad2[] GRADIENTS_2D;
832
- private static final Grad3[] GRADIENTS_3D;
833
- private static final Grad4[] GRADIENTS_4D;
834
-
835
- static {
836
-
837
- GRADIENTS_2D = new Grad2[PSIZE];
838
- Grad2[] grad2 = {
839
- new Grad2(0.130526192220052, 0.99144486137381),
840
- new Grad2(0.38268343236509, 0.923879532511287),
841
- new Grad2(0.608761429008721, 0.793353340291235),
842
- new Grad2(0.793353340291235, 0.608761429008721),
843
- new Grad2(0.923879532511287, 0.38268343236509),
844
- new Grad2(0.99144486137381, 0.130526192220051),
845
- new Grad2(0.99144486137381, -0.130526192220051),
846
- new Grad2(0.923879532511287, -0.38268343236509),
847
- new Grad2(0.793353340291235, -0.60876142900872),
848
- new Grad2(0.608761429008721, -0.793353340291235),
849
- new Grad2(0.38268343236509, -0.923879532511287),
850
- new Grad2(0.130526192220052, -0.99144486137381),
851
- new Grad2(-0.130526192220052, -0.99144486137381),
852
- new Grad2(-0.38268343236509, -0.923879532511287),
853
- new Grad2(-0.608761429008721, -0.793353340291235),
854
- new Grad2(-0.793353340291235, -0.608761429008721),
855
- new Grad2(-0.923879532511287, -0.38268343236509),
856
- new Grad2(-0.99144486137381, -0.130526192220052),
857
- new Grad2(-0.99144486137381, 0.130526192220051),
858
- new Grad2(-0.923879532511287, 0.38268343236509),
859
- new Grad2(-0.793353340291235, 0.608761429008721),
860
- new Grad2(-0.608761429008721, 0.793353340291235),
861
- new Grad2(-0.38268343236509, 0.923879532511287),
862
- new Grad2(-0.130526192220052, 0.99144486137381)
863
- };
864
- Grad2[] grad2XBeforeY = new Grad2[grad2.length];
865
- for (Grad2 grad21 : grad2) {
866
- grad21.dx /= N2;
867
- grad21.dy /= N2;
868
- }
869
- for (int i = 0; i < PSIZE; i++) {
870
- GRADIENTS_2D[i] = grad2[i % grad2.length];
871
- }
872
-
873
- GRADIENTS_3D = new Grad3[PSIZE];
874
- Grad3[] grad3 = {
875
- new Grad3(-2.22474487139, -2.22474487139, -1.0),
876
- new Grad3(-2.22474487139, -2.22474487139, 1.0),
877
- new Grad3(-3.0862664687972017, -1.1721513422464978, 0.0),
878
- new Grad3(-1.1721513422464978, -3.0862664687972017, 0.0),
879
- new Grad3(-2.22474487139, -1.0, -2.22474487139),
880
- new Grad3(-2.22474487139, 1.0, -2.22474487139),
881
- new Grad3(-1.1721513422464978, 0.0, -3.0862664687972017),
882
- new Grad3(-3.0862664687972017, 0.0, -1.1721513422464978),
883
- new Grad3(-2.22474487139, -1.0, 2.22474487139),
884
- new Grad3(-2.22474487139, 1.0, 2.22474487139),
885
- new Grad3(-3.0862664687972017, 0.0, 1.1721513422464978),
886
- new Grad3(-1.1721513422464978, 0.0, 3.0862664687972017),
887
- new Grad3(-2.22474487139, 2.22474487139, -1.0),
888
- new Grad3(-2.22474487139, 2.22474487139, 1.0),
889
- new Grad3(-1.1721513422464978, 3.0862664687972017, 0.0),
890
- new Grad3(-3.0862664687972017, 1.1721513422464978, 0.0),
891
- new Grad3(-1.0, -2.22474487139, -2.22474487139),
892
- new Grad3(1.0, -2.22474487139, -2.22474487139),
893
- new Grad3(0.0, -3.0862664687972017, -1.1721513422464978),
894
- new Grad3(0.0, -1.1721513422464978, -3.0862664687972017),
895
- new Grad3(-1.0, -2.22474487139, 2.22474487139),
896
- new Grad3(1.0, -2.22474487139, 2.22474487139),
897
- new Grad3(0.0, -1.1721513422464978, 3.0862664687972017),
898
- new Grad3(0.0, -3.0862664687972017, 1.1721513422464978),
899
- new Grad3(-1.0, 2.22474487139, -2.22474487139),
900
- new Grad3(1.0, 2.22474487139, -2.22474487139),
901
- new Grad3(0.0, 1.1721513422464978, -3.0862664687972017),
902
- new Grad3(0.0, 3.0862664687972017, -1.1721513422464978),
903
- new Grad3(-1.0, 2.22474487139, 2.22474487139),
904
- new Grad3(1.0, 2.22474487139, 2.22474487139),
905
- new Grad3(0.0, 3.0862664687972017, 1.1721513422464978),
906
- new Grad3(0.0, 1.1721513422464978, 3.0862664687972017),
907
- new Grad3(2.22474487139, -2.22474487139, -1.0),
908
- new Grad3(2.22474487139, -2.22474487139, 1.0),
909
- new Grad3(1.1721513422464978, -3.0862664687972017, 0.0),
910
- new Grad3(3.0862664687972017, -1.1721513422464978, 0.0),
911
- new Grad3(2.22474487139, -1.0, -2.22474487139),
912
- new Grad3(2.22474487139, 1.0, -2.22474487139),
913
- new Grad3(3.0862664687972017, 0.0, -1.1721513422464978),
914
- new Grad3(1.1721513422464978, 0.0, -3.0862664687972017),
915
- new Grad3(2.22474487139, -1.0, 2.22474487139),
916
- new Grad3(2.22474487139, 1.0, 2.22474487139),
917
- new Grad3(1.1721513422464978, 0.0, 3.0862664687972017),
918
- new Grad3(3.0862664687972017, 0.0, 1.1721513422464978),
919
- new Grad3(2.22474487139, 2.22474487139, -1.0),
920
- new Grad3(2.22474487139, 2.22474487139, 1.0),
921
- new Grad3(3.0862664687972017, 1.1721513422464978, 0.0),
922
- new Grad3(1.1721513422464978, 3.0862664687972017, 0.0)
923
- };
924
- for (Grad3 grad31 : grad3) {
925
- grad31.dx /= N3;
926
- grad31.dy /= N3;
927
- grad31.dz /= N3;
928
- }
929
- for (int i = 0; i < PSIZE; i++) {
930
- GRADIENTS_3D[i] = grad3[i % grad3.length];
931
- }
932
-
933
- GRADIENTS_4D = new Grad4[PSIZE];
934
- Grad4[] grad4 = {
935
- new Grad4(-0.753341017856078, -0.37968289875261624, -0.37968289875261624, -0.37968289875261624),
936
- new Grad4(-0.7821684431180708, -0.4321472685365301, -0.4321472685365301, 0.12128480194602098),
937
- new Grad4(-0.7821684431180708, -0.4321472685365301, 0.12128480194602098, -0.4321472685365301),
938
- new Grad4(-0.7821684431180708, 0.12128480194602098, -0.4321472685365301, -0.4321472685365301),
939
- new Grad4(-0.8586508742123365, -0.508629699630796, 0.044802370851755174, 0.044802370851755174),
940
- new Grad4(-0.8586508742123365, 0.044802370851755174, -0.508629699630796, 0.044802370851755174),
941
- new Grad4(-0.8586508742123365, 0.044802370851755174, 0.044802370851755174, -0.508629699630796),
942
- new Grad4(-0.9982828964265062, -0.03381941603233842, -0.03381941603233842, -0.03381941603233842),
943
- new Grad4(-0.37968289875261624, -0.753341017856078, -0.37968289875261624, -0.37968289875261624),
944
- new Grad4(-0.4321472685365301, -0.7821684431180708, -0.4321472685365301, 0.12128480194602098),
945
- new Grad4(-0.4321472685365301, -0.7821684431180708, 0.12128480194602098, -0.4321472685365301),
946
- new Grad4(0.12128480194602098, -0.7821684431180708, -0.4321472685365301, -0.4321472685365301),
947
- new Grad4(-0.508629699630796, -0.8586508742123365, 0.044802370851755174, 0.044802370851755174),
948
- new Grad4(0.044802370851755174, -0.8586508742123365, -0.508629699630796, 0.044802370851755174),
949
- new Grad4(0.044802370851755174, -0.8586508742123365, 0.044802370851755174, -0.508629699630796),
950
- new Grad4(-0.03381941603233842, -0.9982828964265062, -0.03381941603233842, -0.03381941603233842),
951
- new Grad4(-0.37968289875261624, -0.37968289875261624, -0.753341017856078, -0.37968289875261624),
952
- new Grad4(-0.4321472685365301, -0.4321472685365301, -0.7821684431180708, 0.12128480194602098),
953
- new Grad4(-0.4321472685365301, 0.12128480194602098, -0.7821684431180708, -0.4321472685365301),
954
- new Grad4(0.12128480194602098, -0.4321472685365301, -0.7821684431180708, -0.4321472685365301),
955
- new Grad4(-0.508629699630796, 0.044802370851755174, -0.8586508742123365, 0.044802370851755174),
956
- new Grad4(0.044802370851755174, -0.508629699630796, -0.8586508742123365, 0.044802370851755174),
957
- new Grad4(0.044802370851755174, 0.044802370851755174, -0.8586508742123365, -0.508629699630796),
958
- new Grad4(-0.03381941603233842, -0.03381941603233842, -0.9982828964265062, -0.03381941603233842),
959
- new Grad4(-0.37968289875261624, -0.37968289875261624, -0.37968289875261624, -0.753341017856078),
960
- new Grad4(-0.4321472685365301, -0.4321472685365301, 0.12128480194602098, -0.7821684431180708),
961
- new Grad4(-0.4321472685365301, 0.12128480194602098, -0.4321472685365301, -0.7821684431180708),
962
- new Grad4(0.12128480194602098, -0.4321472685365301, -0.4321472685365301, -0.7821684431180708),
963
- new Grad4(-0.508629699630796, 0.044802370851755174, 0.044802370851755174, -0.8586508742123365),
964
- new Grad4(0.044802370851755174, -0.508629699630796, 0.044802370851755174, -0.8586508742123365),
965
- new Grad4(0.044802370851755174, 0.044802370851755174, -0.508629699630796, -0.8586508742123365),
966
- new Grad4(-0.03381941603233842, -0.03381941603233842, -0.03381941603233842, -0.9982828964265062),
967
- new Grad4(-0.6740059517812944, -0.3239847771997537, -0.3239847771997537, 0.5794684678643381),
968
- new Grad4(-0.7504883828755602, -0.4004672082940195, 0.15296486218853164, 0.5029860367700724),
969
- new Grad4(-0.7504883828755602, 0.15296486218853164, -0.4004672082940195, 0.5029860367700724),
970
- new Grad4(-0.8828161875373585, 0.08164729285680945, 0.08164729285680945, 0.4553054119602712),
971
- new Grad4(-0.4553054119602712, -0.08164729285680945, -0.08164729285680945, 0.8828161875373585),
972
- new Grad4(-0.5029860367700724, -0.15296486218853164, 0.4004672082940195, 0.7504883828755602),
973
- new Grad4(-0.5029860367700724, 0.4004672082940195, -0.15296486218853164, 0.7504883828755602),
974
- new Grad4(-0.5794684678643381, 0.3239847771997537, 0.3239847771997537, 0.6740059517812944),
975
- new Grad4(-0.3239847771997537, -0.6740059517812944, -0.3239847771997537, 0.5794684678643381),
976
- new Grad4(-0.4004672082940195, -0.7504883828755602, 0.15296486218853164, 0.5029860367700724),
977
- new Grad4(0.15296486218853164, -0.7504883828755602, -0.4004672082940195, 0.5029860367700724),
978
- new Grad4(0.08164729285680945, -0.8828161875373585, 0.08164729285680945, 0.4553054119602712),
979
- new Grad4(-0.08164729285680945, -0.4553054119602712, -0.08164729285680945, 0.8828161875373585),
980
- new Grad4(-0.15296486218853164, -0.5029860367700724, 0.4004672082940195, 0.7504883828755602),
981
- new Grad4(0.4004672082940195, -0.5029860367700724, -0.15296486218853164, 0.7504883828755602),
982
- new Grad4(0.3239847771997537, -0.5794684678643381, 0.3239847771997537, 0.6740059517812944),
983
- new Grad4(-0.3239847771997537, -0.3239847771997537, -0.6740059517812944, 0.5794684678643381),
984
- new Grad4(-0.4004672082940195, 0.15296486218853164, -0.7504883828755602, 0.5029860367700724),
985
- new Grad4(0.15296486218853164, -0.4004672082940195, -0.7504883828755602, 0.5029860367700724),
986
- new Grad4(0.08164729285680945, 0.08164729285680945, -0.8828161875373585, 0.4553054119602712),
987
- new Grad4(-0.08164729285680945, -0.08164729285680945, -0.4553054119602712, 0.8828161875373585),
988
- new Grad4(-0.15296486218853164, 0.4004672082940195, -0.5029860367700724, 0.7504883828755602),
989
- new Grad4(0.4004672082940195, -0.15296486218853164, -0.5029860367700724, 0.7504883828755602),
990
- new Grad4(0.3239847771997537, 0.3239847771997537, -0.5794684678643381, 0.6740059517812944),
991
- new Grad4(-0.6740059517812944, -0.3239847771997537, 0.5794684678643381, -0.3239847771997537),
992
- new Grad4(-0.7504883828755602, -0.4004672082940195, 0.5029860367700724, 0.15296486218853164),
993
- new Grad4(-0.7504883828755602, 0.15296486218853164, 0.5029860367700724, -0.4004672082940195),
994
- new Grad4(-0.8828161875373585, 0.08164729285680945, 0.4553054119602712, 0.08164729285680945),
995
- new Grad4(-0.4553054119602712, -0.08164729285680945, 0.8828161875373585, -0.08164729285680945),
996
- new Grad4(-0.5029860367700724, -0.15296486218853164, 0.7504883828755602, 0.4004672082940195),
997
- new Grad4(-0.5029860367700724, 0.4004672082940195, 0.7504883828755602, -0.15296486218853164),
998
- new Grad4(-0.5794684678643381, 0.3239847771997537, 0.6740059517812944, 0.3239847771997537),
999
- new Grad4(-0.3239847771997537, -0.6740059517812944, 0.5794684678643381, -0.3239847771997537),
1000
- new Grad4(-0.4004672082940195, -0.7504883828755602, 0.5029860367700724, 0.15296486218853164),
1001
- new Grad4(0.15296486218853164, -0.7504883828755602, 0.5029860367700724, -0.4004672082940195),
1002
- new Grad4(0.08164729285680945, -0.8828161875373585, 0.4553054119602712, 0.08164729285680945),
1003
- new Grad4(-0.08164729285680945, -0.4553054119602712, 0.8828161875373585, -0.08164729285680945),
1004
- new Grad4(-0.15296486218853164, -0.5029860367700724, 0.7504883828755602, 0.4004672082940195),
1005
- new Grad4(0.4004672082940195, -0.5029860367700724, 0.7504883828755602, -0.15296486218853164),
1006
- new Grad4(0.3239847771997537, -0.5794684678643381, 0.6740059517812944, 0.3239847771997537),
1007
- new Grad4(-0.3239847771997537, -0.3239847771997537, 0.5794684678643381, -0.6740059517812944),
1008
- new Grad4(-0.4004672082940195, 0.15296486218853164, 0.5029860367700724, -0.7504883828755602),
1009
- new Grad4(0.15296486218853164, -0.4004672082940195, 0.5029860367700724, -0.7504883828755602),
1010
- new Grad4(0.08164729285680945, 0.08164729285680945, 0.4553054119602712, -0.8828161875373585),
1011
- new Grad4(-0.08164729285680945, -0.08164729285680945, 0.8828161875373585, -0.4553054119602712),
1012
- new Grad4(-0.15296486218853164, 0.4004672082940195, 0.7504883828755602, -0.5029860367700724),
1013
- new Grad4(0.4004672082940195, -0.15296486218853164, 0.7504883828755602, -0.5029860367700724),
1014
- new Grad4(0.3239847771997537, 0.3239847771997537, 0.6740059517812944, -0.5794684678643381),
1015
- new Grad4(-0.6740059517812944, 0.5794684678643381, -0.3239847771997537, -0.3239847771997537),
1016
- new Grad4(-0.7504883828755602, 0.5029860367700724, -0.4004672082940195, 0.15296486218853164),
1017
- new Grad4(-0.7504883828755602, 0.5029860367700724, 0.15296486218853164, -0.4004672082940195),
1018
- new Grad4(-0.8828161875373585, 0.4553054119602712, 0.08164729285680945, 0.08164729285680945),
1019
- new Grad4(-0.4553054119602712, 0.8828161875373585, -0.08164729285680945, -0.08164729285680945),
1020
- new Grad4(-0.5029860367700724, 0.7504883828755602, -0.15296486218853164, 0.4004672082940195),
1021
- new Grad4(-0.5029860367700724, 0.7504883828755602, 0.4004672082940195, -0.15296486218853164),
1022
- new Grad4(-0.5794684678643381, 0.6740059517812944, 0.3239847771997537, 0.3239847771997537),
1023
- new Grad4(-0.3239847771997537, 0.5794684678643381, -0.6740059517812944, -0.3239847771997537),
1024
- new Grad4(-0.4004672082940195, 0.5029860367700724, -0.7504883828755602, 0.15296486218853164),
1025
- new Grad4(0.15296486218853164, 0.5029860367700724, -0.7504883828755602, -0.4004672082940195),
1026
- new Grad4(0.08164729285680945, 0.4553054119602712, -0.8828161875373585, 0.08164729285680945),
1027
- new Grad4(-0.08164729285680945, 0.8828161875373585, -0.4553054119602712, -0.08164729285680945),
1028
- new Grad4(-0.15296486218853164, 0.7504883828755602, -0.5029860367700724, 0.4004672082940195),
1029
- new Grad4(0.4004672082940195, 0.7504883828755602, -0.5029860367700724, -0.15296486218853164),
1030
- new Grad4(0.3239847771997537, 0.6740059517812944, -0.5794684678643381, 0.3239847771997537),
1031
- new Grad4(-0.3239847771997537, 0.5794684678643381, -0.3239847771997537, -0.6740059517812944),
1032
- new Grad4(-0.4004672082940195, 0.5029860367700724, 0.15296486218853164, -0.7504883828755602),
1033
- new Grad4(0.15296486218853164, 0.5029860367700724, -0.4004672082940195, -0.7504883828755602),
1034
- new Grad4(0.08164729285680945, 0.4553054119602712, 0.08164729285680945, -0.8828161875373585),
1035
- new Grad4(-0.08164729285680945, 0.8828161875373585, -0.08164729285680945, -0.4553054119602712),
1036
- new Grad4(-0.15296486218853164, 0.7504883828755602, 0.4004672082940195, -0.5029860367700724),
1037
- new Grad4(0.4004672082940195, 0.7504883828755602, -0.15296486218853164, -0.5029860367700724),
1038
- new Grad4(0.3239847771997537, 0.6740059517812944, 0.3239847771997537, -0.5794684678643381),
1039
- new Grad4(0.5794684678643381, -0.6740059517812944, -0.3239847771997537, -0.3239847771997537),
1040
- new Grad4(0.5029860367700724, -0.7504883828755602, -0.4004672082940195, 0.15296486218853164),
1041
- new Grad4(0.5029860367700724, -0.7504883828755602, 0.15296486218853164, -0.4004672082940195),
1042
- new Grad4(0.4553054119602712, -0.8828161875373585, 0.08164729285680945, 0.08164729285680945),
1043
- new Grad4(0.8828161875373585, -0.4553054119602712, -0.08164729285680945, -0.08164729285680945),
1044
- new Grad4(0.7504883828755602, -0.5029860367700724, -0.15296486218853164, 0.4004672082940195),
1045
- new Grad4(0.7504883828755602, -0.5029860367700724, 0.4004672082940195, -0.15296486218853164),
1046
- new Grad4(0.6740059517812944, -0.5794684678643381, 0.3239847771997537, 0.3239847771997537),
1047
- new Grad4(0.5794684678643381, -0.3239847771997537, -0.6740059517812944, -0.3239847771997537),
1048
- new Grad4(0.5029860367700724, -0.4004672082940195, -0.7504883828755602, 0.15296486218853164),
1049
- new Grad4(0.5029860367700724, 0.15296486218853164, -0.7504883828755602, -0.4004672082940195),
1050
- new Grad4(0.4553054119602712, 0.08164729285680945, -0.8828161875373585, 0.08164729285680945),
1051
- new Grad4(0.8828161875373585, -0.08164729285680945, -0.4553054119602712, -0.08164729285680945),
1052
- new Grad4(0.7504883828755602, -0.15296486218853164, -0.5029860367700724, 0.4004672082940195),
1053
- new Grad4(0.7504883828755602, 0.4004672082940195, -0.5029860367700724, -0.15296486218853164),
1054
- new Grad4(0.6740059517812944, 0.3239847771997537, -0.5794684678643381, 0.3239847771997537),
1055
- new Grad4(0.5794684678643381, -0.3239847771997537, -0.3239847771997537, -0.6740059517812944),
1056
- new Grad4(0.5029860367700724, -0.4004672082940195, 0.15296486218853164, -0.7504883828755602),
1057
- new Grad4(0.5029860367700724, 0.15296486218853164, -0.4004672082940195, -0.7504883828755602),
1058
- new Grad4(0.4553054119602712, 0.08164729285680945, 0.08164729285680945, -0.8828161875373585),
1059
- new Grad4(0.8828161875373585, -0.08164729285680945, -0.08164729285680945, -0.4553054119602712),
1060
- new Grad4(0.7504883828755602, -0.15296486218853164, 0.4004672082940195, -0.5029860367700724),
1061
- new Grad4(0.7504883828755602, 0.4004672082940195, -0.15296486218853164, -0.5029860367700724),
1062
- new Grad4(0.6740059517812944, 0.3239847771997537, 0.3239847771997537, -0.5794684678643381),
1063
- new Grad4(0.03381941603233842, 0.03381941603233842, 0.03381941603233842, 0.9982828964265062),
1064
- new Grad4(-0.044802370851755174, -0.044802370851755174, 0.508629699630796, 0.8586508742123365),
1065
- new Grad4(-0.044802370851755174, 0.508629699630796, -0.044802370851755174, 0.8586508742123365),
1066
- new Grad4(-0.12128480194602098, 0.4321472685365301, 0.4321472685365301, 0.7821684431180708),
1067
- new Grad4(0.508629699630796, -0.044802370851755174, -0.044802370851755174, 0.8586508742123365),
1068
- new Grad4(0.4321472685365301, -0.12128480194602098, 0.4321472685365301, 0.7821684431180708),
1069
- new Grad4(0.4321472685365301, 0.4321472685365301, -0.12128480194602098, 0.7821684431180708),
1070
- new Grad4(0.37968289875261624, 0.37968289875261624, 0.37968289875261624, 0.753341017856078),
1071
- new Grad4(0.03381941603233842, 0.03381941603233842, 0.9982828964265062, 0.03381941603233842),
1072
- new Grad4(-0.044802370851755174, 0.044802370851755174, 0.8586508742123365, 0.508629699630796),
1073
- new Grad4(-0.044802370851755174, 0.508629699630796, 0.8586508742123365, -0.044802370851755174),
1074
- new Grad4(-0.12128480194602098, 0.4321472685365301, 0.7821684431180708, 0.4321472685365301),
1075
- new Grad4(0.508629699630796, -0.044802370851755174, 0.8586508742123365, -0.044802370851755174),
1076
- new Grad4(0.4321472685365301, -0.12128480194602098, 0.7821684431180708, 0.4321472685365301),
1077
- new Grad4(0.4321472685365301, 0.4321472685365301, 0.7821684431180708, -0.12128480194602098),
1078
- new Grad4(0.37968289875261624, 0.37968289875261624, 0.753341017856078, 0.37968289875261624),
1079
- new Grad4(0.03381941603233842, 0.9982828964265062, 0.03381941603233842, 0.03381941603233842),
1080
- new Grad4(-0.044802370851755174, 0.8586508742123365, -0.044802370851755174, 0.508629699630796),
1081
- new Grad4(-0.044802370851755174, 0.8586508742123365, 0.508629699630796, -0.044802370851755174),
1082
- new Grad4(-0.12128480194602098, 0.7821684431180708, 0.4321472685365301, 0.4321472685365301),
1083
- new Grad4(0.508629699630796, 0.8586508742123365, -0.044802370851755174, -0.044802370851755174),
1084
- new Grad4(0.4321472685365301, 0.7821684431180708, -0.12128480194602098, 0.4321472685365301),
1085
- new Grad4(0.4321472685365301, 0.7821684431180708, 0.4321472685365301, -0.12128480194602098),
1086
- new Grad4(0.37968289875261624, 0.753341017856078, 0.37968289875261624, 0.37968289875261624),
1087
- new Grad4(0.9982828964265062, 0.03381941603233842, 0.03381941603233842, 0.03381941603233842),
1088
- new Grad4(0.8586508742123365, -0.044802370851755174, -0.044802370851755174, 0.508629699630796),
1089
- new Grad4(0.8586508742123365, -0.044802370851755174, 0.508629699630796, -0.044802370851755174),
1090
- new Grad4(0.7821684431180708, -0.12128480194602098, 0.4321472685365301, 0.4321472685365301),
1091
- new Grad4(0.8586508742123365, 0.508629699630796, -0.044802370851755174, -0.044802370851755174),
1092
- new Grad4(0.7821684431180708, 0.4321472685365301, -0.12128480194602098, 0.4321472685365301),
1093
- new Grad4(0.7821684431180708, 0.4321472685365301, 0.4321472685365301, -0.12128480194602098),
1094
- new Grad4(0.753341017856078, 0.37968289875261624, 0.37968289875261624, 0.37968289875261624)
1095
- };
1096
- for (Grad4 grad41 : grad4) {
1097
- grad41.dx /= N4;
1098
- grad41.dy /= N4;
1099
- grad41.dz /= N4;
1100
- grad41.dw /= N4;
1101
- }
1102
- for (int i = 0; i < PSIZE; i++) {
1103
- GRADIENTS_4D[i] = grad4[i % grad4.length];
1104
- }
1105
- }
1106
- }
1
+ package monkstone.noise;
2
+
3
+ /**
4
+ * K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
5
+ *
6
+ * - 2D is standard simplex, modified to support larger kernels. Implemented
7
+ * using a lookup table. - 3D is "Re-oriented 8-point BCC noise" which
8
+ * constructs a congruent BCC lattice in a much different way than usual. - 4D
9
+ * uses a naïve pregenerated lookup table, and averages out to the expected
10
+ * performance.
11
+ *
12
+ * Multiple versions of each function are provided. See the documentation above
13
+ * each, for more info.
14
+ */
15
+ public class OpenSimplex2S {
16
+
17
+ private static final int PSIZE = 2048;
18
+ private static final int PMASK = 2047;
19
+
20
+ private final short[] perm;
21
+ private final Grad2[] permGrad2;
22
+ private final Grad3[] permGrad3;
23
+ private final Grad4[] permGrad4;
24
+
25
+ /**
26
+ *
27
+ * @param seed
28
+ */
29
+ public OpenSimplex2S(long seed) {
30
+ perm = new short[PSIZE];
31
+ permGrad2 = new Grad2[PSIZE];
32
+ permGrad3 = new Grad3[PSIZE];
33
+ permGrad4 = new Grad4[PSIZE];
34
+ short[] source = new short[PSIZE];
35
+ for (short i = 0; i < PSIZE; i++) {
36
+ source[i] = i;
37
+ }
38
+ for (int i = PSIZE - 1; i >= 0; i--) {
39
+ seed = seed * 6364136223846793005L + 1442695040888963407L;
40
+ int r = (int) ((seed + 31) % (i + 1));
41
+ if (r < 0) {
42
+ r += i + 1;
43
+ }
44
+ perm[i] = source[r];
45
+ permGrad2[i] = GRADIENTS_2D[perm[i]];
46
+ permGrad3[i] = GRADIENTS_3D[perm[i]];
47
+ permGrad4[i] = GRADIENTS_4D[perm[i]];
48
+ source[r] = source[i];
49
+ }
50
+ }
51
+
52
+ /*
53
+ * Noise Evaluators
54
+ */
55
+ /**
56
+ * 2D SuperSimplex noise, standard lattice orientation.
57
+ *
58
+ * @param x
59
+ * @param y
60
+ * @return
61
+ */
62
+ public double noise2(double x, double y) {
63
+
64
+ // Get points for A2* lattice
65
+ double s = 0.366025403784439 * (x + y);
66
+ double xs = x + s, ys = y + s;
67
+
68
+ return noise2_Base(xs, ys);
69
+ }
70
+
71
+ /**
72
+ * 2D SuperSimplex noise, with Y pointing down the main diagonal.Might be
73
+ * better for a 2D sandbox style game, where Y is vertical.Probably slightly
74
+ * less optimal for heightmaps or continent maps.
75
+ *
76
+ * @param x
77
+ * @param y
78
+ * @return
79
+ */
80
+ public double noise2_XBeforeY(double x, double y) {
81
+
82
+ // Skew transform and rotation baked into one.
83
+ double xx = x * 0.7071067811865476;
84
+ double yy = y * 1.224744871380249;
85
+
86
+ return noise2_Base(yy + xx, yy - xx);
87
+ }
88
+
89
+ /**
90
+ * 2D SuperSimplex noise base. Lookup table implementation inspired by
91
+ * DigitalShadow.
92
+ */
93
+ private double noise2_Base(double xs, double ys) {
94
+ double value = 0;
95
+
96
+ // Get base points and offsets
97
+ int xsb = fastFloor(xs), ysb = fastFloor(ys);
98
+ double xsi = xs - xsb, ysi = ys - ysb;
99
+
100
+ // Index to point list
101
+ int a = (int) (xsi + ysi);
102
+ int index
103
+ = (a << 2)
104
+ | (int) (xsi - ysi / 2 + 1 - a / 2.0) << 3
105
+ | (int) (ysi - xsi / 2 + 1 - a / 2.0) << 4;
106
+
107
+ double ssi = (xsi + ysi) * -0.211324865405187;
108
+ double xi = xsi + ssi, yi = ysi + ssi;
109
+
110
+ // Point contributions
111
+ for (int i = 0; i < 4; i++) {
112
+ LatticePoint2D c = LOOKUP_2D[index + i];
113
+
114
+ double dx = xi + c.dx, dy = yi + c.dy;
115
+ double attn = 2.0 / 3.0 - dx * dx - dy * dy;
116
+ if (attn <= 0) {
117
+ continue;
118
+ }
119
+
120
+ int pxm = (xsb + c.xsv) & PMASK, pym = (ysb + c.ysv) & PMASK;
121
+ Grad2 grad = permGrad2[perm[pxm] ^ pym];
122
+ double extrapolation = grad.dx * dx + grad.dy * dy;
123
+
124
+ attn *= attn;
125
+ value += attn * attn * extrapolation;
126
+ }
127
+
128
+ return value;
129
+ }
130
+
131
+ /**
132
+ * 3D Re-oriented 8-point BCC noise, classic orientation Proper substitute
133
+ * for what 3D SuperSimplex would be, in light of Forbidden Formulae.Use
134
+ * noise3_XYBeforeZ or noise3_XZBeforeY instead, wherever appropriate.
135
+ *
136
+ * @param x
137
+ * @param y
138
+ * @param z
139
+ * @return
140
+ */
141
+ public double noise3_Classic(double x, double y, double z) {
142
+
143
+ // Re-orient the cubic lattices via rotation, to produce the expected look on cardinal planar slices.
144
+ // If texturing objects that don't tend to have cardinal plane faces, you could even remove this.
145
+ // Orthonormal rotation. Not a skew transform.
146
+ double r = (2.0 / 3.0) * (x + y + z);
147
+ double xr = r - x, yr = r - y, zr = r - z;
148
+
149
+ // Evaluate both lattices to form a BCC lattice.
150
+ return noise3_BCC(xr, yr, zr);
151
+ }
152
+
153
+ /**
154
+ * 3D Re-oriented 8-point BCC noise, with better visual isotropy in (X,
155
+ * Y).Recommended for 3D terrain and time-varied animations.The Z coordinate
156
+ * should always be the "different" coordinate in your use case.If Y is
157
+ * vertical in world coordinates, call noise3_XYBeforeZ(x, z, Y) or use
158
+ * noise3_XZBeforeY.If Z is vertical in world coordinates, call
159
+ * noise3_XYBeforeZ(x, y, Z). For a time varied animation, call
160
+ * noise3_XYBeforeZ(x, y, T).
161
+ *
162
+ * @param x
163
+ * @param z
164
+ * @param y
165
+ * @return
166
+ */
167
+ public double noise3_XYBeforeZ(double x, double y, double z) {
168
+
169
+ // Re-orient the cubic lattices without skewing, to make X and Y triangular like 2D.
170
+ // Orthonormal rotation. Not a skew transform.
171
+ double xy = x + y;
172
+ double s2 = xy * -0.211324865405187;
173
+ double zz = z * 0.577350269189626;
174
+ double xr = x + s2 - zz, yr = y + s2 - zz;
175
+ double zr = xy * 0.577350269189626 + zz;
176
+
177
+ // Evaluate both lattices to form a BCC lattice.
178
+ return noise3_BCC(xr, yr, zr);
179
+ }
180
+
181
+ /**
182
+ * 3D Re-oriented 8-point BCC noise, with better visual isotropy in (X,
183
+ * Z).Recommended for 3D terrain and time-varied animations.The Y coordinate
184
+ * should always be the "different" coordinate in your use case.If Y is
185
+ * vertical in world coordinates, call noise3_XZBeforeY(x, Y, z).If Z is
186
+ * vertical in world coordinates, call noise3_XZBeforeY(x, Z, y) or use
187
+ * noise3_XYBeforeZ. For a time varied animation, call noise3_XZBeforeY(x,
188
+ * T, y) or use noise3_XYBeforeZ.
189
+ *
190
+ * @param x
191
+ * @param y
192
+ * @param z
193
+ * @return
194
+ */
195
+ public double noise3_XZBeforeY(double x, double y, double z) {
196
+
197
+ // Re-orient the cubic lattices without skewing, to make X and Z triangular like 2D.
198
+ // Orthonormal rotation. Not a skew transform.
199
+ double xz = x + z;
200
+ double s2 = xz * -0.211324865405187;
201
+ double yy = y * 0.577350269189626;
202
+ double xr = x + s2 - yy;
203
+ double zr = z + s2 - yy;
204
+ double yr = xz * 0.577350269189626 + yy;
205
+
206
+ // Evaluate both lattices to form a BCC lattice.
207
+ return noise3_BCC(xr, yr, zr);
208
+ }
209
+
210
+ /**
211
+ * Generate overlapping cubic lattices for 3D Re-oriented BCC noise. Lookup
212
+ * table implementation inspired by DigitalShadow. It was actually faster to
213
+ * narrow down the points in the loop itself, than to build up the index
214
+ * with enough info to isolate 8 points.
215
+ */
216
+ private double noise3_BCC(double xr, double yr, double zr) {
217
+
218
+ // Get base and offsets inside cube of first lattice.
219
+ int xrb = fastFloor(xr), yrb = fastFloor(yr), zrb = fastFloor(zr);
220
+ double xri = xr - xrb, yri = yr - yrb, zri = zr - zrb;
221
+
222
+ // Identify which octant of the cube we're in. This determines which cell
223
+ // in the other cubic lattice we're in, and also narrows down one point on each.
224
+ int xht = (int) (xri + 0.5), yht = (int) (yri + 0.5), zht = (int) (zri + 0.5);
225
+ int index = (xht) | (yht << 1) | (zht << 2);
226
+
227
+ // Point contributions
228
+ double value = 0;
229
+ LatticePoint3D c = LOOKUP_3D[index];
230
+ while (c != null) {
231
+ double dxr = xri + c.dxr, dyr = yri + c.dyr, dzr = zri + c.dzr;
232
+ double attn = 0.75 - dxr * dxr - dyr * dyr - dzr * dzr;
233
+ if (attn < 0) {
234
+ c = c.nextOnFailure;
235
+ } else {
236
+ int pxm = (xrb + c.xrv) & PMASK, pym = (yrb + c.yrv) & PMASK, pzm = (zrb + c.zrv) & PMASK;
237
+ Grad3 grad = permGrad3[perm[perm[pxm] ^ pym] ^ pzm];
238
+ double extrapolation = grad.dx * dxr + grad.dy * dyr + grad.dz * dzr;
239
+
240
+ attn *= attn;
241
+ value += attn * attn * extrapolation;
242
+ c = c.nextOnSuccess;
243
+ }
244
+ }
245
+ return value;
246
+ }
247
+
248
+ /**
249
+ * 4D SuperSimplex noise, classic lattice orientation.
250
+ *
251
+ * @param x
252
+ * @param y
253
+ * @param z
254
+ * @param w
255
+ * @return
256
+ */
257
+ public double noise4_Classic(double x, double y, double z, double w) {
258
+
259
+ // Get points for A4 lattice
260
+ double s = 0.309016994374947 * (x + y + z + w);
261
+ double xs = x + s, ys = y + s, zs = z + s, ws = w + s;
262
+
263
+ return noise4_Base(xs, ys, zs, ws);
264
+ }
265
+
266
+ /**
267
+ * 4D SuperSimplex noise, with XY and ZW forming orthogonal triangular-based
268
+ * planes.Recommended for 3D terrain, where X and Y (or Z and W) are
269
+ * horizontal.Recommended for noise(x, y, sin(time), cos(time)) trick.
270
+ *
271
+ * @param x
272
+ * @param y
273
+ * @param z
274
+ * @param w
275
+ * @return
276
+ */
277
+ public double noise4_XYBeforeZW(double x, double y, double z, double w) {
278
+
279
+ double s2 = (x + y) * -0.28522513987434876941 + (z + w) * 0.83897065470611435718;
280
+ double t2 = (z + w) * 0.21939749883706435719 + (x + y) * -0.48214856493302476942;
281
+ double xs = x + s2, ys = y + s2, zs = z + t2, ws = w + t2;
282
+
283
+ return noise4_Base(xs, ys, zs, ws);
284
+ }
285
+
286
+ /**
287
+ * 4D SuperSimplex noise, with XZ and YW forming orthogonal triangular-based
288
+ * planes.Recommended for 3D terrain, where X and Z (or Y and W) are
289
+ * horizontal.
290
+ *
291
+ * @param x
292
+ * @param y
293
+ * @param z
294
+ * @param w
295
+ * @return
296
+ */
297
+ public double noise4_XZBeforeYW(double x, double y, double z, double w) {
298
+
299
+ double s2 = (x + z) * -0.28522513987434876941 + (y + w) * 0.83897065470611435718;
300
+ double t2 = (y + w) * 0.21939749883706435719 + (x + z) * -0.48214856493302476942;
301
+ double xs = x + s2, ys = y + t2, zs = z + s2, ws = w + t2;
302
+
303
+ return noise4_Base(xs, ys, zs, ws);
304
+ }
305
+
306
+ /**
307
+ * 4D SuperSimplex noise, with XYZ oriented like noise3_Classic, and W for
308
+ * an extra degree of freedom.Recommended for time-varied animations which
309
+ * texture a 3D object (W=time)
310
+ *
311
+ * @param x
312
+ * @param y
313
+ * @param z
314
+ * @param w
315
+ * @return
316
+ */
317
+ public double noise4_XYZBeforeW(double x, double y, double z, double w) {
318
+
319
+ double xyz = x + y + z;
320
+ double ww = w * 1.118033988749894;
321
+ double s2 = xyz * -0.16666666666666666 + ww;
322
+ double xs = x + s2, ys = y + s2, zs = z + s2, ws = -0.5 * xyz + ww;
323
+
324
+ return noise4_Base(xs, ys, zs, ws);
325
+ }
326
+
327
+ /**
328
+ * 4D SuperSimplex noise base. Using ultra-simple 4x4x4x4 lookup
329
+ * partitioning. This isn't as elegant or SIMD/GPU/etc. portable as other
330
+ * approaches, but it does compete performance-wise with optimized
331
+ * OpenSimplex1.
332
+ */
333
+ private double noise4_Base(double xs, double ys, double zs, double ws) {
334
+ double value = 0;
335
+
336
+ // Get base points and offsets
337
+ int xsb = fastFloor(xs), ysb = fastFloor(ys), zsb = fastFloor(zs), wsb = fastFloor(ws);
338
+ double xsi = xs - xsb, ysi = ys - ysb, zsi = zs - zsb, wsi = ws - wsb;
339
+
340
+ // Unskewed offsets
341
+ double ssi = (xsi + ysi + zsi + wsi) * -0.138196601125011;
342
+ double xi = xsi + ssi, yi = ysi + ssi, zi = zsi + ssi, wi = wsi + ssi;
343
+
344
+ int index = ((fastFloor(xs * 4) & 3))
345
+ | ((fastFloor(ys * 4) & 3) << 2)
346
+ | ((fastFloor(zs * 4) & 3) << 4)
347
+ | ((fastFloor(ws * 4) & 3) << 6);
348
+
349
+ // Point contributions
350
+ for (LatticePoint4D c : LOOKUP_4D[index]) {
351
+ double dx = xi + c.dx, dy = yi + c.dy, dz = zi + c.dz, dw = wi + c.dw;
352
+ double attn = 0.8 - dx * dx - dy * dy - dz * dz - dw * dw;
353
+ if (attn > 0) {
354
+ attn *= attn;
355
+
356
+ int pxm = (xsb + c.xsv) & PMASK, pym = (ysb + c.ysv) & PMASK;
357
+ int pzm = (zsb + c.zsv) & PMASK, pwm = (wsb + c.wsv) & PMASK;
358
+ Grad4 grad = permGrad4[perm[perm[perm[pxm] ^ pym] ^ pzm] ^ pwm];
359
+ double extrapolation = grad.dx * dx + grad.dy * dy + grad.dz * dz + grad.dw * dw;
360
+
361
+ value += attn * attn * extrapolation;
362
+ }
363
+ }
364
+ return value;
365
+ }
366
+
367
+ /*
368
+ * Utility
369
+ */
370
+ private static int fastFloor(double x) {
371
+ int xi = (int) x;
372
+ return x < xi ? xi - 1 : xi;
373
+ }
374
+
375
+ /*
376
+ * Definitions
377
+ */
378
+ private static final LatticePoint2D[] LOOKUP_2D;
379
+ private static final LatticePoint3D[] LOOKUP_3D;
380
+ private static final LatticePoint4D[][] LOOKUP_4D;
381
+
382
+ static {
383
+ LOOKUP_2D = new LatticePoint2D[8 * 4];
384
+ LOOKUP_3D = new LatticePoint3D[8];
385
+ LOOKUP_4D = new LatticePoint4D[256][];
386
+
387
+ for (int i = 0; i < 8; i++) {
388
+ int i1, j1, i2, j2;
389
+ if ((i & 1) == 0) {
390
+ if ((i & 2) == 0) {
391
+ i1 = -1;
392
+ j1 = 0;
393
+ } else {
394
+ i1 = 1;
395
+ j1 = 0;
396
+ }
397
+ if ((i & 4) == 0) {
398
+ i2 = 0;
399
+ j2 = -1;
400
+ } else {
401
+ i2 = 0;
402
+ j2 = 1;
403
+ }
404
+ } else {
405
+ if ((i & 2) != 0) {
406
+ i1 = 2;
407
+ j1 = 1;
408
+ } else {
409
+ i1 = 0;
410
+ j1 = 1;
411
+ }
412
+ if ((i & 4) != 0) {
413
+ i2 = 1;
414
+ j2 = 2;
415
+ } else {
416
+ i2 = 1;
417
+ j2 = 0;
418
+ }
419
+ }
420
+ LOOKUP_2D[i * 4 + 0] = new LatticePoint2D(0, 0);
421
+ LOOKUP_2D[i * 4 + 1] = new LatticePoint2D(1, 1);
422
+ LOOKUP_2D[i * 4 + 2] = new LatticePoint2D(i1, j1);
423
+ LOOKUP_2D[i * 4 + 3] = new LatticePoint2D(i2, j2);
424
+ }
425
+
426
+ for (int i = 0; i < 8; i++) {
427
+ int i1, j1, k1, i2, j2, k2;
428
+ i1 = (i) & 1;
429
+ j1 = (i >> 1) & 1;
430
+ k1 = (i >> 2) & 1;
431
+ i2 = i1 ^ 1;
432
+ j2 = j1 ^ 1;
433
+ k2 = k1 ^ 1;
434
+
435
+ // The two points within this octant, one from each of the two cubic half-lattices.
436
+ LatticePoint3D c0 = new LatticePoint3D(i1, j1, k1, 0);
437
+ LatticePoint3D c1 = new LatticePoint3D(i1 + i2, j1 + j2, k1 + k2, 1);
438
+
439
+ // (1, 0, 0) vs (0, 1, 1) away from octant.
440
+ LatticePoint3D c2 = new LatticePoint3D(i1 ^ 1, j1, k1, 0);
441
+ LatticePoint3D c3 = new LatticePoint3D(i1, j1 ^ 1, k1 ^ 1, 0);
442
+
443
+ // (1, 0, 0) vs (0, 1, 1) away from octant, on second half-lattice.
444
+ LatticePoint3D c4 = new LatticePoint3D(i1 + (i2 ^ 1), j1 + j2, k1 + k2, 1);
445
+ LatticePoint3D c5 = new LatticePoint3D(i1 + i2, j1 + (j2 ^ 1), k1 + (k2 ^ 1), 1);
446
+
447
+ // (0, 1, 0) vs (1, 0, 1) away from octant.
448
+ LatticePoint3D c6 = new LatticePoint3D(i1, j1 ^ 1, k1, 0);
449
+ LatticePoint3D c7 = new LatticePoint3D(i1 ^ 1, j1, k1 ^ 1, 0);
450
+
451
+ // (0, 1, 0) vs (1, 0, 1) away from octant, on second half-lattice.
452
+ LatticePoint3D c8 = new LatticePoint3D(i1 + i2, j1 + (j2 ^ 1), k1 + k2, 1);
453
+ LatticePoint3D c9 = new LatticePoint3D(i1 + (i2 ^ 1), j1 + j2, k1 + (k2 ^ 1), 1);
454
+
455
+ // (0, 0, 1) vs (1, 1, 0) away from octant.
456
+ LatticePoint3D cA = new LatticePoint3D(i1, j1, k1 ^ 1, 0);
457
+ LatticePoint3D cB = new LatticePoint3D(i1 ^ 1, j1 ^ 1, k1, 0);
458
+
459
+ // (0, 0, 1) vs (1, 1, 0) away from octant, on second half-lattice.
460
+ LatticePoint3D cC = new LatticePoint3D(i1 + i2, j1 + j2, k1 + (k2 ^ 1), 1);
461
+ LatticePoint3D cD = new LatticePoint3D(i1 + (i2 ^ 1), j1 + (j2 ^ 1), k1 + k2, 1);
462
+
463
+ // First two points are guaranteed.
464
+ c0.nextOnFailure = c0.nextOnSuccess = c1;
465
+ c1.nextOnFailure = c1.nextOnSuccess = c2;
466
+
467
+ // If c2 is in range, then we know c3 and c4 are not.
468
+ c2.nextOnFailure = c3;
469
+ c2.nextOnSuccess = c5;
470
+ c3.nextOnFailure = c4;
471
+ c3.nextOnSuccess = c4;
472
+
473
+ // If c4 is in range, then we know c5 is not.
474
+ c4.nextOnFailure = c5;
475
+ c4.nextOnSuccess = c6;
476
+ c5.nextOnFailure = c5.nextOnSuccess = c6;
477
+
478
+ // If c6 is in range, then we know c7 and c8 are not.
479
+ c6.nextOnFailure = c7;
480
+ c6.nextOnSuccess = c9;
481
+ c7.nextOnFailure = c8;
482
+ c7.nextOnSuccess = c8;
483
+
484
+ // If c8 is in range, then we know c9 is not.
485
+ c8.nextOnFailure = c9;
486
+ c8.nextOnSuccess = cA;
487
+ c9.nextOnFailure = c9.nextOnSuccess = cA;
488
+
489
+ // If cA is in range, then we know cB and cC are not.
490
+ cA.nextOnFailure = cB;
491
+ cA.nextOnSuccess = cD;
492
+ cB.nextOnFailure = cC;
493
+ cB.nextOnSuccess = cC;
494
+
495
+ // If cC is in range, then we know cD is not.
496
+ cC.nextOnFailure = cD;
497
+ cC.nextOnSuccess = null;
498
+ cD.nextOnFailure = cD.nextOnSuccess = null;
499
+
500
+ LOOKUP_3D[i] = c0;
501
+ }
502
+
503
+ int[][] lookup4DPregen = {
504
+ {0x15, 0x45, 0x51, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
505
+ {0x15, 0x45, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA6, 0xAA},
506
+ {0x01, 0x05, 0x11, 0x15, 0x41, 0x45, 0x51, 0x55, 0x56, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xAA},
507
+ {0x01, 0x15, 0x16, 0x45, 0x46, 0x51, 0x52, 0x55, 0x56, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
508
+ {0x15, 0x45, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA9, 0xAA},
509
+ {0x05, 0x15, 0x45, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xAA},
510
+ {0x05, 0x15, 0x45, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xAA},
511
+ {0x05, 0x15, 0x16, 0x45, 0x46, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xAA, 0xAB},
512
+ {0x04, 0x05, 0x14, 0x15, 0x44, 0x45, 0x54, 0x55, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA},
513
+ {0x05, 0x15, 0x45, 0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xAA},
514
+ {0x05, 0x15, 0x45, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x9A, 0xAA},
515
+ {0x05, 0x15, 0x16, 0x45, 0x46, 0x55, 0x56, 0x59, 0x5A, 0x5B, 0x6A, 0x9A, 0xAA, 0xAB},
516
+ {0x04, 0x15, 0x19, 0x45, 0x49, 0x54, 0x55, 0x58, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
517
+ {0x05, 0x15, 0x19, 0x45, 0x49, 0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xAA, 0xAE},
518
+ {0x05, 0x15, 0x19, 0x45, 0x49, 0x55, 0x56, 0x59, 0x5A, 0x5E, 0x6A, 0x9A, 0xAA, 0xAE},
519
+ {0x05, 0x15, 0x1A, 0x45, 0x4A, 0x55, 0x56, 0x59, 0x5A, 0x5B, 0x5E, 0x6A, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
520
+ {0x15, 0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0xA5, 0xA6, 0xA9, 0xAA},
521
+ {0x11, 0x15, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0xA5, 0xA6, 0xAA},
522
+ {0x11, 0x15, 0x51, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x96, 0xA6, 0xAA},
523
+ {0x11, 0x15, 0x16, 0x51, 0x52, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x96, 0xA6, 0xAA, 0xAB},
524
+ {0x14, 0x15, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x99, 0xA5, 0xA9, 0xAA},
525
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x9A, 0xA6, 0xA9, 0xAA},
526
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
527
+ {0x15, 0x16, 0x55, 0x56, 0x5A, 0x66, 0x6A, 0x6B, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
528
+ {0x14, 0x15, 0x54, 0x55, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x99, 0xA9, 0xAA},
529
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
530
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x9A, 0xAA},
531
+ {0x15, 0x16, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x6B, 0x9A, 0xAA, 0xAB},
532
+ {0x14, 0x15, 0x19, 0x54, 0x55, 0x58, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x99, 0xA9, 0xAA, 0xAE},
533
+ {0x15, 0x19, 0x55, 0x59, 0x5A, 0x69, 0x6A, 0x6E, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
534
+ {0x15, 0x19, 0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x6E, 0x9A, 0xAA, 0xAE},
535
+ {0x15, 0x1A, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x6B, 0x6E, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
536
+ {0x10, 0x11, 0x14, 0x15, 0x50, 0x51, 0x54, 0x55, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA},
537
+ {0x11, 0x15, 0x51, 0x55, 0x56, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xAA},
538
+ {0x11, 0x15, 0x51, 0x55, 0x56, 0x65, 0x66, 0x6A, 0xA6, 0xAA},
539
+ {0x11, 0x15, 0x16, 0x51, 0x52, 0x55, 0x56, 0x65, 0x66, 0x67, 0x6A, 0xA6, 0xAA, 0xAB},
540
+ {0x14, 0x15, 0x54, 0x55, 0x59, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA9, 0xAA},
541
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
542
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA6, 0xAA},
543
+ {0x15, 0x16, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x6B, 0xA6, 0xAA, 0xAB},
544
+ {0x14, 0x15, 0x54, 0x55, 0x59, 0x65, 0x69, 0x6A, 0xA9, 0xAA},
545
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA9, 0xAA},
546
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xAA},
547
+ {0x15, 0x16, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x6B, 0xAA, 0xAB},
548
+ {0x14, 0x15, 0x19, 0x54, 0x55, 0x58, 0x59, 0x65, 0x69, 0x6A, 0x6D, 0xA9, 0xAA, 0xAE},
549
+ {0x15, 0x19, 0x55, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x6E, 0xA9, 0xAA, 0xAE},
550
+ {0x15, 0x19, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x6E, 0xAA, 0xAE},
551
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x69, 0x6A, 0x6B, 0x6E, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
552
+ {0x10, 0x15, 0x25, 0x51, 0x54, 0x55, 0x61, 0x64, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
553
+ {0x11, 0x15, 0x25, 0x51, 0x55, 0x56, 0x61, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xAA, 0xBA},
554
+ {0x11, 0x15, 0x25, 0x51, 0x55, 0x56, 0x61, 0x65, 0x66, 0x6A, 0x76, 0xA6, 0xAA, 0xBA},
555
+ {0x11, 0x15, 0x26, 0x51, 0x55, 0x56, 0x62, 0x65, 0x66, 0x67, 0x6A, 0x76, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
556
+ {0x14, 0x15, 0x25, 0x54, 0x55, 0x59, 0x64, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA9, 0xAA, 0xBA},
557
+ {0x15, 0x25, 0x55, 0x65, 0x66, 0x69, 0x6A, 0x7A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
558
+ {0x15, 0x25, 0x55, 0x56, 0x65, 0x66, 0x69, 0x6A, 0x7A, 0xA6, 0xAA, 0xBA},
559
+ {0x15, 0x26, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x6B, 0x7A, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
560
+ {0x14, 0x15, 0x25, 0x54, 0x55, 0x59, 0x64, 0x65, 0x69, 0x6A, 0x79, 0xA9, 0xAA, 0xBA},
561
+ {0x15, 0x25, 0x55, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x7A, 0xA9, 0xAA, 0xBA},
562
+ {0x15, 0x25, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x7A, 0xAA, 0xBA},
563
+ {0x15, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x6B, 0x7A, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
564
+ {0x14, 0x15, 0x29, 0x54, 0x55, 0x59, 0x65, 0x68, 0x69, 0x6A, 0x6D, 0x79, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
565
+ {0x15, 0x29, 0x55, 0x59, 0x65, 0x69, 0x6A, 0x6E, 0x7A, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
566
+ {0x15, 0x55, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x6E, 0x7A, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
567
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x6B, 0x6E, 0x7A, 0xAA, 0xAB, 0xAE, 0xBA, 0xBF},
568
+ {0x45, 0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
569
+ {0x41, 0x45, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xAA},
570
+ {0x41, 0x45, 0x51, 0x55, 0x56, 0x5A, 0x66, 0x95, 0x96, 0x9A, 0xA6, 0xAA},
571
+ {0x41, 0x45, 0x46, 0x51, 0x52, 0x55, 0x56, 0x5A, 0x66, 0x95, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
572
+ {0x44, 0x45, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x69, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA9, 0xAA},
573
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xA9, 0xAA},
574
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xAA, 0xAB},
575
+ {0x45, 0x46, 0x55, 0x56, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0x9B, 0xA6, 0xAA, 0xAB},
576
+ {0x44, 0x45, 0x54, 0x55, 0x59, 0x5A, 0x69, 0x95, 0x99, 0x9A, 0xA9, 0xAA},
577
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
578
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xAA},
579
+ {0x45, 0x46, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x96, 0x9A, 0x9B, 0xAA, 0xAB},
580
+ {0x44, 0x45, 0x49, 0x54, 0x55, 0x58, 0x59, 0x5A, 0x69, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
581
+ {0x45, 0x49, 0x55, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0x9E, 0xA9, 0xAA, 0xAE},
582
+ {0x45, 0x49, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x99, 0x9A, 0x9E, 0xAA, 0xAE},
583
+ {0x45, 0x4A, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x9A, 0x9B, 0x9E, 0xAA, 0xAB, 0xAE, 0xAF},
584
+ {0x50, 0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x66, 0x69, 0x95, 0x96, 0x99, 0xA5, 0xA6, 0xA9, 0xAA},
585
+ {0x51, 0x55, 0x56, 0x59, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
586
+ {0x51, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xAA, 0xAB},
587
+ {0x51, 0x52, 0x55, 0x56, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xA7, 0xAA, 0xAB},
588
+ {0x54, 0x55, 0x56, 0x59, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
589
+ {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
590
+ {0x15, 0x45, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
591
+ {0x55, 0x56, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
592
+ {0x54, 0x55, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xAE},
593
+ {0x15, 0x45, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
594
+ {0x15, 0x45, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xA9, 0xAA, 0xAB, 0xAE},
595
+ {0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
596
+ {0x54, 0x55, 0x58, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAD, 0xAE},
597
+ {0x55, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
598
+ {0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
599
+ {0x55, 0x56, 0x59, 0x5A, 0x6A, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
600
+ {0x50, 0x51, 0x54, 0x55, 0x65, 0x66, 0x69, 0x95, 0xA5, 0xA6, 0xA9, 0xAA},
601
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
602
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x95, 0x96, 0xA5, 0xA6, 0xAA},
603
+ {0x51, 0x52, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x96, 0xA6, 0xA7, 0xAA, 0xAB},
604
+ {0x54, 0x55, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
605
+ {0x15, 0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
606
+ {0x15, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xBA},
607
+ {0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
608
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x6A, 0x95, 0x99, 0xA5, 0xA9, 0xAA},
609
+ {0x15, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAE, 0xBA},
610
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x9A, 0xA6, 0xA9, 0xAA},
611
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
612
+ {0x54, 0x55, 0x58, 0x59, 0x65, 0x69, 0x6A, 0x99, 0xA9, 0xAA, 0xAD, 0xAE},
613
+ {0x55, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
614
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
615
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x69, 0x6A, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
616
+ {0x50, 0x51, 0x54, 0x55, 0x61, 0x64, 0x65, 0x66, 0x69, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
617
+ {0x51, 0x55, 0x61, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xB6, 0xBA},
618
+ {0x51, 0x55, 0x56, 0x61, 0x65, 0x66, 0x6A, 0xA5, 0xA6, 0xAA, 0xB6, 0xBA},
619
+ {0x51, 0x55, 0x56, 0x62, 0x65, 0x66, 0x6A, 0xA6, 0xA7, 0xAA, 0xAB, 0xB6, 0xBA, 0xBB},
620
+ {0x54, 0x55, 0x64, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xB9, 0xBA},
621
+ {0x55, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
622
+ {0x55, 0x56, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
623
+ {0x55, 0x56, 0x65, 0x66, 0x6A, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
624
+ {0x54, 0x55, 0x59, 0x64, 0x65, 0x69, 0x6A, 0xA5, 0xA9, 0xAA, 0xB9, 0xBA},
625
+ {0x55, 0x59, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
626
+ {0x15, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
627
+ {0x15, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
628
+ {0x54, 0x55, 0x59, 0x65, 0x68, 0x69, 0x6A, 0xA9, 0xAA, 0xAD, 0xAE, 0xB9, 0xBA, 0xBE},
629
+ {0x55, 0x59, 0x65, 0x69, 0x6A, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
630
+ {0x15, 0x55, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
631
+ {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0xAA, 0xAB, 0xAE, 0xBA, 0xBF},
632
+ {0x40, 0x41, 0x44, 0x45, 0x50, 0x51, 0x54, 0x55, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
633
+ {0x41, 0x45, 0x51, 0x55, 0x56, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xAA},
634
+ {0x41, 0x45, 0x51, 0x55, 0x56, 0x95, 0x96, 0x9A, 0xA6, 0xAA},
635
+ {0x41, 0x45, 0x46, 0x51, 0x52, 0x55, 0x56, 0x95, 0x96, 0x97, 0x9A, 0xA6, 0xAA, 0xAB},
636
+ {0x44, 0x45, 0x54, 0x55, 0x59, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA9, 0xAA},
637
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
638
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xAA},
639
+ {0x45, 0x46, 0x55, 0x56, 0x5A, 0x95, 0x96, 0x9A, 0x9B, 0xA6, 0xAA, 0xAB},
640
+ {0x44, 0x45, 0x54, 0x55, 0x59, 0x95, 0x99, 0x9A, 0xA9, 0xAA},
641
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA9, 0xAA},
642
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xAA},
643
+ {0x45, 0x46, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0x9B, 0xAA, 0xAB},
644
+ {0x44, 0x45, 0x49, 0x54, 0x55, 0x58, 0x59, 0x95, 0x99, 0x9A, 0x9D, 0xA9, 0xAA, 0xAE},
645
+ {0x45, 0x49, 0x55, 0x59, 0x5A, 0x95, 0x99, 0x9A, 0x9E, 0xA9, 0xAA, 0xAE},
646
+ {0x45, 0x49, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0x9E, 0xAA, 0xAE},
647
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x96, 0x99, 0x9A, 0x9B, 0x9E, 0xAA, 0xAB, 0xAE, 0xAF},
648
+ {0x50, 0x51, 0x54, 0x55, 0x65, 0x95, 0x96, 0x99, 0xA5, 0xA6, 0xA9, 0xAA},
649
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
650
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xAA},
651
+ {0x51, 0x52, 0x55, 0x56, 0x66, 0x95, 0x96, 0x9A, 0xA6, 0xA7, 0xAA, 0xAB},
652
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
653
+ {0x45, 0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
654
+ {0x45, 0x51, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xEA},
655
+ {0x55, 0x56, 0x5A, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA6, 0xAA, 0xAB},
656
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA},
657
+ {0x45, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAE, 0xEA},
658
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xA9, 0xAA},
659
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x66, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xAA, 0xAB},
660
+ {0x54, 0x55, 0x58, 0x59, 0x69, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xAD, 0xAE},
661
+ {0x55, 0x59, 0x5A, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
662
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA9, 0xAA, 0xAE},
663
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x6A, 0x96, 0x99, 0x9A, 0xAA, 0xAB, 0xAE, 0xAF},
664
+ {0x50, 0x51, 0x54, 0x55, 0x65, 0x95, 0xA5, 0xA6, 0xA9, 0xAA},
665
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA},
666
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xAA},
667
+ {0x51, 0x52, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xA7, 0xAA, 0xAB},
668
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA},
669
+ {0x51, 0x54, 0x55, 0x56, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA, 0xEA},
670
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
671
+ {0x51, 0x55, 0x56, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xAA, 0xAB},
672
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA9, 0xAA},
673
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
674
+ {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA},
675
+ {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA6, 0xA9, 0xAA, 0xAB},
676
+ {0x54, 0x55, 0x58, 0x59, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA9, 0xAA, 0xAD, 0xAE},
677
+ {0x54, 0x55, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xAE},
678
+ {0x55, 0x56, 0x59, 0x5A, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA6, 0xA9, 0xAA, 0xAE},
679
+ {0x55, 0x56, 0x59, 0x5A, 0x66, 0x69, 0x6A, 0x96, 0x99, 0x9A, 0xA6, 0xA9, 0xAA, 0xAB, 0xAE, 0xAF},
680
+ {0x50, 0x51, 0x54, 0x55, 0x61, 0x64, 0x65, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xB5, 0xBA},
681
+ {0x51, 0x55, 0x61, 0x65, 0x66, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xB6, 0xBA},
682
+ {0x51, 0x55, 0x56, 0x61, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xAA, 0xB6, 0xBA},
683
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x96, 0xA5, 0xA6, 0xA7, 0xAA, 0xAB, 0xB6, 0xBA, 0xBB},
684
+ {0x54, 0x55, 0x64, 0x65, 0x69, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xB9, 0xBA},
685
+ {0x55, 0x65, 0x66, 0x69, 0x6A, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
686
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
687
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x6A, 0x96, 0xA5, 0xA6, 0xAA, 0xAB, 0xBA, 0xBB},
688
+ {0x54, 0x55, 0x59, 0x64, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA9, 0xAA, 0xB9, 0xBA},
689
+ {0x54, 0x55, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
690
+ {0x55, 0x56, 0x59, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA},
691
+ {0x55, 0x56, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x96, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xBA, 0xBB},
692
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x6A, 0x99, 0xA5, 0xA9, 0xAA, 0xAD, 0xAE, 0xB9, 0xBA, 0xBE},
693
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x6A, 0x99, 0xA5, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
694
+ {0x55, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAE, 0xBA, 0xBE},
695
+ {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x9A, 0xA6, 0xA9, 0xAA, 0xAB, 0xAE, 0xBA},
696
+ {0x40, 0x45, 0x51, 0x54, 0x55, 0x85, 0x91, 0x94, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
697
+ {0x41, 0x45, 0x51, 0x55, 0x56, 0x85, 0x91, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xAA, 0xEA},
698
+ {0x41, 0x45, 0x51, 0x55, 0x56, 0x85, 0x91, 0x95, 0x96, 0x9A, 0xA6, 0xAA, 0xD6, 0xEA},
699
+ {0x41, 0x45, 0x51, 0x55, 0x56, 0x86, 0x92, 0x95, 0x96, 0x97, 0x9A, 0xA6, 0xAA, 0xAB, 0xD6, 0xEA, 0xEB},
700
+ {0x44, 0x45, 0x54, 0x55, 0x59, 0x85, 0x94, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xEA},
701
+ {0x45, 0x55, 0x85, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xDA, 0xEA},
702
+ {0x45, 0x55, 0x56, 0x85, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xAA, 0xDA, 0xEA},
703
+ {0x45, 0x55, 0x56, 0x86, 0x95, 0x96, 0x9A, 0x9B, 0xA6, 0xAA, 0xAB, 0xDA, 0xEA, 0xEB},
704
+ {0x44, 0x45, 0x54, 0x55, 0x59, 0x85, 0x94, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xD9, 0xEA},
705
+ {0x45, 0x55, 0x59, 0x85, 0x95, 0x96, 0x99, 0x9A, 0xA9, 0xAA, 0xDA, 0xEA},
706
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x85, 0x95, 0x96, 0x99, 0x9A, 0xAA, 0xDA, 0xEA},
707
+ {0x45, 0x55, 0x56, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0x9B, 0xA6, 0xAA, 0xAB, 0xDA, 0xEA, 0xEB},
708
+ {0x44, 0x45, 0x54, 0x55, 0x59, 0x89, 0x95, 0x98, 0x99, 0x9A, 0x9D, 0xA9, 0xAA, 0xAE, 0xD9, 0xEA, 0xEE},
709
+ {0x45, 0x55, 0x59, 0x89, 0x95, 0x99, 0x9A, 0x9E, 0xA9, 0xAA, 0xAE, 0xDA, 0xEA, 0xEE},
710
+ {0x45, 0x55, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0x9E, 0xA9, 0xAA, 0xAE, 0xDA, 0xEA, 0xEE},
711
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0x9B, 0x9E, 0xAA, 0xAB, 0xAE, 0xDA, 0xEA, 0xEF},
712
+ {0x50, 0x51, 0x54, 0x55, 0x65, 0x91, 0x94, 0x95, 0x96, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
713
+ {0x51, 0x55, 0x91, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xE6, 0xEA},
714
+ {0x51, 0x55, 0x56, 0x91, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xAA, 0xE6, 0xEA},
715
+ {0x51, 0x55, 0x56, 0x92, 0x95, 0x96, 0x9A, 0xA6, 0xA7, 0xAA, 0xAB, 0xE6, 0xEA, 0xEB},
716
+ {0x54, 0x55, 0x94, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xE9, 0xEA},
717
+ {0x55, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
718
+ {0x55, 0x56, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
719
+ {0x55, 0x56, 0x95, 0x96, 0x9A, 0xA6, 0xAA, 0xAB, 0xEA, 0xEB},
720
+ {0x54, 0x55, 0x59, 0x94, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xE9, 0xEA},
721
+ {0x55, 0x59, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
722
+ {0x45, 0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
723
+ {0x45, 0x55, 0x56, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xAA, 0xAB, 0xEA, 0xEB},
724
+ {0x54, 0x55, 0x59, 0x95, 0x98, 0x99, 0x9A, 0xA9, 0xAA, 0xAD, 0xAE, 0xE9, 0xEA, 0xEE},
725
+ {0x55, 0x59, 0x95, 0x99, 0x9A, 0xA9, 0xAA, 0xAE, 0xEA, 0xEE},
726
+ {0x45, 0x55, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xA9, 0xAA, 0xAE, 0xEA, 0xEE},
727
+ {0x55, 0x56, 0x59, 0x5A, 0x95, 0x96, 0x99, 0x9A, 0xAA, 0xAB, 0xAE, 0xEA, 0xEF},
728
+ {0x50, 0x51, 0x54, 0x55, 0x65, 0x91, 0x94, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xE5, 0xEA},
729
+ {0x51, 0x55, 0x65, 0x91, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA, 0xE6, 0xEA},
730
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x91, 0x95, 0x96, 0xA5, 0xA6, 0xAA, 0xE6, 0xEA},
731
+ {0x51, 0x55, 0x56, 0x66, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xA7, 0xAA, 0xAB, 0xE6, 0xEA, 0xEB},
732
+ {0x54, 0x55, 0x65, 0x94, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xE9, 0xEA},
733
+ {0x55, 0x65, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
734
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
735
+ {0x51, 0x55, 0x56, 0x66, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xAA, 0xAB, 0xEA, 0xEB},
736
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x94, 0x95, 0x99, 0xA5, 0xA9, 0xAA, 0xE9, 0xEA},
737
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
738
+ {0x55, 0x56, 0x59, 0x65, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xEA},
739
+ {0x55, 0x56, 0x5A, 0x66, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xEA, 0xEB},
740
+ {0x54, 0x55, 0x59, 0x69, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xAD, 0xAE, 0xE9, 0xEA, 0xEE},
741
+ {0x54, 0x55, 0x59, 0x69, 0x95, 0x99, 0x9A, 0xA5, 0xA9, 0xAA, 0xAE, 0xEA, 0xEE},
742
+ {0x55, 0x59, 0x5A, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAE, 0xEA, 0xEE},
743
+ {0x55, 0x56, 0x59, 0x5A, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA6, 0xA9, 0xAA, 0xAB, 0xAE, 0xEA},
744
+ {0x50, 0x51, 0x54, 0x55, 0x65, 0x95, 0xA1, 0xA4, 0xA5, 0xA6, 0xA9, 0xAA, 0xB5, 0xBA, 0xE5, 0xEA, 0xFA},
745
+ {0x51, 0x55, 0x65, 0x95, 0xA1, 0xA5, 0xA6, 0xA9, 0xAA, 0xB6, 0xBA, 0xE6, 0xEA, 0xFA},
746
+ {0x51, 0x55, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA, 0xB6, 0xBA, 0xE6, 0xEA, 0xFA},
747
+ {0x51, 0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xA7, 0xAA, 0xAB, 0xB6, 0xBA, 0xE6, 0xEA, 0xFB},
748
+ {0x54, 0x55, 0x65, 0x95, 0xA4, 0xA5, 0xA6, 0xA9, 0xAA, 0xB9, 0xBA, 0xE9, 0xEA, 0xFA},
749
+ {0x55, 0x65, 0x95, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA, 0xEA, 0xFA},
750
+ {0x51, 0x55, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA, 0xEA, 0xFA},
751
+ {0x55, 0x56, 0x65, 0x66, 0x95, 0x96, 0xA5, 0xA6, 0xAA, 0xAB, 0xBA, 0xEA, 0xFB},
752
+ {0x54, 0x55, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xB9, 0xBA, 0xE9, 0xEA, 0xFA},
753
+ {0x54, 0x55, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA, 0xEA, 0xFA},
754
+ {0x55, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xBA, 0xEA, 0xFA},
755
+ {0x55, 0x56, 0x65, 0x66, 0x6A, 0x95, 0x96, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xBA, 0xEA},
756
+ {0x54, 0x55, 0x59, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA9, 0xAA, 0xAD, 0xAE, 0xB9, 0xBA, 0xE9, 0xEA, 0xFE},
757
+ {0x55, 0x59, 0x65, 0x69, 0x95, 0x99, 0xA5, 0xA9, 0xAA, 0xAE, 0xBA, 0xEA, 0xFE},
758
+ {0x55, 0x59, 0x65, 0x69, 0x6A, 0x95, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAE, 0xBA, 0xEA},
759
+ {0x55, 0x56, 0x59, 0x5A, 0x65, 0x66, 0x69, 0x6A, 0x95, 0x96, 0x99, 0x9A, 0xA5, 0xA6, 0xA9, 0xAA, 0xAB, 0xAE, 0xBA, 0xEA},};
760
+ LatticePoint4D[] latticePoints = new LatticePoint4D[256];
761
+ for (int i = 0; i < 256; i++) {
762
+ int cx = ((i) & 3) - 1;
763
+ int cy = ((i >> 2) & 3) - 1;
764
+ int cz = ((i >> 4) & 3) - 1;
765
+ int cw = ((i >> 6) & 3) - 1;
766
+ latticePoints[i] = new LatticePoint4D(cx, cy, cz, cw);
767
+ }
768
+ for (int i = 0; i < 256; i++) {
769
+ LOOKUP_4D[i] = new LatticePoint4D[lookup4DPregen[i].length];
770
+ for (int j = 0; j < lookup4DPregen[i].length; j++) {
771
+ LOOKUP_4D[i][j] = latticePoints[lookup4DPregen[i][j]];
772
+ }
773
+ }
774
+ }
775
+
776
+ private static class LatticePoint2D {
777
+
778
+ int xsv, ysv;
779
+ double dx, dy;
780
+
781
+ public LatticePoint2D(int xsv, int ysv) {
782
+ this.xsv = xsv;
783
+ this.ysv = ysv;
784
+ double ssv = (xsv + ysv) * -0.211324865405187;
785
+ this.dx = -xsv - ssv;
786
+ this.dy = -ysv - ssv;
787
+ }
788
+ }
789
+
790
+ private static class LatticePoint3D {
791
+
792
+ public double dxr, dyr, dzr;
793
+ public int xrv, yrv, zrv;
794
+ LatticePoint3D nextOnFailure, nextOnSuccess;
795
+
796
+ public LatticePoint3D(int xrv, int yrv, int zrv, int lattice) {
797
+ this.dxr = -xrv + lattice * 0.5;
798
+ this.dyr = -yrv + lattice * 0.5;
799
+ this.dzr = -zrv + lattice * 0.5;
800
+ this.xrv = xrv + lattice * 1024;
801
+ this.yrv = yrv + lattice * 1024;
802
+ this.zrv = zrv + lattice * 1024;
803
+ }
804
+ }
805
+
806
+ private static class LatticePoint4D {
807
+
808
+ int xsv, ysv, zsv, wsv;
809
+ double dx, dy, dz, dw;
810
+
811
+ public LatticePoint4D(int xsv, int ysv, int zsv, int wsv) {
812
+ this.xsv = xsv;
813
+ this.ysv = ysv;
814
+ this.zsv = zsv;
815
+ this.wsv = wsv;
816
+ double ssv = (xsv + ysv + zsv + wsv) * -0.138196601125011;
817
+ this.dx = -xsv - ssv;
818
+ this.dy = -ysv - ssv;
819
+ this.dz = -zsv - ssv;
820
+ this.dw = -wsv - ssv;
821
+ }
822
+ }
823
+
824
+ /*
825
+ * Gradients
826
+ */
827
+ private static class Grad2 {
828
+
829
+ double dx, dy;
830
+
831
+ public Grad2(double dx, double dy) {
832
+ this.dx = dx;
833
+ this.dy = dy;
834
+ }
835
+ }
836
+
837
+ private static class Grad3 {
838
+
839
+ double dx, dy, dz;
840
+
841
+ public Grad3(double dx, double dy, double dz) {
842
+ this.dx = dx;
843
+ this.dy = dy;
844
+ this.dz = dz;
845
+ }
846
+ }
847
+
848
+ private static class Grad4 {
849
+
850
+ double dx, dy, dz, dw;
851
+
852
+ public Grad4(double dx, double dy, double dz, double dw) {
853
+ this.dx = dx;
854
+ this.dy = dy;
855
+ this.dz = dz;
856
+ this.dw = dw;
857
+ }
858
+ }
859
+
860
+ private static final double N2 = 0.05481866495625118;
861
+ private static final double N3 = 0.2781926117527186;
862
+ private static final double N4 = 0.11127401889945551;
863
+ private static final Grad2[] GRADIENTS_2D;
864
+ private static final Grad3[] GRADIENTS_3D;
865
+ private static final Grad4[] GRADIENTS_4D;
866
+
867
+ static {
868
+
869
+ GRADIENTS_2D = new Grad2[PSIZE];
870
+ Grad2[] grad2 = {
871
+ new Grad2(0.130526192220052, 0.99144486137381),
872
+ new Grad2(0.38268343236509, 0.923879532511287),
873
+ new Grad2(0.608761429008721, 0.793353340291235),
874
+ new Grad2(0.793353340291235, 0.608761429008721),
875
+ new Grad2(0.923879532511287, 0.38268343236509),
876
+ new Grad2(0.99144486137381, 0.130526192220051),
877
+ new Grad2(0.99144486137381, -0.130526192220051),
878
+ new Grad2(0.923879532511287, -0.38268343236509),
879
+ new Grad2(0.793353340291235, -0.60876142900872),
880
+ new Grad2(0.608761429008721, -0.793353340291235),
881
+ new Grad2(0.38268343236509, -0.923879532511287),
882
+ new Grad2(0.130526192220052, -0.99144486137381),
883
+ new Grad2(-0.130526192220052, -0.99144486137381),
884
+ new Grad2(-0.38268343236509, -0.923879532511287),
885
+ new Grad2(-0.608761429008721, -0.793353340291235),
886
+ new Grad2(-0.793353340291235, -0.608761429008721),
887
+ new Grad2(-0.923879532511287, -0.38268343236509),
888
+ new Grad2(-0.99144486137381, -0.130526192220052),
889
+ new Grad2(-0.99144486137381, 0.130526192220051),
890
+ new Grad2(-0.923879532511287, 0.38268343236509),
891
+ new Grad2(-0.793353340291235, 0.608761429008721),
892
+ new Grad2(-0.608761429008721, 0.793353340291235),
893
+ new Grad2(-0.38268343236509, 0.923879532511287),
894
+ new Grad2(-0.130526192220052, 0.99144486137381)
895
+ };
896
+ Grad2[] grad2XBeforeY = new Grad2[grad2.length];
897
+ for (Grad2 grad21 : grad2) {
898
+ grad21.dx /= N2;
899
+ grad21.dy /= N2;
900
+ }
901
+ for (int i = 0; i < PSIZE; i++) {
902
+ GRADIENTS_2D[i] = grad2[i % grad2.length];
903
+ }
904
+
905
+ GRADIENTS_3D = new Grad3[PSIZE];
906
+ Grad3[] grad3 = {
907
+ new Grad3(-2.22474487139, -2.22474487139, -1.0),
908
+ new Grad3(-2.22474487139, -2.22474487139, 1.0),
909
+ new Grad3(-3.0862664687972017, -1.1721513422464978, 0.0),
910
+ new Grad3(-1.1721513422464978, -3.0862664687972017, 0.0),
911
+ new Grad3(-2.22474487139, -1.0, -2.22474487139),
912
+ new Grad3(-2.22474487139, 1.0, -2.22474487139),
913
+ new Grad3(-1.1721513422464978, 0.0, -3.0862664687972017),
914
+ new Grad3(-3.0862664687972017, 0.0, -1.1721513422464978),
915
+ new Grad3(-2.22474487139, -1.0, 2.22474487139),
916
+ new Grad3(-2.22474487139, 1.0, 2.22474487139),
917
+ new Grad3(-3.0862664687972017, 0.0, 1.1721513422464978),
918
+ new Grad3(-1.1721513422464978, 0.0, 3.0862664687972017),
919
+ new Grad3(-2.22474487139, 2.22474487139, -1.0),
920
+ new Grad3(-2.22474487139, 2.22474487139, 1.0),
921
+ new Grad3(-1.1721513422464978, 3.0862664687972017, 0.0),
922
+ new Grad3(-3.0862664687972017, 1.1721513422464978, 0.0),
923
+ new Grad3(-1.0, -2.22474487139, -2.22474487139),
924
+ new Grad3(1.0, -2.22474487139, -2.22474487139),
925
+ new Grad3(0.0, -3.0862664687972017, -1.1721513422464978),
926
+ new Grad3(0.0, -1.1721513422464978, -3.0862664687972017),
927
+ new Grad3(-1.0, -2.22474487139, 2.22474487139),
928
+ new Grad3(1.0, -2.22474487139, 2.22474487139),
929
+ new Grad3(0.0, -1.1721513422464978, 3.0862664687972017),
930
+ new Grad3(0.0, -3.0862664687972017, 1.1721513422464978),
931
+ new Grad3(-1.0, 2.22474487139, -2.22474487139),
932
+ new Grad3(1.0, 2.22474487139, -2.22474487139),
933
+ new Grad3(0.0, 1.1721513422464978, -3.0862664687972017),
934
+ new Grad3(0.0, 3.0862664687972017, -1.1721513422464978),
935
+ new Grad3(-1.0, 2.22474487139, 2.22474487139),
936
+ new Grad3(1.0, 2.22474487139, 2.22474487139),
937
+ new Grad3(0.0, 3.0862664687972017, 1.1721513422464978),
938
+ new Grad3(0.0, 1.1721513422464978, 3.0862664687972017),
939
+ new Grad3(2.22474487139, -2.22474487139, -1.0),
940
+ new Grad3(2.22474487139, -2.22474487139, 1.0),
941
+ new Grad3(1.1721513422464978, -3.0862664687972017, 0.0),
942
+ new Grad3(3.0862664687972017, -1.1721513422464978, 0.0),
943
+ new Grad3(2.22474487139, -1.0, -2.22474487139),
944
+ new Grad3(2.22474487139, 1.0, -2.22474487139),
945
+ new Grad3(3.0862664687972017, 0.0, -1.1721513422464978),
946
+ new Grad3(1.1721513422464978, 0.0, -3.0862664687972017),
947
+ new Grad3(2.22474487139, -1.0, 2.22474487139),
948
+ new Grad3(2.22474487139, 1.0, 2.22474487139),
949
+ new Grad3(1.1721513422464978, 0.0, 3.0862664687972017),
950
+ new Grad3(3.0862664687972017, 0.0, 1.1721513422464978),
951
+ new Grad3(2.22474487139, 2.22474487139, -1.0),
952
+ new Grad3(2.22474487139, 2.22474487139, 1.0),
953
+ new Grad3(3.0862664687972017, 1.1721513422464978, 0.0),
954
+ new Grad3(1.1721513422464978, 3.0862664687972017, 0.0)
955
+ };
956
+ for (Grad3 grad31 : grad3) {
957
+ grad31.dx /= N3;
958
+ grad31.dy /= N3;
959
+ grad31.dz /= N3;
960
+ }
961
+ for (int i = 0; i < PSIZE; i++) {
962
+ GRADIENTS_3D[i] = grad3[i % grad3.length];
963
+ }
964
+
965
+ GRADIENTS_4D = new Grad4[PSIZE];
966
+ Grad4[] grad4 = {
967
+ new Grad4(-0.753341017856078, -0.37968289875261624, -0.37968289875261624, -0.37968289875261624),
968
+ new Grad4(-0.7821684431180708, -0.4321472685365301, -0.4321472685365301, 0.12128480194602098),
969
+ new Grad4(-0.7821684431180708, -0.4321472685365301, 0.12128480194602098, -0.4321472685365301),
970
+ new Grad4(-0.7821684431180708, 0.12128480194602098, -0.4321472685365301, -0.4321472685365301),
971
+ new Grad4(-0.8586508742123365, -0.508629699630796, 0.044802370851755174, 0.044802370851755174),
972
+ new Grad4(-0.8586508742123365, 0.044802370851755174, -0.508629699630796, 0.044802370851755174),
973
+ new Grad4(-0.8586508742123365, 0.044802370851755174, 0.044802370851755174, -0.508629699630796),
974
+ new Grad4(-0.9982828964265062, -0.03381941603233842, -0.03381941603233842, -0.03381941603233842),
975
+ new Grad4(-0.37968289875261624, -0.753341017856078, -0.37968289875261624, -0.37968289875261624),
976
+ new Grad4(-0.4321472685365301, -0.7821684431180708, -0.4321472685365301, 0.12128480194602098),
977
+ new Grad4(-0.4321472685365301, -0.7821684431180708, 0.12128480194602098, -0.4321472685365301),
978
+ new Grad4(0.12128480194602098, -0.7821684431180708, -0.4321472685365301, -0.4321472685365301),
979
+ new Grad4(-0.508629699630796, -0.8586508742123365, 0.044802370851755174, 0.044802370851755174),
980
+ new Grad4(0.044802370851755174, -0.8586508742123365, -0.508629699630796, 0.044802370851755174),
981
+ new Grad4(0.044802370851755174, -0.8586508742123365, 0.044802370851755174, -0.508629699630796),
982
+ new Grad4(-0.03381941603233842, -0.9982828964265062, -0.03381941603233842, -0.03381941603233842),
983
+ new Grad4(-0.37968289875261624, -0.37968289875261624, -0.753341017856078, -0.37968289875261624),
984
+ new Grad4(-0.4321472685365301, -0.4321472685365301, -0.7821684431180708, 0.12128480194602098),
985
+ new Grad4(-0.4321472685365301, 0.12128480194602098, -0.7821684431180708, -0.4321472685365301),
986
+ new Grad4(0.12128480194602098, -0.4321472685365301, -0.7821684431180708, -0.4321472685365301),
987
+ new Grad4(-0.508629699630796, 0.044802370851755174, -0.8586508742123365, 0.044802370851755174),
988
+ new Grad4(0.044802370851755174, -0.508629699630796, -0.8586508742123365, 0.044802370851755174),
989
+ new Grad4(0.044802370851755174, 0.044802370851755174, -0.8586508742123365, -0.508629699630796),
990
+ new Grad4(-0.03381941603233842, -0.03381941603233842, -0.9982828964265062, -0.03381941603233842),
991
+ new Grad4(-0.37968289875261624, -0.37968289875261624, -0.37968289875261624, -0.753341017856078),
992
+ new Grad4(-0.4321472685365301, -0.4321472685365301, 0.12128480194602098, -0.7821684431180708),
993
+ new Grad4(-0.4321472685365301, 0.12128480194602098, -0.4321472685365301, -0.7821684431180708),
994
+ new Grad4(0.12128480194602098, -0.4321472685365301, -0.4321472685365301, -0.7821684431180708),
995
+ new Grad4(-0.508629699630796, 0.044802370851755174, 0.044802370851755174, -0.8586508742123365),
996
+ new Grad4(0.044802370851755174, -0.508629699630796, 0.044802370851755174, -0.8586508742123365),
997
+ new Grad4(0.044802370851755174, 0.044802370851755174, -0.508629699630796, -0.8586508742123365),
998
+ new Grad4(-0.03381941603233842, -0.03381941603233842, -0.03381941603233842, -0.9982828964265062),
999
+ new Grad4(-0.6740059517812944, -0.3239847771997537, -0.3239847771997537, 0.5794684678643381),
1000
+ new Grad4(-0.7504883828755602, -0.4004672082940195, 0.15296486218853164, 0.5029860367700724),
1001
+ new Grad4(-0.7504883828755602, 0.15296486218853164, -0.4004672082940195, 0.5029860367700724),
1002
+ new Grad4(-0.8828161875373585, 0.08164729285680945, 0.08164729285680945, 0.4553054119602712),
1003
+ new Grad4(-0.4553054119602712, -0.08164729285680945, -0.08164729285680945, 0.8828161875373585),
1004
+ new Grad4(-0.5029860367700724, -0.15296486218853164, 0.4004672082940195, 0.7504883828755602),
1005
+ new Grad4(-0.5029860367700724, 0.4004672082940195, -0.15296486218853164, 0.7504883828755602),
1006
+ new Grad4(-0.5794684678643381, 0.3239847771997537, 0.3239847771997537, 0.6740059517812944),
1007
+ new Grad4(-0.3239847771997537, -0.6740059517812944, -0.3239847771997537, 0.5794684678643381),
1008
+ new Grad4(-0.4004672082940195, -0.7504883828755602, 0.15296486218853164, 0.5029860367700724),
1009
+ new Grad4(0.15296486218853164, -0.7504883828755602, -0.4004672082940195, 0.5029860367700724),
1010
+ new Grad4(0.08164729285680945, -0.8828161875373585, 0.08164729285680945, 0.4553054119602712),
1011
+ new Grad4(-0.08164729285680945, -0.4553054119602712, -0.08164729285680945, 0.8828161875373585),
1012
+ new Grad4(-0.15296486218853164, -0.5029860367700724, 0.4004672082940195, 0.7504883828755602),
1013
+ new Grad4(0.4004672082940195, -0.5029860367700724, -0.15296486218853164, 0.7504883828755602),
1014
+ new Grad4(0.3239847771997537, -0.5794684678643381, 0.3239847771997537, 0.6740059517812944),
1015
+ new Grad4(-0.3239847771997537, -0.3239847771997537, -0.6740059517812944, 0.5794684678643381),
1016
+ new Grad4(-0.4004672082940195, 0.15296486218853164, -0.7504883828755602, 0.5029860367700724),
1017
+ new Grad4(0.15296486218853164, -0.4004672082940195, -0.7504883828755602, 0.5029860367700724),
1018
+ new Grad4(0.08164729285680945, 0.08164729285680945, -0.8828161875373585, 0.4553054119602712),
1019
+ new Grad4(-0.08164729285680945, -0.08164729285680945, -0.4553054119602712, 0.8828161875373585),
1020
+ new Grad4(-0.15296486218853164, 0.4004672082940195, -0.5029860367700724, 0.7504883828755602),
1021
+ new Grad4(0.4004672082940195, -0.15296486218853164, -0.5029860367700724, 0.7504883828755602),
1022
+ new Grad4(0.3239847771997537, 0.3239847771997537, -0.5794684678643381, 0.6740059517812944),
1023
+ new Grad4(-0.6740059517812944, -0.3239847771997537, 0.5794684678643381, -0.3239847771997537),
1024
+ new Grad4(-0.7504883828755602, -0.4004672082940195, 0.5029860367700724, 0.15296486218853164),
1025
+ new Grad4(-0.7504883828755602, 0.15296486218853164, 0.5029860367700724, -0.4004672082940195),
1026
+ new Grad4(-0.8828161875373585, 0.08164729285680945, 0.4553054119602712, 0.08164729285680945),
1027
+ new Grad4(-0.4553054119602712, -0.08164729285680945, 0.8828161875373585, -0.08164729285680945),
1028
+ new Grad4(-0.5029860367700724, -0.15296486218853164, 0.7504883828755602, 0.4004672082940195),
1029
+ new Grad4(-0.5029860367700724, 0.4004672082940195, 0.7504883828755602, -0.15296486218853164),
1030
+ new Grad4(-0.5794684678643381, 0.3239847771997537, 0.6740059517812944, 0.3239847771997537),
1031
+ new Grad4(-0.3239847771997537, -0.6740059517812944, 0.5794684678643381, -0.3239847771997537),
1032
+ new Grad4(-0.4004672082940195, -0.7504883828755602, 0.5029860367700724, 0.15296486218853164),
1033
+ new Grad4(0.15296486218853164, -0.7504883828755602, 0.5029860367700724, -0.4004672082940195),
1034
+ new Grad4(0.08164729285680945, -0.8828161875373585, 0.4553054119602712, 0.08164729285680945),
1035
+ new Grad4(-0.08164729285680945, -0.4553054119602712, 0.8828161875373585, -0.08164729285680945),
1036
+ new Grad4(-0.15296486218853164, -0.5029860367700724, 0.7504883828755602, 0.4004672082940195),
1037
+ new Grad4(0.4004672082940195, -0.5029860367700724, 0.7504883828755602, -0.15296486218853164),
1038
+ new Grad4(0.3239847771997537, -0.5794684678643381, 0.6740059517812944, 0.3239847771997537),
1039
+ new Grad4(-0.3239847771997537, -0.3239847771997537, 0.5794684678643381, -0.6740059517812944),
1040
+ new Grad4(-0.4004672082940195, 0.15296486218853164, 0.5029860367700724, -0.7504883828755602),
1041
+ new Grad4(0.15296486218853164, -0.4004672082940195, 0.5029860367700724, -0.7504883828755602),
1042
+ new Grad4(0.08164729285680945, 0.08164729285680945, 0.4553054119602712, -0.8828161875373585),
1043
+ new Grad4(-0.08164729285680945, -0.08164729285680945, 0.8828161875373585, -0.4553054119602712),
1044
+ new Grad4(-0.15296486218853164, 0.4004672082940195, 0.7504883828755602, -0.5029860367700724),
1045
+ new Grad4(0.4004672082940195, -0.15296486218853164, 0.7504883828755602, -0.5029860367700724),
1046
+ new Grad4(0.3239847771997537, 0.3239847771997537, 0.6740059517812944, -0.5794684678643381),
1047
+ new Grad4(-0.6740059517812944, 0.5794684678643381, -0.3239847771997537, -0.3239847771997537),
1048
+ new Grad4(-0.7504883828755602, 0.5029860367700724, -0.4004672082940195, 0.15296486218853164),
1049
+ new Grad4(-0.7504883828755602, 0.5029860367700724, 0.15296486218853164, -0.4004672082940195),
1050
+ new Grad4(-0.8828161875373585, 0.4553054119602712, 0.08164729285680945, 0.08164729285680945),
1051
+ new Grad4(-0.4553054119602712, 0.8828161875373585, -0.08164729285680945, -0.08164729285680945),
1052
+ new Grad4(-0.5029860367700724, 0.7504883828755602, -0.15296486218853164, 0.4004672082940195),
1053
+ new Grad4(-0.5029860367700724, 0.7504883828755602, 0.4004672082940195, -0.15296486218853164),
1054
+ new Grad4(-0.5794684678643381, 0.6740059517812944, 0.3239847771997537, 0.3239847771997537),
1055
+ new Grad4(-0.3239847771997537, 0.5794684678643381, -0.6740059517812944, -0.3239847771997537),
1056
+ new Grad4(-0.4004672082940195, 0.5029860367700724, -0.7504883828755602, 0.15296486218853164),
1057
+ new Grad4(0.15296486218853164, 0.5029860367700724, -0.7504883828755602, -0.4004672082940195),
1058
+ new Grad4(0.08164729285680945, 0.4553054119602712, -0.8828161875373585, 0.08164729285680945),
1059
+ new Grad4(-0.08164729285680945, 0.8828161875373585, -0.4553054119602712, -0.08164729285680945),
1060
+ new Grad4(-0.15296486218853164, 0.7504883828755602, -0.5029860367700724, 0.4004672082940195),
1061
+ new Grad4(0.4004672082940195, 0.7504883828755602, -0.5029860367700724, -0.15296486218853164),
1062
+ new Grad4(0.3239847771997537, 0.6740059517812944, -0.5794684678643381, 0.3239847771997537),
1063
+ new Grad4(-0.3239847771997537, 0.5794684678643381, -0.3239847771997537, -0.6740059517812944),
1064
+ new Grad4(-0.4004672082940195, 0.5029860367700724, 0.15296486218853164, -0.7504883828755602),
1065
+ new Grad4(0.15296486218853164, 0.5029860367700724, -0.4004672082940195, -0.7504883828755602),
1066
+ new Grad4(0.08164729285680945, 0.4553054119602712, 0.08164729285680945, -0.8828161875373585),
1067
+ new Grad4(-0.08164729285680945, 0.8828161875373585, -0.08164729285680945, -0.4553054119602712),
1068
+ new Grad4(-0.15296486218853164, 0.7504883828755602, 0.4004672082940195, -0.5029860367700724),
1069
+ new Grad4(0.4004672082940195, 0.7504883828755602, -0.15296486218853164, -0.5029860367700724),
1070
+ new Grad4(0.3239847771997537, 0.6740059517812944, 0.3239847771997537, -0.5794684678643381),
1071
+ new Grad4(0.5794684678643381, -0.6740059517812944, -0.3239847771997537, -0.3239847771997537),
1072
+ new Grad4(0.5029860367700724, -0.7504883828755602, -0.4004672082940195, 0.15296486218853164),
1073
+ new Grad4(0.5029860367700724, -0.7504883828755602, 0.15296486218853164, -0.4004672082940195),
1074
+ new Grad4(0.4553054119602712, -0.8828161875373585, 0.08164729285680945, 0.08164729285680945),
1075
+ new Grad4(0.8828161875373585, -0.4553054119602712, -0.08164729285680945, -0.08164729285680945),
1076
+ new Grad4(0.7504883828755602, -0.5029860367700724, -0.15296486218853164, 0.4004672082940195),
1077
+ new Grad4(0.7504883828755602, -0.5029860367700724, 0.4004672082940195, -0.15296486218853164),
1078
+ new Grad4(0.6740059517812944, -0.5794684678643381, 0.3239847771997537, 0.3239847771997537),
1079
+ new Grad4(0.5794684678643381, -0.3239847771997537, -0.6740059517812944, -0.3239847771997537),
1080
+ new Grad4(0.5029860367700724, -0.4004672082940195, -0.7504883828755602, 0.15296486218853164),
1081
+ new Grad4(0.5029860367700724, 0.15296486218853164, -0.7504883828755602, -0.4004672082940195),
1082
+ new Grad4(0.4553054119602712, 0.08164729285680945, -0.8828161875373585, 0.08164729285680945),
1083
+ new Grad4(0.8828161875373585, -0.08164729285680945, -0.4553054119602712, -0.08164729285680945),
1084
+ new Grad4(0.7504883828755602, -0.15296486218853164, -0.5029860367700724, 0.4004672082940195),
1085
+ new Grad4(0.7504883828755602, 0.4004672082940195, -0.5029860367700724, -0.15296486218853164),
1086
+ new Grad4(0.6740059517812944, 0.3239847771997537, -0.5794684678643381, 0.3239847771997537),
1087
+ new Grad4(0.5794684678643381, -0.3239847771997537, -0.3239847771997537, -0.6740059517812944),
1088
+ new Grad4(0.5029860367700724, -0.4004672082940195, 0.15296486218853164, -0.7504883828755602),
1089
+ new Grad4(0.5029860367700724, 0.15296486218853164, -0.4004672082940195, -0.7504883828755602),
1090
+ new Grad4(0.4553054119602712, 0.08164729285680945, 0.08164729285680945, -0.8828161875373585),
1091
+ new Grad4(0.8828161875373585, -0.08164729285680945, -0.08164729285680945, -0.4553054119602712),
1092
+ new Grad4(0.7504883828755602, -0.15296486218853164, 0.4004672082940195, -0.5029860367700724),
1093
+ new Grad4(0.7504883828755602, 0.4004672082940195, -0.15296486218853164, -0.5029860367700724),
1094
+ new Grad4(0.6740059517812944, 0.3239847771997537, 0.3239847771997537, -0.5794684678643381),
1095
+ new Grad4(0.03381941603233842, 0.03381941603233842, 0.03381941603233842, 0.9982828964265062),
1096
+ new Grad4(-0.044802370851755174, -0.044802370851755174, 0.508629699630796, 0.8586508742123365),
1097
+ new Grad4(-0.044802370851755174, 0.508629699630796, -0.044802370851755174, 0.8586508742123365),
1098
+ new Grad4(-0.12128480194602098, 0.4321472685365301, 0.4321472685365301, 0.7821684431180708),
1099
+ new Grad4(0.508629699630796, -0.044802370851755174, -0.044802370851755174, 0.8586508742123365),
1100
+ new Grad4(0.4321472685365301, -0.12128480194602098, 0.4321472685365301, 0.7821684431180708),
1101
+ new Grad4(0.4321472685365301, 0.4321472685365301, -0.12128480194602098, 0.7821684431180708),
1102
+ new Grad4(0.37968289875261624, 0.37968289875261624, 0.37968289875261624, 0.753341017856078),
1103
+ new Grad4(0.03381941603233842, 0.03381941603233842, 0.9982828964265062, 0.03381941603233842),
1104
+ new Grad4(-0.044802370851755174, 0.044802370851755174, 0.8586508742123365, 0.508629699630796),
1105
+ new Grad4(-0.044802370851755174, 0.508629699630796, 0.8586508742123365, -0.044802370851755174),
1106
+ new Grad4(-0.12128480194602098, 0.4321472685365301, 0.7821684431180708, 0.4321472685365301),
1107
+ new Grad4(0.508629699630796, -0.044802370851755174, 0.8586508742123365, -0.044802370851755174),
1108
+ new Grad4(0.4321472685365301, -0.12128480194602098, 0.7821684431180708, 0.4321472685365301),
1109
+ new Grad4(0.4321472685365301, 0.4321472685365301, 0.7821684431180708, -0.12128480194602098),
1110
+ new Grad4(0.37968289875261624, 0.37968289875261624, 0.753341017856078, 0.37968289875261624),
1111
+ new Grad4(0.03381941603233842, 0.9982828964265062, 0.03381941603233842, 0.03381941603233842),
1112
+ new Grad4(-0.044802370851755174, 0.8586508742123365, -0.044802370851755174, 0.508629699630796),
1113
+ new Grad4(-0.044802370851755174, 0.8586508742123365, 0.508629699630796, -0.044802370851755174),
1114
+ new Grad4(-0.12128480194602098, 0.7821684431180708, 0.4321472685365301, 0.4321472685365301),
1115
+ new Grad4(0.508629699630796, 0.8586508742123365, -0.044802370851755174, -0.044802370851755174),
1116
+ new Grad4(0.4321472685365301, 0.7821684431180708, -0.12128480194602098, 0.4321472685365301),
1117
+ new Grad4(0.4321472685365301, 0.7821684431180708, 0.4321472685365301, -0.12128480194602098),
1118
+ new Grad4(0.37968289875261624, 0.753341017856078, 0.37968289875261624, 0.37968289875261624),
1119
+ new Grad4(0.9982828964265062, 0.03381941603233842, 0.03381941603233842, 0.03381941603233842),
1120
+ new Grad4(0.8586508742123365, -0.044802370851755174, -0.044802370851755174, 0.508629699630796),
1121
+ new Grad4(0.8586508742123365, -0.044802370851755174, 0.508629699630796, -0.044802370851755174),
1122
+ new Grad4(0.7821684431180708, -0.12128480194602098, 0.4321472685365301, 0.4321472685365301),
1123
+ new Grad4(0.8586508742123365, 0.508629699630796, -0.044802370851755174, -0.044802370851755174),
1124
+ new Grad4(0.7821684431180708, 0.4321472685365301, -0.12128480194602098, 0.4321472685365301),
1125
+ new Grad4(0.7821684431180708, 0.4321472685365301, 0.4321472685365301, -0.12128480194602098),
1126
+ new Grad4(0.753341017856078, 0.37968289875261624, 0.37968289875261624, 0.37968289875261624)
1127
+ };
1128
+ for (Grad4 grad41 : grad4) {
1129
+ grad41.dx /= N4;
1130
+ grad41.dy /= N4;
1131
+ grad41.dz /= N4;
1132
+ grad41.dw /= N4;
1133
+ }
1134
+ for (int i = 0; i < PSIZE; i++) {
1135
+ GRADIENTS_4D[i] = grad4[i % grad4.length];
1136
+ }
1137
+ }
1138
+ }