quad(x1, y1, x2, y2, x3, y3, x4, y4);
Draw a quad on the screen.
Arguments
x1
The x position of the first pointy1
The y position of the first pointx2
The x position of the second pointy2
The y position of the second pointx3
The x position of the third pointy3
The y position of the third pointx4
The x position of the fourth pointy4
The y position of the fourth pointfunction setup()
createWindow(200, 200);
end
function draw()
background('purple');
quad(30, 60, 160, 50, 130, 165, 40, 145);
end
Output