1/20
Vocabulary flashcards covering core concepts, coordinates, color functions, transformations, variables, animation, and interactivity in p5.js.
where is the Default p5.js Origin (0, 0)
The point (0,0) located at the top-left corner of the canvas in the default p5.js coordinate system.
rect()
what is The p5.js function used to draw a rectangle on the canvas.
stroke() and fill()
The two p5.js functions used to control the colors of shapes
which change would move the circle 75 pixels to the right without changing size
changing first number in code
what is the most accurate description of rectangle with opposite width and heights
One rectangle appears to be rotated because of wet and high values are exchanged
frameCount
A p5.js system that represents the number of frames displayed since the sketch started.
if you want me a circle ride with a black outline, what would you use?
fill(255,0,0) and stroke(0)
if x is changed to 150 what changes
rectangle moves horizontally to the right
True or false when increasing the shape of x coordinate in generally moves that shape to the right on the default canvas
true
what transformation changes the position of a shape without directly changing the size
translate and rotate
what does a variable store
changing X coordinate
what are variables used for?
to avoid having the same values in multiple places and update the inside draw setting
what is the main effect of x += 5
circle moves five pixels to the right in every frame
if a student wants a object to grow gradually while staying centered (209,150). which variable is most appropriate to change each frame
size / diameter
why does background() go at top of inside draw()
erase the previous frame's drawing so that moving objects do not leave a trail.
what techniques create animation effects
changing the object’s position, size and color in every frame
what code would a rectangle rotate around translation point
rotate(angle);
rect(-25,-25,50,50);
angle +=0.05
what code makes a circle follow the mouse position
circle(mouseX,MouseY,40);
mouseX represents what
mouse’s horizontal position
mouseY represents what
the mouse’s vertical position
if a student wants to combine animation and interactivity and by pressing the spacebar increases the speed . what structure would be the best option
creating balls position in draw() section and check keyboard input