# How to add circle in the code as noise

**URL:** <https://discourse.processing.org/t/how-to-add-circle-in-the-code-as-noise/19111>\
**Category:** Libraries\
**Created:** [March 28, 2020, 2:59pm UTC](https://discourse.processing.org/t/how-to-add-circle-in-the-code-as-noise/19111 "2020-03-28T14:59:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![firetryer](https://avatars.discourse-cdn.com/v4/letter/f/d6d6ee/32.png) [@firetryer](https://discourse.processing.org/u/firetryer)\
**Post date:** [March 28, 2020, 2:59pm UTC](https://discourse.processing.org/t/how-to-add-circle-in-the-code-as-noise/19111/1 "2020-03-28T14:59:29Z")

</div>

![vector](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/2c9c3d6e03983be9d5ed9238c16ce9d1f9d02987.jpeg)

---

<div class="post-metadata">

**Author:** ![firetryer](https://avatars.discourse-cdn.com/v4/letter/f/d6d6ee/32.png) [@firetryer](https://discourse.processing.org/u/firetryer)\
**Post date:** [March 28, 2020, 3:00pm UTC](https://discourse.processing.org/t/how-to-add-circle-in-the-code-as-noise/19111/2 "2020-03-28T15:00:11Z")

</div>

```auto
import processing.sound.*;

SoundFile song;
int n;
Circle[] ellipse;
float ty = 0;
float noiseScale = 0.02;

void setup() {
  size(400,400);
  
  song = new SoundFile(this, "mine.mp3");
  song.loop();
  
  n =100;
  ellipse = new Circle[n];
  
  for(int i=0; i<n; i++) {
    ellipse[i] = new Circle(i);
  }
}

void draw(){
  background(0);
  
  for(int i=0; i<n; i++) {
    ellipse[i].display();
  }
}

class Circle{
// float noise;
// //int index;
// color c;
  
  Circle(int index) {
    
// //x = random(width);
// //y = random(height);

// //this.index = index;
    
// //noise = 0.0000000001;
    
// //int randomColor = int(random(1,4));
// // c = color(255, 255,255);
  }
  
  void display() {
    
    //noStroke();
    fill(130, 5);
    float tx = 0;
    
    for(int i = 0; i < width; i++) {
      stroke(noise(tx,ty)*255*1.5, 255, 250);
    // stroke(c);
      ellipse(i, 150+noise(tx,ty)*250, 3, 3);
      
      tx += map(i, 0, width, 0.00001, 0.1);
      
  }
  ty += map(20, 0, height, 0.00001, 0.1);
}
}

```

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [April 1, 2020, 2:31am UTC](https://discourse.processing.org/t/how-to-add-circle-in-the-code-as-noise/19111/3 "2020-04-01T02:31:52Z")

</div>

What is your question, exactly? What does it do, and what do you want it to do instead?
