# Ciclo for con iteraciones

**URL:** <https://discourse.processing.org/t/ciclo-for-con-iteraciones/31566>\
**Category:** Español\
**Tags:** homework\
**Created:** [August 3, 2021, 6:33pm UTC](https://discourse.processing.org/t/ciclo-for-con-iteraciones/31566 "2021-08-03T18:33:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tati1202](https://avatars.discourse-cdn.com/v4/letter/t/9e8a1a/32.png) [@tati1202](https://discourse.processing.org/u/tati1202)\
**Post date:** [August 3, 2021, 6:33pm UTC](https://discourse.processing.org/t/ciclo-for-con-iteraciones/31566/1 "2021-08-03T18:33:55Z")

</div>

for( int x=-600; x\<=600; x=x+60){  
for (int y=-600; y\<=600; y=y+60){

quiero hacer esta grilla en un size(600,600) pero no se como meter las variables que puedan ser luego modificadas con eventos de teclado/mouse, como para ver la grilla mas pequeña o mas grande, con los numeros de ahi arriba. si me ayudan con como poner las variables para que luego no sea una grilla estatica me serian de mucha ayuda

---

<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:** [August 4, 2021, 1:20am UTC](https://discourse.processing.org/t/ciclo-for-con-iteraciones/31566/2 "2021-08-04T01:20:58Z")

</div>

Hello,

Some resources for you:

> [@Zig Zag or Wavy or Spiral or Dotted lines eyes](https://discourse.processing.org/t/zig-zag-or-wavy-or-spiral-or-dotted-lines/31547/2):
>
> Hello, I encourage you to look at the resources available here: Beginner The Processing website has references, examples, tutorials, etc. [https://processing.org/](https://processing.org/) The Processing PDE (IDE) has lots to offer! An exploration of the menu items will reveal what is available! You will find libraries, tools, examples and more! For example: [image] The Coding Train [https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1\_aw](https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw)[https://thecodingtrain.com/](https://thecodingtrain.com/) Happy Coding [https://happycoding…](https://happycoding.io/tutorials/processing/)

Lots of good stuff in there to get you started!

Once you go through the basic tutorials these may help:

- [for / Reference / Processing.org](https://processing.org/reference/for.html)
- [map() / Reference / Processing.org](https://processing.org/reference/map_.html)
- [text() / Reference / Processing.org](https://processing.org/reference/text_.html)

Try changing the 60 to a variable and modifying that variable with mouse movement using the map() function.

Have fun!

`:)`

---

<div class="post-metadata">

**Author:** ![tati1202](https://avatars.discourse-cdn.com/v4/letter/t/9e8a1a/32.png) [@tati1202](https://discourse.processing.org/u/tati1202)\
**Post date:** [August 18, 2021, 2:34am UTC](https://discourse.processing.org/t/ciclo-for-con-iteraciones/31566/3 "2021-08-18T02:34:59Z")

</div>

thanks! I finally change the code and assigned a variable
