import peasy.*;

int columns = 10;
int rows = 9;
PImage img;
PVector [] [] point = new PVector[columns][rows] ;
PVector [] [] point1 = new PVector[columns][rows] ;
PeasyCam cam;

void setup()
{
size (500, 500, P3D);

cam = new PeasyCam(this, 100);
cam.setMinimumDistance(50);
cam.setMaximumDistance(500);

textureMode(NORMAL);
noStroke();
lights();

img = loadImage("image.jpg");

for (int i = 0; i {
for (int j = 0; j {
point[i][j] = new PVector ( i * 40+60, j * 40+50, random(-20, 20) );
point1[i][j] = new PVector ( i * 40+60, (j+1) * 40+50, random(-20, 20) );
}
}
for (int i = 0; i {
for (int j = 1; j {
point1[i][j-1].z = point[i][j].z;
}
}
}

void draw()
{
background(255);
translate(-width/2, -height/2);
for (int j = 0; j < rows; j++) {
beginShape(TRIANGLE_STRIP);
texture(img);
for (int i = 0; i vertex (point[i][j].x, point[i][j].y, point[i][j].z, (float)i/(columns-1) , (float)j/(rows-1) );
vertex (point1[i][j].x, point1[i][j].y, point1[i][j].z, (float)i/(columns-1) , (float)(j+1)/(rows));
}
endShape();
}
}