OpenSimplexNoise is a bit too slow

besides the load / update Pixels code i show you
Weird behaviour with loadPixels() and updatePixels() already
also you could just reduce the amount of calculations…

like ( untested )

  for(int x = 0; x < width; x++)  {
    float xdef = x / definition;
    for(int y = 0; y < height; y++)  {
      float ydef = y / definition;   
      float r = map((float) noise.eval(xdef, ydef, z[0]), -1, 1, 0, 255);
      float g = map((float) noise.eval(xdef, ydef, z[1]), -1, 1, 0, 255);
      float b = map((float) noise.eval(xdef, ydef, z[2]), -1, 1, 0, 255);
     
      //set(x,y,color(r,g,b));
      changePixelColor(x, y, r, g, b,d)
    }
}

and replace the map ?

float r = ( (float)noise.eval(xdef, ydef, z[0]) + 1.0 )*127;

and setting a

colorMode(RGB, 2.0);
//...
float r = (float)noise.eval(xdef, ydef, z[0]) + 1.0 ;

might also work;

1 Like