# How to make ellipses on the screen

**URL:** <https://discourse.processing.org/t/how-to-make-ellipses-on-the-screen/9669>\
**Category:** Coding Questions\
**Created:** [March 27, 2019, 6:34am UTC](https://discourse.processing.org/t/how-to-make-ellipses-on-the-screen/9669 "2019-03-27T06:34:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robol](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Robol](https://discourse.processing.org/u/Robol)\
**Post date:** [March 27, 2019, 6:34am UTC](https://discourse.processing.org/t/how-to-make-ellipses-on-the-screen/9669/1 "2019-03-27T06:34:36Z")

</div>

So I started learning processing about 3 days ago, and I realy enjoyed what the program can do so far I know. But this morning I started working with arrays and objects and I couldnt figure out why my code wasnt working. If someone can please fix my code and also explain what I did wrong I would realy apriciate that \<3

I want this code to make some ellipces on the screen

code:

```auto
Bubble[] b = new Bubble[10];
void setup() {
  size(600, 600);
  for (int i = 0; i < 10; i++) {
    b[i] = new Bubble(i + 1,i,100);
  }
}
void draw() {
  background(20);
  fill(255);
  for(int i = 0; i < 10; i++){
    b[i].display();
    
  }
 
}

class Bubble {
  float x, y, size;
  Bubble(float thisx, float thisy, float thissize) {

    x = thisx;
    size = thissize;
    y = thisy;
  }
  void display() {
    fill(20);
    ellipse(x + 10, y + 10, size, size);
  }
}

```

---

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [March 27, 2019, 7:52am UTC](https://discourse.processing.org/t/how-to-make-ellipses-on-the-screen/9669/2 "2019-03-27T07:52:25Z")

</div>

Hi! Maybe because background color = 20, fill color = 20 (set inside `display()`), so you can’t see anything?

---

<div class="post-metadata">

**Author:** ![Robol](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Robol](https://discourse.processing.org/u/Robol)\
**Post date:** [March 27, 2019, 8:20am UTC](https://discourse.processing.org/t/how-to-make-ellipses-on-the-screen/9669/3 "2019-03-27T08:20:11Z")

</div>

Thank you very much, I just put random values there and got the same one twice thanks
