Digital Art with p5.js Study Guide

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/20

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering core concepts, coordinates, color functions, transformations, variables, animation, and interactivity in p5.js.

21 Terms

1
New cards

where is the Default p5.js Origin (0, 0)

The point (0,0)(0, 0) located at the top-left corner of the canvas in the default p5.js coordinate system.

2
New cards

rect()

what is The p5.js function used to draw a rectangle on the canvas.

3
New cards

stroke() and fill()

The two p5.js functions used to control the colors of shapes

4
New cards

which change would move the circle 75 pixels to the right without changing size

changing first number in code

5
New cards

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

6
New cards

frameCount

A p5.js system that represents the number of frames displayed since the sketch started.

7
New cards

if you want me a circle ride with a black outline, what would you use?

fill(255,0,0) and stroke(0)

8
New cards

if x is changed to 150 what changes

rectangle moves horizontally to the right

9
New cards

True or false when increasing the shape of x coordinate in generally moves that shape to the right on the default canvas

true

10
New cards

what transformation changes the position of a shape without directly changing the size

translate and rotate


11
New cards

what does a variable store

changing X coordinate

12
New cards

what are variables used for?

to avoid having the same values in multiple places and update the inside draw setting

13
New cards

what is the main effect of x += 5

circle moves five pixels to the right in every frame

14
New cards

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

15
New cards

why does background() go at top of inside draw()

erase the previous frame's drawing so that moving objects do not leave a trail.

16
New cards

what techniques create animation effects

changing the object’s position, size and color in every frame

17
New cards

what code would a rectangle rotate around translation point

rotate(angle);

rect(-25,-25,50,50);

angle +=0.05

18
New cards

what code makes a circle follow the mouse position

circle(mouseX,MouseY,40);

19
New cards

mouseX represents what

mouse’s horizontal position

20
New cards

mouseY represents what

the mouse’s vertical position

21
New cards

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