# How draw a tiled image in p5.js?

**URL:** https://discourse.processing.org/t/how-draw-a-tiled-image-in-p5-js/1255
**Category:** p5.js
**Created:** [June 25, 2018, 6:22pm UTC](https://discourse.processing.org/t/how-draw-a-tiled-image-in-p5-js/1255 "2018-06-25T18:22:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)
#### Post date: [June 25, 2018, 6:22pm UTC](https://discourse.processing.org/t/how-draw-a-tiled-image-in-p5-js/1255/1 "2018-06-25T18:22:21Z")

</div>

Hi!  
I have a simple question…

How i draw a cyclic y axis image on canvas?

---

<div class="post-metadata">

### Author: ![mat650](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mat650/32/564_2.png) [@mat650](https://discourse.processing.org/u/mat650)
#### Post date: [June 25, 2018, 7:48pm UTC](https://discourse.processing.org/t/how-draw-a-tiled-image-in-p5-js/1255/2 "2018-06-25T19:48:19Z")

</div>

I don’t know if it’s only me… anyway I can’t understand the matter of your question. Can you rephrase your it?

---

<div class="post-metadata">

### Author: ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)
#### Post date: [June 25, 2018, 8:11pm UTC](https://discourse.processing.org/t/how-draw-a-tiled-image-in-p5-js/1255/3 "2018-06-25T20:11:35Z")

</div>

You can use a nested for loop to draw the tile in each cell of the grid.

---

<div class="post-metadata">

### Author: ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)
#### Post date: [June 27, 2018, 5:29am UTC](https://discourse.processing.org/t/how-draw-a-tiled-image-in-p5-js/1255/4 "2018-06-27T05:29:07Z")

</div>

Do you have any examples of this in operation please?

---

<div class="post-metadata">

### Author: ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)
#### Post date: [June 27, 2018, 4:50pm UTC](https://discourse.processing.org/t/how-draw-a-tiled-image-in-p5-js/1255/5 "2018-06-27T16:50:10Z")

</div>

I don’t have a specific example of using an image, but here is an example that draws a grid of letters:

> **[Letters](https://happycoding.io/examples/processing/for-loops/letters)**
>
> This example uses nested for loops to show a grid of letters.

You’d want to do something very similar, but draw an image instead of a character.
