3939
4040// loadXML() error handling
4141import javax.xml.parsers.ParserConfigurationException;
42- import monkstone.noise.NoiseGenerator;
4342import org.xml.sax.SAXException;
4443
4544// TODO have this removed by 4.0 final
4847import processing.data.*;
4948import processing.event.*;
5049import processing.opengl.*;
51- import monkstone.noise.Noise;
52- import monkstone.noise.NoiseMode;
5350
5451/**
5552 * Base class for all sketches that use processing.core.
@@ -106,7 +103,6 @@ public class PApplet implements PConstants {
106103 }
107104 }
108105
109- Noise noiseGenerator = new NoiseGenerator();
110106 /**
111107 * Whether to use native (AWT) dialogs for selectInput and selectOutput. The
112108 * native dialogs on some platforms can be ugly, buggy, or missing features.
@@ -4887,9 +4883,6 @@ public final void randomSeed(long seed) {
48874883 internalRandom.setSeed(seed);
48884884 }
48894885
4890- public void noiseMode(NoiseMode mode) {
4891- noiseGenerator.noiseMode(mode);
4892- }
48934886 /**
48944887 *
48954888 * @param lod
@@ -4913,91 +4906,7 @@ public void noiseDetail(int lod, float falloff) {
49134906
49144907 }
49154908
4916- /**
4917- * @param x
4918- * @return
4919- */
4920- public float noise(float x) {
4921- return noiseGenerator.noise(x);
4922- }
4923-
4924- /**
4925- * @param x
4926- * @param y
4927- * @return
4928- */
4929- public float noise(float x, float y) {
4930- return noiseGenerator.noise(x, y);
4931- }
4932-
4933- /**
4934- * ( begin auto-generated from noise.xml )
4935- *
4936- * Returns the Perlin noise value at specified coordinates.Perlin noise is a
4937- * random sequence generator producing a more natural ordered, harmonic
4938- * succession of numbers compared to the standard <b>random()</b> function.
4939- * It was invented by Ken Perlin in the 1980s and been used since in
4940- * graphical applications to produce procedural textures, natural motion,
4941- * shapes, terrains etc. The main difference to the
4942- * <b>random()</b> function is that Perlin noise is defined in an infinite
4943- * n-dimensional space where each pair of coordinates corresponds to a fixed
4944- * semi-random value (fixed only for the lifespan of the program). The
4945- * resulting value will always be between 0.0 and 1.0. Processing can
4946- * compute 1D, 2D and 3D noise, depending on the number of coordinates
4947- * given. The noise value can be animated by moving through the noise space
4948- * as demonstrated in the example above. The 2nd and 3rd dimension can also
4949- * be interpreted as time.The actual noise is structured similar to an audio
4950- * signal, in respect to the function's use of frequencies. Similar to the
4951- * concept of harmonics in physics, perlin noise is computed over several
4952- * octaves which are added together for the final result. Another way to
4953- * adjust the character of the resulting sequence is the scale of the input
4954- * coordinates. As the function works within an infinite space the value of
4955- * the coordinates doesn't matter as such, only the distance between
4956- * successive coordinates does (eg. when using <b>noise()</b> within a
4957- * loop). As a general rule the smaller the difference between coordinates,
4958- * the smoother the resulting noise sequence will be. Steps of 0.005-0.03
4959- * work best for most applications, but this will differ depending on use.
4960- *
4961- *
4962- *
4963- * @return
4964- * @webref math:random
4965- * @param x x-coordinate in noise space
4966- * @param y y-coordinate in noise space
4967- * @param z z-coordinate in noise space
4968- * @see PApplet#noiseSeed(long)
4969- * @see PApplet#noiseDetail(int, float)
4970- * @see PApplet#random(float,float)
4971- */
4972- public float noise(float x, float y, float z) {
4973- return noiseGenerator.noise(x, y, z);
4974- }
4975-
4976- public float noise(float x, float y, float z, float w) {
4977- return noiseGenerator.noise(x, y, z, w);
4978- }
4979-
4980- /**
4981- *
4982- *
4983- * Sets the seed value for <b>noise()</b>. By default, <b>noise()</b>
4984- * produces different results each time the program is run. Set the
4985- * <b>value</b> parameter to a constant to return the same pseudo-random
4986- * numbers each time the software is run.
4987- *
4988- *
4989- * @webref math:random
4990- * @param seed seed value
4991- * @see PApplet#noise(float, float, float)
4992- * @see PApplet#noiseDetail(int, float)
4993- * @see PApplet#random(float,float)
4994- * @see PApplet#randomSeed(long)
4995- */
4996- public void noiseSeed(long seed) {
4997- noiseGenerator.noiseSeed(seed);
4998- }
4999-
5000- // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4909+ // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50014910 /**
50024911 * ( begin auto-generated from loadImage.xml )
50034912 *
0 commit comments