Get coordinates from a rectangle

Hi,
Is it possible to get the coordinates of the angles of a rectangle after some transformations ?
See following code :

size(200,200,P3D);
rectMode(CENTER);
pushMatrix();
translate(50,100,0);
rotateX(45);
rect(50,50,100,50);
popMatrix();

// is it here possible to access the coordinates of the angles of the rectangle ?
// (before the translation and the rotation)

I think that’s modelX, modelY and modelZ

also interesting screenX and screenY

see Reference / Processing.org

1 Like