# How to draw a polygon, when x is getting bigger, its sides getting more

**URL:** https://discourse.processing.org/t/how-to-draw-a-polygon-when-x-is-getting-bigger-its-sides-getting-more/24987
**Category:** Coding Questions
**Tags:** homework
**Created:** [October 28, 2020, 9:31pm UTC](https://discourse.processing.org/t/how-to-draw-a-polygon-when-x-is-getting-bigger-its-sides-getting-more/24987 "2020-10-28T21:31:08Z")
**Posts on this page:** 2
**Page:** 3

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [November 15, 2020, 4:54pm UTC](https://discourse.processing.org/t/how-to-draw-a-polygon-when-x-is-getting-bigger-its-sides-getting-more/24987/41 "2020-11-15T16:54:11Z")

</div>

When you hold the mouse button, the ellipse is drawn in black, otherwise it’s white. This is the fill color, not the stroke color (the outline).

It looks better, when the outline is not black but darkgray

```auto

void setup() {
  size(480, 480);
}
void draw() {
  stroke(111);
  if (mousePressed) {
    fill(0);
  } else {
    fill(255);
  }
  ellipse(mouseX, mouseY, 80, 120);//
}

```

---

<div class="post-metadata">

### Author: ![DijaAngel](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@DijaAngel](https://discourse.processing.org/u/DijaAngel)
#### Post date: [November 16, 2020, 5:37am UTC](https://discourse.processing.org/t/how-to-draw-a-polygon-when-x-is-getting-bigger-its-sides-getting-more/24987/42 "2020-11-16T05:37:00Z")

</div>

Thank you so much for your time and assistance 🥰

[Previous page](https://discourse.processing.org/t/how-to-draw-a-polygon-when-x-is-getting-bigger-its-sides-getting-more/24987.md?page=2)
