Shearing a shape in 2D
in
Programming Questions
•
2 years ago
Hi,
I found this topic
http://processing.org/discourse/yabb2/YaBB.pl?num=1264104180
and i really wont to do the same i need to shear (slant whatever) a shape
but not with OPENGL renderer or P3D i only need 2D and want to use P2D renderer.
Is this possible?
this is a snippet from the old topic working great with P3D
I found this topic
http://processing.org/discourse/yabb2/YaBB.pl?num=1264104180
and i really wont to do the same i need to shear (slant whatever) a shape
but not with OPENGL renderer or P3D i only need 2D and want to use P2D renderer.
Is this possible?
this is a snippet from the old topic working great with P3D
- float f = 2; //shear factor
- pushMatrix();
- applyMatrix(1,f,0,0,
- 0,1,0,0,
- 0,0,1,0,
- 0,0,0,1);
- rect(0,0,100,100);
- popMatrix();
Thank you!
1