Altering Magnitude of Noise Value at Specific Coordinate

Hi, I’m wondering if there is a way to increase the magnitude of noise at specific coordinates. The code below allows me to create topography based on perlin noise. As one can see, I get a noise value for every i and j. I’d like to know if it’s possible to have the noise value of a specific i, j to be magnified by a factor of 2 for example. Thank you for any input.

final static int W = 512;  // width of the map
final static int H = 512;  // height of the map
final static float k = 0.002;  // noise coefficient
final static float l = 30;  // resolution

float[][] m;  // height map

boolean topomap = false;

void setup() {  // creating perlin noise within window
  size(512, 512);
  m = new float[W][H];
  for (int j=0; j<H; j++) {
    for (int i=0; i<W; i++) {
      m[i][j] = noise((W+i)*k,(H+j)*k);
    }
  }
}

void draw() {  // drawing pixels
  loadPixels();
  for (int j=0; j<H; j++) {
    for (int i=0; i<W; i++) {
      if (!topomap) {
        pixels[W*j+i] = color(round(m[i][j]*l)*(255/l));  // show height with "l" resolution
      }
    }
  }
  updatePixels();
}
1 Like

One approach: what if you have a height map, float [][]m

…and also you had a magnitude map, float [][] mg, which was normally filled with 1s, but sometimes 1.5s or 2s?..?

Are you trying to create a mountain?