# Ensemble of points with noise

**URL:** <https://discourse.processing.org/t/ensemble-of-points-with-noise/39842>\
**Category:** Coding Questions\
**Created:** [November 24, 2022, 12:39am UTC](https://discourse.processing.org/t/ensemble-of-points-with-noise/39842 "2022-11-24T00:39:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![humano](https://avatars.discourse-cdn.com/v4/letter/h/dbc845/32.png) [@humano](https://discourse.processing.org/u/humano)\
**Post date:** [November 24, 2022, 12:39am UTC](https://discourse.processing.org/t/ensemble-of-points-with-noise/39842/1 "2022-11-24T00:39:58Z")

</div>

Hi there

I am using noise function as a beguinner and I would like to make this group of points bigger, beyond the size limits of the screen. Changing number 1000 here and there does not work, so could you please tell me how to go on?

```auto
float u = 0;
float v = 0;
float w = 0;
void setup(){
size(1000,1000);
colorMode(HSB, 100, 100, 100);

}
void draw(){
background(0);
noStroke();
for (int x = 0; x < 1000; x += 12) {
for (int y = 0; y < 1000; y += 12) {
u = u + 0.1;
v = v + 0.11;
w = w + 0.1;
float n = noise(u) * 1000;
float m = noise(v) * 1000;
float l = noise(x/100.0, y/100.0)*18;
 fill(random(95,100), 100, 100);
 ellipse (n,m,1+l,l+1);
 noLoop(); 
 }
}
}

```

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [November 24, 2022, 12:58am UTC](https://discourse.processing.org/t/ensemble-of-points-with-noise/39842/2 "2022-11-24T00:58:11Z")

</div>

Hello @humano ,

The reference for _noise()_ states:

> The resulting value will always be between 0.0 and 1.0

- translate origin to center of sketch
- subtract 0.5 from noise() to center it about 0… -0.5 to 0.5.
- multiply by a scaling factor f
- vary scaling factor f with mouse to see dynamic display.

Your code with modifications:

```auto
float u = 0;
float v = 0;
float w = 0;

void setup()
  {
  size(1000, 1000);
  colorMode(HSB, 100, 100, 100);
  //noLoop();
  }
void draw() 
  {
  background(0);
  noStroke();
  
  translate(width/2, height/2);
  
  float f = map(mouseX, 0, width, 0.2, 3);
  
  for (int x = 0; x < 1000; x += 12) 
    {
    for (int y = 0; y < 1000; y += 12) 
      {
      u = u + 0.1;
      v = v + 0.11;
      w = w + 0.1;
      float n = (noise(u)-0.5)*f * 1000;
      float m = (noise(v) -0.5)*f * 1000;
      float l = noise(x/100.0, y/100.0)*30;
      
      fill(random(0, 100), 100, 100);
      ellipse (n, m, 1+l, l+1);
      }
    }
  }

```

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/c/a/ca5ac127833badf7e223dec1021f71ca7cf56be7.jpeg)

Have fun!

`:)`
