Hi, I just replicated this Processing example https://processing.org/examples/noisewave.html

with OF and found out the result looks quite different.

Here’s the code I rewrote in OF. (which is almost identical to the original code)

```
float xoff, yoff;
//--------------------------------------------------------------
void ofApp::setup(){
yoff = 0.0f;
ofBackground(51);
}
//--------------------------------------------------------------
void ofApp::update(){
}
//--------------------------------------------------------------
void ofApp::draw(){
ofSetColor(255);
// We are going to draw a polygon out of the wave points
ofBeginShape();
float xoff = 0; // Option #1: 2D Noise
// float xoff = yoff; // Option #2: 1D Noise
// Iterate over horizontal pixels
for (float x = 0; x <= ofGetWidth(); x += 10) {
// Calculate a y value according to noise, map to
float y = ofMap(ofNoise(xoff, yoff), 0, 1, 200,300); // Option #1: 2D Noise
// float y = map(noise(xoff), 0, 1, 200,300); // Option #2: 1D Noise
// Set the vertex
ofVertex(x, y);
// Increment x dimension for noise
xoff += 0.05;
}
// increment y dimension for noise
yoff += 0.01;
ofVertex(ofGetWidth(), ofGetHeight());
ofVertex(0, ofGetHeight());
ofEndShape(true);
}
```

And here’s the screenshot when I run with Processing.

And this is the screenshot when I run with OF.

As you can see, it fluctuates in much wider range when I run with OF.

Can someone please explain to me why the result is different?

Could this be OF using different Perlin noise algorithm than Processing’s?

Thank you so much in advance!