Saint Louis University |
Computer Science 144
|
Dept. of Math & Computer Science |
Topic: Processing Basics
Related Reading: Ch. 2 and various online tutorials
Due:
11:00am, Tuesday, January 27, 2015
Note that homework assignments should be submitted in class as hard copy (although you are welcome to test your solutions with Processing).
For this assignment, you must work individually.
Please make sure you adhere to the policies on academic integrity in this regard.
Give three different statements that could be used to replace the statement background(127). Hint: Ideally, we'd like you to explore the various ways that parameters to background can be used to express a color. However, we will allow you to try to mimic a similar effect by using other functions for one of your three statements, such as use of rect() to effectively cover the background.
Give a command that draws an ellipse having width 100 and height 50, with a center point that matches the center point of the sketch window, irrespectively of the size of the sketch window.
Give a command that draws a line extending from the bottom-left corner of the sketch window to the top-right corner of the sketch window.
Give a short program that draws the left half of a filled circle, having radius 25, and centered at point (70,20).
Give a short program that draws a red rectangle that covers the upper-left quadrant, a green rectangle that covers the upper-right quadrant, a blue rectangle that covers the lower-left quadrant, and white rectangle that covers the lower-right quadrant of the sketch window, irrespective of the size of the sketch window.