|CS 171 & 171L||Introduction to Computer Science I & Lab||Fall 2017|
Homework Assignment 1
Using Processing, create a window of size 750 by 750 pixels. It will contain the a section with your initials and a "self-portrait". Good programming requires good design, so start with a design on graph paper before you do any coding! To aid in your design, you can use the grid.pdf document, which contains a 1000 by 1000 grid that has lines every 25 units. You can also use a program such as inkscape
Part 1: Initials (5 points)
Create a stylized rendering of your initials using the basic Processing graphics primitives: point, line, rect, arc, triangle, and ellipse. Use at least one of each of these. The letters should be between 50 and 100 pixels high. Use at least 5 different color/transparency values.
Part 2: Face (14 points)
In the same window as your initials, create a graphical front-looking (not side profile) neck-up "self-portrait". The eyes should be large enough that the iris and pupils are clearly distinguished from the white sclera of the eyes. Use colors and shapes as needed.
Output (1 points)
Add code so that your programs saves a copy of your image in a file. Use your name as a part of the filename. See the section labeled "Creating images from your work" in the Processing Overview tutorial for more information.
Basically, you need to call the save() function (not the saveFrame() function) when your drawing is complete. You should use a filename such as "DReimann.jpg" (using your own name instead of mine). Avoid using the # character. See the save page in the API for more information. Use a png or jpg file format.
You must use comments in your program. At the top, put your name and assignment number in a comment. Label each major section with a comment (part 1 and part 2). Label each minor section as well, such as "letter D". Use whitespace (a blank line or two) to also separate section of your code to improve its readability.
Send me (email@example.com) the following in a Processing pde file as an attachment to an email message with Homework 1 as the subject line. Include your saved image as another attachment.
Be creative and have fun!
Copyright © 2017, David A. Reimann. All rights reserved.