Triangle movement | Last thread this week

I Have an ellipse(x, y, 20, 20); and I want it to be a triangle of any parameter, but will still have position x, y so I can move it with my keys. Thank you!!

1 Like

That’s easy

just make a function myTri() and
say

void myTri() {
   pushMatrix(); 
   translate(x,y);
   triangle(....) // values so that the triangle **lies on 0,0**, so -30,-30, 30, -30 etc. 
   popMatrix();
}
1 Like