EOY- Processing Flashcards
what is processing?
Processing is a flexible language for learning how to code within the context of the visual arts
background();
Colour of the window background
noStroke();
To remove the outline of the shapes
text(“ “);
writes text
fill();
fills shape
int n = 0;
sets up the variable as an int (that is a whole number) with an initial value of zero. With the name ’n’
Variables:
are a key element of programming. They are used for calculations, for storing values for later use, in decisions and in iteration.
rameRate();
specifies the number of frames to be displayed every second. For example, the function call frameRate(30) will attempt to refresh 30 times a second.
if
The if structure allowing the program to choose between two or more blocks of code. It specifies a block of code to execute when the expression in if is false.
Mouse position
The system variable mouseX or mouseY always contains the current horizontal coordinate of the mouse.
functions to know
draw(), line(), rect(), mouseClick(), ellipse(), stroke(), noStroke(), fill(), background(), size()
Random
sets the seed value for random(). By default, random() produces different results each time the program is run. Set the seed range to a number to be returned each time it is run.
random(Start Number,End Number) e.g random(0,5) - will give a random number between 0 and 5.