Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Few Notes Starting August 29, 2018

Similar presentations


Presentation on theme: "A Few Notes Starting August 29, 2018"— Presentation transcript:

1 A Few Notes Starting August 29, 2018

2 From Chapter 2 Don’t neglect Zoog. He’s your friend!
Textbook website: learningprocessing.com Work exercises at home… Remix

3

4 Processing measures degrees or radians of a circle differently:
0 degrees/radians is located on the right side of the circle as expected. However, it increases in the clockwise direction rather than counterclockwise. Angles can be specified: in radians; in degrees (by converting into radians); eg radians(90) or by special names of common angles, stored as variables.

5 Formula: Degree *( pi/180)

6 void setup() { // Called once when program starts } void draw() {
// Called repeatedly while program runs

7 void setup() { size(200, 200); } void draw() { background(255);
void draw() { // Try moving background() to setup() to see the difference. background(255);   stroke(0); fill(175); rectMode(CENTER); fill(#ff0000); rect(mouseX, mouseY, 50, 50);

8 void mousePressed() { // Called when the mouse is pressed } void keyPressed() { // Called each time a key is pressed frameRate(fps); Sets number of frames displayed per second. i.e. the number of times draw() is called per second. Default = 60.

9 Use save() in your homework
The save() function is placed within draw(). It generates a file based on the name you specify. Example: Save(bunnypic.jpg);


Download ppt "A Few Notes Starting August 29, 2018"

Similar presentations


Ads by Google