Rotate triangle around own axis.
in
Programming Questions
•
1 year ago
Hi,
I'm totally new to Processing and currently trying to rotate a triangle around its own axis without success. The rotation radius is way too big, apparently this has something to do with the translate but I have no idea how to do this.
The this is the part of the code:
pushMatrix();
translate(width/2,height/2);
rotate(s*radians(90));
triangle(70, 235, 128, 150, 186, 235);
popMatrix();
The "s" refers to seconds, which I defined earlier in the code, so the triangle would turn around it's own axis every time a second passes (it's a clock sort of thing).
1