Module 2 - Drawing Attributes Flashcards
What is the name of the function that defines the dimensions of and creates the drawing area?
createCanvas
How many points does a rect() need & what are the coordinates?
4 points & (x, y, w, h)
How many points does a square() need & what are the coordinates?
3 points & (x, y, s)
How many points does a line need & what are the coordinates?
4 points & (x1, y1, x2, y2)
How many points does a triangle need & what are the coordinates?
6 points & (x1, y1, x2, y2, x3, y3)
How many points does a quad need & what are the coordinates?
8 points & (x1, y1, x2, y2, x3, y3, x4, y4)
Based on location, when you move a point horizontally to the left, what happens to the x-value?
Increases
Based on location, when you move a point vertically down, what happens to the y-value?
Increases
How many points does a circle need & what are the coordinates?
3 points & (x, y, d)
How many points does an ellipse need & what are the coordinates?
4 points & (x, y, w, h)
What is the difference between an ellipse and a circle?
Circle function will only call a regular round circle, while you can change the shape of an ellipse using w & h
What will happen if loop() is called after noLoop() in the setup() function?
The draw function will continue to execute in an endless loop
p5.js does not support gradient fills directly; it must be implemented manually
True
What is CORNERS?
Specifies two opposite corners of a rect()