mouse interaction w/ shapes
I made an interactive program that uses the mouse to determine a shape’s size and position:
void setup() {
size(500,500);
}
void draw() {
background(200);
triangle(mouseX,mouseY,mouseX*0.5,mouseY/3,mouseY,mouseX);
rect(mouseY*0.44,mouseX/3.2,mouseY/4+height/4-mouseX/5,mouseX/5+width/5-mouseY/4);
}