# How can i do this?

**URL:** https://discourse.processing.org/t/how-can-i-do-this/1548
**Category:** Beginners
**Created:** [July 6, 2018, 11:20am UTC](https://discourse.processing.org/t/how-can-i-do-this/1548 "2018-07-06T11:20:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Cuchis](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@Cuchis](https://discourse.processing.org/u/Cuchis)
#### Post date: [July 6, 2018, 11:20am UTC](https://discourse.processing.org/t/how-can-i-do-this/1548/1 "2018-07-06T11:20:29Z")

</div>

Hi,  
Im new to processing and i have a question. I need to do this image, circles on x and y axis where there is an increase of circles as shown in the image. This is what i have so far:  
 ![20](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/3aef9253360db6b15766ca37c22e9385a7f9b87f.png)

```auto
int x;
int y;
int max,may;

size(600,600);
background(155);

may = height/10;
max = width/10;
x = max/2;
y= may/2;

for( y= may/2; y<height; y=y+may)
{
  for( x = max/2; x<width; x=x+max)
  {
  noStroke();
  fill(200,0,0);
  ellipse(x,y,max,may);
  }
  
}

```

---

<div class="post-metadata">

### Author: ![alphydan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/alphydan/32/536_2.png) [@alphydan](https://discourse.processing.org/u/alphydan)
#### Post date: [July 6, 2018, 12:31pm UTC](https://discourse.processing.org/t/how-can-i-do-this/1548/2 "2018-07-06T12:31:08Z")

</div>

Hi @Cuchis, what is failing in the code? Do you see any errors? Does it display anything?  
Are you using the `setup()` and `draw()` functions?

---

<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: [July 6, 2018, 1:00pm UTC](https://discourse.processing.org/t/how-can-i-do-this/1548/3 "2018-07-06T13:00:34Z")

</div>

your attempt is to go down line by line

So the outer for loop is the line, the inner for loop the columns of the grid

But you need to check the upper boundary of the inner for loop which is now width.

Instead use a variable upperBoundX that you increase every line by max
