@@ -42,6 +42,40 @@ default float noise(float x, float y) {
4242
4343 /**
4444 * <p>
45+ * Returns the Perlin noise value at specified coordinates.Perlin noise is
46+ a random sequence generator producing a more natural ordered, harmonic
47+ succession of numbers compared to the standard <b>random()</b> function. It was invented by Ken Perlin in the 1980s and been used since in
48+ graphical applications to produce procedural textures, natural motion,
49+ shapes, terrains etc. The main difference to the
50+ <b>random()</b> function is that Perlin noise is defined in an infinite
51+ * n-dimensional space where each pair of coordinates corresponds to a fixed
52+ * semi-random value (fixed only for the lifespan of the program). The
53+ * resulting value will always be between 0.0 and 1.0. Processing can
54+ * compute 1D, 2D and 3D noise, depending on the number of coordinates
55+ * given. The noise value can be animated by moving through the noise space
56+ * as demonstrated in the example above. The 2nd and 3rd dimension can also
57+ * be interpreted as time.The actual noise is structured similar to an audio
58+ * signal, in respect to the function's use of frequencies. Similar to the
59+ * concept of harmonics in physics, perlin noise is computed over several
60+ * octaves which are added together for the final result. Another way to
61+ * adjust the character of the resulting sequence is the scale of the input
62+ * coordinates. As the function works within an infinite space the value of
63+ * the coordinates doesn't matter as such, only the distance between
64+ * successive coordinates does (eg. when using <b>noise()</b> within a
65+ * loop). As a general rule the smaller the difference between coordinates,
66+ * the smoother the resulting noise sequence will be. Steps of 0.005-0.03
67+ * work best for most applications, but this will differ depending on use.
68+ * <p>
69+ * @param x x-coordinate in noise space
70+ * @param y y-coordinate in noise space
71+ * @param z z-coordinate in noise space
72+ * @param w w-coordinate typically time
73+ * @return
74+ */
75+ float noise (float x , float y , float z );
76+
77+ /**
78+ * <p>
4579 * Returns the Perlin noise value at specified coordinates. Perlin noise is
4680 * a random sequence generator producing a more natural ordered, harmonic
4781 * succession of numbers compared to the standard <b>random()</b> function.
@@ -72,7 +106,7 @@ default float noise(float x, float y) {
72106 * @param z z-coordinate in noise space
73107 * @return
74108 */
75- float noise (float x , float y , float z );
109+ float noise (float x , float y , float z , float w );
76110
77111 /**
78112 * Adjusts the character and level of detail produced by the Perlin noise
0 commit comments