Monday, October 13, 2014

CSE Intro to Processing

A few weeks ago I had my first official class for Computer Science Engineering! Since most the students in this class are beginners most of what we did was learning the very basics of Processing. Like how to set up the size of the window, how to change the background color, how to make basic shapes and how to change the fill and lines of the shapes.  I completely understood what we were being taught and I really enjoyed the class immediately!

                                                           Code taught by Mr.Miles

// set up size of window
size(displayWidth, displayHeight);

// change background color to seafoam
background(127, 255, 127);
       
// rect(30, 20, 100, 55);
rect(600, 30, 400, 400, 0, 5, 10, 20);
rect(420, 120, 200, 200, 100);

rectMode(CORNERS);
rect(30, 20, 100, 500);

rectMode(CENTER);
rect(width / 2, height / 2, 50, 50);

rectMode(CORNER);

fill(255, 0, 0); // change the color of shapes' fill
ellipse(100, 100, 50, 50);
ellipse(width / 3, height / 3, 100, 100);

stroke(0, 0, 255); // change the color of lines
triangle(50, 50, 100, 100, 200, 75);

“Computers are getting smarter all the time.  Scientists tell us that soon they will be able to talk to us.  (And by ‘they’, I mean ‘computers’.  I doubt scientists will ever be able to talk to us.)”
-Dave Barry





No comments:

Post a Comment