I am trying to get an image rotated on the y axis next to an image rotated with the same negative degrees. So the left hand image diminishes in perspective on its right hand edge and the right hand image diminishes on its left hand edge.
I have sort of managed it through trial and error but can't figure out the relationships between the canvas size, rotation, transform and image size. Here's what I have:
PImage img;
void setup () {
img = loadImage ("MyImage.jpg"); // 40x40
size (1000, 500, P3D);
}
void draw () {
// draw the left image rotated
pushMatrix();
rotateY(1);
image(img, 80, 50);
popMatrix();
// draw the same image rotated the other way
rotateY(radians(-26));
translate(150, 120);
image (img, 350, 80, 125, 100);
}
I'd be grateful if there's an easier way or if someone can explain all the moving parts for the right hand image.
Thanks