hi,
i'm working on a project where i'd like to deform a map of the united states based on specific statistical information across in the country. essentially, i'd like to increase the altitude of certain areas on the map if certain statistics are higher than others. i'm pretty sure i'll know how to deform then actual map based on my dataset, however i'm having some issues actually creating a mesh and adding the united states image texture onto it. i'm trying to create a grid to texture onto with the following:
Code:void draw() {
background(0);
translate(width / 2, height / 2);
rotateY(map(mouseX, 0, width, -PI, PI));
rotateZ(45);
beginShape();
stroke(255, 0, 0 );
for(int i = 0; i < points; i++){
vertex(-i*2,0, -i*2);
vertex(i*2,0, -i*2);
vertex(i*2,0, i*2);
vertex(-i*2,0, i*2);
}
endShape();
}
the result doesn't seem to be producing a grid however. so i'm wondering how i could start to structure a grid using vertices within a for loop, and also texture it with an image.
thanks.