Hello Processing!
Note: These assignments go hand-in-hand with the sections and videos on the resource website. Be sure to watch these videos before doing the assignments!
Hello
Be sure Processing runs on your computer with no errors.
Resource: http://hello.processing.org/
Watch the video on the resource website. There is no assignment for this section.
Shapes (w/ Assignment)
Watch the video, then replicate the assignment given at the end so it looks like the screenshot shown below (without the ruler marks).
Save as "Shapes.pde" and submit the Shapes folder to the relevant handin folder.
Note: include the following code at the beginning of your program so the window is sized correctly:
size(500, 400);
Color (w/ Assignment)
For this assignment, reload your previous Shapes program and save as Color.pde. Include the following line near the top of your program so the strokes will be thicker and easier to see:
strokeWeight(3);
Modify your program so that you have a background colour and that each object has a different stroke and fill. To use "compatible" colours, use Adobe's Color site (https://color.adobe.com) to pick your colours. You can get RGB or hex values from this site, but note that if you want to use the hex code you have to precede the value with a pound sign, as in:
background(#FFA6A5);
Submit as Color.pde and submit to the relevant handin folder.
See the example image on the right of what your program may produce.
Interact (w/ Assignment)
Watch the video and do the corresponding tutorial.
Modify the program so that the x-value of the mouse affects the red value of fill() and the y-value of the mouse affects the green value of fill(). Instead of using an ellipse, rewrite the program so it uses a rectangle and that the x-value of the mouse affects the width of the rectangle and the y-value of the mouse affects the height.
Save as "Interact.pde" and submit to the corresponding handin folder.
See the example image on the right of what your program may produce.
Questions (w/ Assignment)
Watch the video and do the corresponding tutorial.
Write a program that "paints" circles on the screen and uses an "if" statement to erase the screen when the mouse button is pressed.
Save as "Questions.pde" and submit to the appropriate handin folder.