My first step in getting back to Processing was to revise the basics. Although we’ve had a very good coding tutor in the first semester, I already feel like I forgot most of what we’ve learned there. So this is why I found myself a beginners course on Youtube. It’s approx. 65 videos about learning Processing by Gabriel Duarte. I only consider half of them to be „the basics“ but this seems to be my first opportunity to go further into the material after I feel confident with the basics.
First of all, I learn how to create shapes. The commands to do so consist of the shape name and a certain amount of arguments in parentheses. These arguments can refer to the x and y position of the element but also to the height or the width of the shape. Detailed statements of required arguments per shape function can be found in the reference section of the Processing page.
ellipse(100, 100, 50, 50);
rect(200, 200, 150, 50);
line(10, 10, 90, 90);
Secondly, I remember that one can determine the colour of the shape as well as the stroke weight. The default colour mode is RGB and so one can define the desired colour by inserting three numbers as three arguments. If there is only one argument indicated, this number is valid for all three arguments. Moreover, indicating a fourth (or in the latter case, a second) argument means that transparency is applied. The defined colors only apply to shapes that are drawn after the color was specified.
fill(255, 0, 0);
fill(255, 120, 50, 70);
In fact, this is all you need to create simple static shapes in the colors you want. However, there are many more types of shapes that can be created. To find out more about these, just check out processing.org.