We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How would I apply a custom transformation to a 2d sketch?
The following code will skew a rectangle, but requires the 3d renderer.
pushMatrix( );
applyMatrix( 1, tan( radians(45) ), 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
);
fill( 255, 0, 0 );
rect( 0, 0, 50, 50 );
popMatrix( );
How do I apply a similar 2d matrix (1, tan(radians(45)), 0, 0, 1, 0, 0, 0, 1) to a 2d sketch?
Answers
Thanks. Now to get this to work with processing.js ... http://forum.processing.org/two/discussion/3172/bug-with-applymatrix