# How to Iterate over 2D region with 1D pixels array

**URL:** <https://discourse.processing.org/t/how-to-iterate-over-2d-region-with-1d-pixels-array/39336>\
**Category:** Libraries\
**Created:** [October 18, 2022, 12:04pm UTC](https://discourse.processing.org/t/how-to-iterate-over-2d-region-with-1d-pixels-array/39336 "2022-10-18T12:04:27Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![doni](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@doni](https://discourse.processing.org/u/doni)\
**Post date:** [October 19, 2022, 4:53am UTC](https://discourse.processing.org/t/how-to-iterate-over-2d-region-with-1d-pixels-array/39336/23 "2022-10-19T04:53:40Z")

</div>

![processing color tracking](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/c/ec20d25183558aee2693a76224a13e24939dbb94.jpeg)

the tracking, draw circle and the redraw of tracked color done within this range

```auto
for (int x = 0; x < video.width && x < 100; x ++ ) {
    for (int y = 240; y < video.height; y ++ )

```

not over those x and y value

---

_[View the full topic](https://discourse.processing.org/t/how-to-iterate-over-2d-region-with-1d-pixels-array/39336)._
