Assignments | Course Home | Documentation | Lab Hours/Tutoring | Schedule | Submit

Saint Louis University

Computer Science 144
Introduction to Computer Science: Multimedia

Michael Goldwasser

Spring 2015

Dept. of Math & Computer Science

Homework Assignment 1

Processing Basics

Due: 11:00am, Tuesday, January 27, 2015


Contents:


Overview

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


Collaboration Policy

For this assignment, you must work individually.

Please make sure you adhere to the policies on academic integrity in this regard.


Problems to be Submitted (30 points)

  1. (6 points)

    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.

  2. (6 points)

    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.

  3. (6 points)

    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.

  4. (6 points)

    Give a short program that draws the left half of a filled circle, having radius 25, and centered at point (70,20).

  5. (6 points)

    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.


Michael Goldwasser
CSCI 144, Spring 2015
Last modified: Thursday, 22 January 2015
Assignments | Course Home | Documentation | Lab Hours/Tutoring | Schedule | Submit