Draw a triangle
in
Programming Questions
•
1 year ago
I have to draw a triangle with mouse clicks (3 clicks = 1 triangle). I have this code:
Thanks!
Copy code
- void setup()
{
size(600, 480);
background(255);
beginShape(TRIANGLES);
}
void draw()
{
}
void mousePressed()
{
point(mouseX, mouseY);
vertex(mouseX, mouseY);
}
Thanks!
1