Computer Studies‎ > ‎Processing‎ > ‎Lessons‎ > ‎

00. Hello Processing!

Hello

Be sure Processing runs on your computer with no errors.


Watch the video. There is no assignment for this section. 

Shapes

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);


Color1

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.comto 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 to the relevant handin folder.

Here's an example of what your program may look like:


Interact

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.

Example output:


Questions

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.





1 I'm using the American spelling on this page where it coincides with the American spelling on the Processing tutorial and the Adobe Color website. 


Comments