# Put a picture on the walls of a box

**URL:** https://discourse.processing.org/t/put-a-picture-on-the-walls-of-a-box/26919
**Category:** Coding Questions
**Created:** [January 9, 2021, 5:11pm UTC](https://discourse.processing.org/t/put-a-picture-on-the-walls-of-a-box/26919 "2021-01-09T17:11:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![julieturin](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@julieturin](https://discourse.processing.org/u/julieturin)
#### Post date: [January 9, 2021, 5:11pm UTC](https://discourse.processing.org/t/put-a-picture-on-the-walls-of-a-box/26919/1 "2021-01-09T17:11:15Z")

</div>

hello,  
I would like to put a picture on the floor and walls of my box but I can’t do it with vertex.

pushMatrix();  
translate(0, 0, total/2);  
box(400, 200, total);

PImage img = loadImage(“lol.jpg”);  
noStroke();  
beginShape();  
texture(img);  
// “laDefense.jpg” is 100x100 pixels in size so  
// the values 0 and 100 are used for the  
// parameters “u” and “v” to map it directly  
// to the vertex points  
vertex(520, 260, 200, total);  
vertex(520+total, 260,200, total);  
vertex(520, 460, 200, total);  
vertex(520+total, 460, 200, total);  
endShape();  
//image(image,0,0);  
//rotateY(PI/2);  
popMatrix();  
pop();

---

<div class="post-metadata">

### Author: ![noahbuddy](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@noahbuddy](https://discourse.processing.org/u/noahbuddy)
#### Post date: [January 12, 2021, 7:20pm UTC](https://discourse.processing.org/t/put-a-picture-on-the-walls-of-a-box/26919/2 "2021-01-12T19:20:47Z")

</div>

Hello and welcome!

The (relatively) simple method is to construct the box yourself.  
Take a look at the TextureCube example under Topics \> Textures included with the Processing IDE.

From your code, you are creating 2D vertecies. While it is possible to paint an image over the area where the box is rendered, it is not simple.
